コード例 #1
0
ファイル: ActionItem.cs プロジェクト: daltskin/SmartThingsNet
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionItem" /> class.
 /// </summary>
 /// <param name="displayType">To specify the type of UI component to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="statelessPowerToggle">statelessPowerToggle.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard. (default to &quot;main&quot;).</param>
 public ActionItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), StatelessPowerToggleForDashboard statelessPowerToggle = default(StatelessPowerToggleForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = "main")
 {
     this.DisplayType          = displayType;
     this.PushButton           = pushButton;
     this.ToggleSwitch         = toggleSwitch;
     this.Switch               = _switch;
     this.StandbyPowerSwitch   = standbyPowerSwitch;
     this.StatelessPowerToggle = statelessPowerToggle;
     this.PlayPause            = playPause;
     this.PlayStop             = playStop;
     // use default value if no "group" provided
     this.Group = group ?? "main";
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionsArrayItem" /> class.
 /// </summary>
 /// <param name="displayType">To specify the type of UI component to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="statelessPowerToggle">statelessPowerToggle.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard. (default to &quot;main&quot;).</param>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="component">component (default to &quot;main&quot;).</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public ActionsArrayItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), StatelessPowerToggleForDashboard statelessPowerToggle = default(StatelessPowerToggleForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = "main", string capability = default(string), int version = 1, string component = "main", VisibleCondition visibleCondition = default(VisibleCondition))
 {
     this.DisplayType = displayType;
     // to ensure "capability" is required (not null)
     if (capability == null)
     {
         throw new ArgumentNullException("capability is a required property for ActionsArrayItem and cannot be null");
     }
     this.Capability           = capability;
     this.PushButton           = pushButton;
     this.ToggleSwitch         = toggleSwitch;
     this.Switch               = _switch;
     this.StandbyPowerSwitch   = standbyPowerSwitch;
     this.StatelessPowerToggle = statelessPowerToggle;
     this.PlayPause            = playPause;
     this.PlayStop             = playStop;
     // use default value if no "group" provided
     this.Group    = group ?? "main";
     this._Version = version;
     // use default value if no "component" provided
     this.Component        = component ?? "main";
     this.VisibleCondition = visibleCondition;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionItem" /> class.
 /// </summary>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard..</param>
 public ActionItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = default(string)) : base()
 {
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionItemAllOf" /> class.
 /// </summary>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard..</param>
 public ActionItemAllOf(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = default(string))
 {
     this.DisplayType        = displayType;
     this.PushButton         = pushButton;
     this.ToggleSwitch       = toggleSwitch;
     this.Switch             = _switch;
     this.StandbyPowerSwitch = standbyPowerSwitch;
     this.PlayPause          = playPause;
     this.PlayStop           = playStop;
     this.Group = group;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionsArrayItem" /> class.
 /// </summary>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard..</param>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="component">component.</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public ActionsArrayItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = default(string), string capability = default(string), int version = 1, string component = default(string), VisibleCondition visibleCondition = default(VisibleCondition))
 {
     this.DisplayType = displayType;
     // to ensure "capability" is required (not null)
     this.Capability         = capability ?? throw new ArgumentNullException("capability is a required property for ActionsArrayItem and cannot be null");
     this.PushButton         = pushButton;
     this.ToggleSwitch       = toggleSwitch;
     this.Switch             = _switch;
     this.StandbyPowerSwitch = standbyPowerSwitch;
     this.PlayPause          = playPause;
     this.PlayStop           = playStop;
     this.Group            = group;
     this.Version          = version;
     this.Component        = component;
     this.VisibleCondition = visibleCondition;
 }