Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationListItem" /> class.
 /// </summary>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="label">label (required).</param>
 /// <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="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="textField">textField.</param>
 /// <param name="enumSlider">enumSlider.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 /// <param name="exclusion">To exclude specified automation in &#x60;exclude&#x60; when this item is selected by the user..</param>
 /// <param name="component">component (default to &quot;main&quot;).</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public AutomationListItem(string capability = default(string), int version = 1, string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationCondition slider = default(SliderForAutomationCondition), ListForAutomationCondition list = default(ListForAutomationCondition), NumberFieldForAutomationCondition numberField = default(NumberFieldForAutomationCondition), TextFieldForAutomationCondition textField = default(TextFieldForAutomationCondition), EnumSliderForAutomationCondition enumSlider = default(EnumSliderForAutomationCondition), bool emphasis = default(bool), List <ExcludedConditionItem> exclusion = default(List <ExcludedConditionItem>), string component = "main", VisibleCondition visibleCondition = default(VisibleCondition))
 {
     // to ensure "capability" is required (not null)
     if (capability == null)
     {
         throw new ArgumentNullException("capability is a required property for AutomationListItem and cannot be null");
     }
     this.Capability = capability;
     // to ensure "label" is required (not null)
     if (label == null)
     {
         throw new ArgumentNullException("label is a required property for AutomationListItem and cannot be null");
     }
     this.Label       = label;
     this.DisplayType = displayType;
     this._Version    = version;
     this.Slider      = slider;
     this.List        = list;
     this.NumberField = numberField;
     this.TextField   = textField;
     this.EnumSlider  = enumSlider;
     this.Emphasis    = emphasis;
     this.Exclusion   = exclusion;
     // use default value if no "component" provided
     this.Component        = component ?? "main";
     this.VisibleCondition = visibleCondition;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationListItem" /> class.
 /// </summary>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="label">label (required).</param>
 /// <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="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="textField">textField.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 /// <param name="component">component.</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public AutomationListItem(string capability = default(string), int version = 1, string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationCondition slider = default(SliderForAutomationCondition), ListForAutomationCondition list = default(ListForAutomationCondition), NumberFieldForAutomationCondition numberField = default(NumberFieldForAutomationCondition), TextFieldForAutomationCondition textField = default(TextFieldForAutomationCondition), bool emphasis = default(bool), string component = default(string), VisibleCondition visibleCondition = default(VisibleCondition))
 {
     // to ensure "capability" is required (not null)
     this.Capability = capability ?? throw new ArgumentNullException("capability is a required property for AutomationListItem and cannot be null");
     // to ensure "label" is required (not null)
     this.Label            = label ?? throw new ArgumentNullException("label is a required property for AutomationListItem and cannot be null");
     this.DisplayType      = displayType;
     this.Version          = version;
     this.Slider           = slider;
     this.List             = list;
     this.NumberField      = numberField;
     this.TextField        = textField;
     this.Emphasis         = emphasis;
     this.Component        = component;
     this.VisibleCondition = visibleCondition;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationForCapabilityConditions" /> class.
 /// </summary>
 /// <param name="label">label (required).</param>
 /// <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="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="textField">textField.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 public AutomationForCapabilityConditions(string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationCondition slider = default(SliderForAutomationCondition), ListForAutomationCondition list = default(ListForAutomationCondition), NumberFieldForAutomationCondition numberField = default(NumberFieldForAutomationCondition), TextFieldForAutomationCondition textField = default(TextFieldForAutomationCondition), bool emphasis = default(bool))
 {
     // to ensure "label" is required (not null)
     this.Label       = label ?? throw new ArgumentNullException("label is a required property for AutomationForCapabilityConditions and cannot be null");
     this.DisplayType = displayType;
     this.Slider      = slider;
     this.List        = list;
     this.NumberField = numberField;
     this.TextField   = textField;
     this.Emphasis    = emphasis;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationCondition" /> class.
 /// </summary>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="label">label (required).</param>
 /// <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="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="textField">textField.</param>
 /// <param name="enumSlider">enumSlider.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 public AutomationCondition(string capability = default(string), int version = 1, string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationCondition slider = default(SliderForAutomationCondition), ListForAutomationCondition list = default(ListForAutomationCondition), NumberFieldForAutomationCondition numberField = default(NumberFieldForAutomationCondition), TextFieldForAutomationCondition textField = default(TextFieldForAutomationCondition), EnumSliderForAutomationCondition enumSlider = default(EnumSliderForAutomationCondition), bool emphasis = default(bool))
 {
     // to ensure "capability" is required (not null)
     if (capability == null)
     {
         throw new ArgumentNullException("capability is a required property for AutomationCondition and cannot be null");
     }
     this.Capability = capability;
     // to ensure "label" is required (not null)
     if (label == null)
     {
         throw new ArgumentNullException("label is a required property for AutomationCondition and cannot be null");
     }
     this.Label       = label;
     this.DisplayType = displayType;
     this._Version    = version;
     this.Slider      = slider;
     this.List        = list;
     this.NumberField = numberField;
     this.TextField   = textField;
     this.EnumSlider  = enumSlider;
     this.Emphasis    = emphasis;
 }