Esempio n. 1
0
 /// <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";
 }
Esempio n. 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;
 }