forked from reincubate/ricloud-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDevice.cs
110 lines (100 loc) · 2.72 KB
/
Device.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
namespace Reincubate.ricloud {
/// <summary>
/// Class to encapsulate a specific iDevice. NB - can be serialised/deserialised using JSON.NET
/// </summary>
public class Device {
public Device() {
}
public Device( string mId, string mModel, string mDeviceName, string mColour, string mName, DateTime mLatestBackup ) {
_id = mId;
_model = mModel;
_deviceName = mDeviceName;
_colour = mColour;
_name = mName;
_latestBackup = mLatestBackup;
}
protected string _id;
/// <summary>
/// Unique Device ID (UDID)
/// </summary>
[JsonProperty(PropertyName = "")]
public string Id {
get {
return _id;
}
set {
_id = value;
}
}
protected string _model;
/// <summary>
/// Apple Model ID for device (e.g J98aAP is an iPad Pro)
/// </summary>
[JsonProperty(PropertyName = "model")]
public string Model {
get {
return _model;
}
set {
_model = value;
}
}
protected string _deviceName;
/// <summary>
/// Friendly name of device
/// </summary>
[JsonProperty(PropertyName = "device_name")]
public string DeviceName {
get {
return _deviceName;
}
set {
_deviceName = value;
}
}
protected string _colour;
/// <summary>
/// Colour of device
/// </summary>
[JsonProperty(PropertyName = "colour")]
public string Colour {
get {
return _colour;
}
set {
_colour = value;
}
}
protected string _name;
/// <summary>
/// Name of device model (e.g iPhone 6S or iPad Pro)
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name {
get {
return _name;
}
set {
_name = value;
}
}
protected DateTime _latestBackup;
/// <summary>
/// Date and time of the most recent backup for this device
/// </summary>
[JsonProperty(PropertyName = "latest-backup")]
public DateTime LatestBackup {
get {
return _latestBackup;
}
set {
_latestBackup = value;
}
}
}
}