forked from daltskin/SmartThingsNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request daltskin#4 from daltskin/rules_models
Changes to support view/edit/delete rules
- Loading branch information
Showing
11 changed files
with
167 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace SmartThingsNet.Model | ||
{ | ||
public class Else | ||
{ | ||
[DataMember(Name = "command", EmitDefaultValue = false)] | ||
public CommandAction command { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace SmartThingsNet.Model | ||
{ | ||
public class Greater_Than | ||
{ | ||
[DataMember(Name = "right", EmitDefaultValue = false)] | ||
public Right right { get; set; } | ||
|
||
[DataMember(Name = "left", EmitDefaultValue = false)] | ||
public Left left { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
| ||
using Newtonsoft.Json; | ||
using System.Runtime.Serialization; | ||
|
||
namespace SmartThingsNet.Model | ||
{ | ||
public class If | ||
{ | ||
[JsonProperty("equals")] | ||
[DataMember(Name = "equals", EmitDefaultValue = false)] | ||
public _Equals _equals { get; set; } | ||
|
||
[JsonProperty("then")] | ||
[DataMember(Name = "then", EmitDefaultValue = false)] | ||
public Then[] _then { get; set; } | ||
|
||
[JsonProperty("else")] | ||
[DataMember(Name = "else", EmitDefaultValue = false)] | ||
public Else[] _else { get; set; } | ||
|
||
[DataMember(Name = "less_than", EmitDefaultValue = false)] | ||
public Less_Than less_than { get; set; } | ||
|
||
[DataMember(Name = "greater_than", EmitDefaultValue = false)] | ||
public Greater_Than greater_than { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace SmartThingsNet.Model | ||
{ | ||
public class Left | ||
{ | ||
[JsonProperty("string")] | ||
[DataMember(Name = "string", EmitDefaultValue = false)] | ||
public string _string { get; set; } | ||
|
||
[DataMember(Name = "location", EmitDefaultValue = false)] | ||
public Location? location { get; set; } | ||
|
||
[DataMember(Name = "device", EmitDefaultValue = false)] | ||
public Device device { get; set; } | ||
|
||
[JsonProperty("integer")] | ||
[DataMember(Name = "integer", EmitDefaultValue = false)] | ||
public int? _integer { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace SmartThingsNet.Model | ||
{ | ||
public class Less_Than | ||
{ | ||
[DataMember(Name = "right", EmitDefaultValue = false)] | ||
public Right right { get; set; } | ||
|
||
[DataMember(Name = "left", EmitDefaultValue = false)] | ||
public Left left { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace SmartThingsNet.Model | ||
{ | ||
public class Right | ||
{ | ||
[JsonProperty("string")] | ||
[DataMember(Name = "string", EmitDefaultValue = false)] | ||
public string _string { get; set; } | ||
|
||
[DataMember(Name = "location", EmitDefaultValue = false)] | ||
public Location? location { get; set; } | ||
|
||
[DataMember(Name = "device", EmitDefaultValue = false)] | ||
public Device device { get; set; } | ||
|
||
[JsonProperty("integer")] | ||
[DataMember(Name = "integer", EmitDefaultValue = false)] | ||
public int? _integer { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace SmartThingsNet.Model | ||
{ | ||
public class Then | ||
{ | ||
[DataMember(Name = "command", EmitDefaultValue = false)] | ||
public CommandAction command { get; set; } | ||
|
||
[DataMember(Name = "sleep", EmitDefaultValue = false)] | ||
public SleepAction sleep { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace SmartThingsNet.Model | ||
{ | ||
public class _Equals | ||
{ | ||
[DataMember(Name = "left", EmitDefaultValue = false)] | ||
public Left left { get; set; } | ||
|
||
[DataMember(Name = "right", EmitDefaultValue = false)] | ||
public Right right { get; set; } | ||
} | ||
} |