Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/tuyanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-10-27 15:47:11 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-10-27 15:47:11 +0300
commit56ba3bf92decc1fd166d2207bd8326dfc32e2e0a (patch)
tree53d52cb64f1078197b3dc43bab5aa75e552dc079 /TuyaDeviceScanInfo.cs
parente7b97d1ba238cfdf0ae7c60b8b21367104ff5e6e (diff)
API
Diffstat (limited to 'TuyaDeviceScanInfo.cs')
-rw-r--r--TuyaDeviceScanInfo.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/TuyaDeviceScanInfo.cs b/TuyaDeviceScanInfo.cs
new file mode 100644
index 0000000..777b8b9
--- /dev/null
+++ b/TuyaDeviceScanInfo.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Text.Json.Serialization;
+
+namespace com.clusterrr.TuyaNet
+{
+ public class TuyaDeviceScanInfo : IEquatable<TuyaDeviceScanInfo>
+ {
+ [JsonPropertyName("ip")]
+ public string IP { get; set; } = null;
+
+ [JsonPropertyName("gwId")]
+ public string GwId { get; set; } = null;
+
+ [JsonPropertyName("active")]
+ public int Active { get; set; } = 0;
+
+ [JsonPropertyName("ability")]
+ public int Ability { get; set; } = 0;
+
+ [JsonPropertyName("mode")]
+ public int Mode { get; set; } = 0;
+
+ [JsonPropertyName("encrypt")]
+ public bool Encryption { get; set; } = false;
+
+ [JsonPropertyName("productKey")]
+ public string ProductKey { get; set; } = null;
+
+ [JsonPropertyName("version")]
+ public string Version { get; set; } = null;
+
+ public bool Equals(TuyaDeviceScanInfo other)
+ => (IP == other.IP) && (GwId == other.GwId);
+
+ public override string ToString()
+ => $"IP: {IP}, gwId: {GwId}, product key: {ProductKey}, encryption: {Encryption}, version: {Version}";
+ }
+
+}