Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Device" /> class.
 /// </summary>
 /// <param name="deviceId">The identifier for the Device instance. (required).</param>
 /// <param name="name">The name that the Device integration (Device Handler or SmartApp) defines for the Device..</param>
 /// <param name="label">The name that a user chooses for the Device. This defaults to the same value as name..</param>
 /// <param name="manufacturerName">The Device manufacturer name. (required).</param>
 /// <param name="presentationId">A non-unique id that is used to help drive UI information. (required).</param>
 /// <param name="deviceManufacturerCode">The Device manufacturer code..</param>
 /// <param name="locationId">The ID of the Location with which the Device is associated..</param>
 /// <param name="ownerId">The identifier for the owner of the Device instance..</param>
 /// <param name="roomId">The ID of the Room with which the Device is associated. If the Device is not associated with any room, this field will be null..</param>
 /// <param name="deviceTypeId">Deprecated please look under \&quot;dth\&quot;..</param>
 /// <param name="deviceTypeName">Deprecated please look under \&quot;dth\&quot;..</param>
 /// <param name="deviceNetworkType">Deprecated please look under \&quot;dth\&quot;..</param>
 /// <param name="components">The IDs of all compenents on the Device..</param>
 /// <param name="createTime">The time when the device was created at..</param>
 /// <param name="parentDeviceId">The id of the Parent device..</param>
 /// <param name="childDevices">Device details for all child devices of the Device..</param>
 /// <param name="profile">profile.</param>
 /// <param name="app">app.</param>
 /// <param name="ble">ble.</param>
 /// <param name="bleD2D">bleD2D.</param>
 /// <param name="dth">dth.</param>
 /// <param name="lan">lan.</param>
 /// <param name="zigbee">zigbee.</param>
 /// <param name="zwave">zwave.</param>
 /// <param name="matter">matter.</param>
 /// <param name="ir">ir.</param>
 /// <param name="irOcf">irOcf.</param>
 /// <param name="ocf">ocf.</param>
 /// <param name="viper">viper.</param>
 /// <param name="type">type (required).</param>
 /// <param name="restrictionTier">Restriction tier of the device, if any. (required).</param>
 /// <param name="allowed">List of client-facing action identifiers that are currently permitted for the user. If the value of this property is not null, then any action not included in the list value of the property is currently prohibited for the user.   &lt;ul&gt;   &lt;li&gt; w:devices - the user can change device details   &lt;li&gt; w:devices:locationId - the user can move the device from a location   &lt;li&gt; w:devices:roomId - the user can move or remove the device from a room   &lt;li&gt; x:devices - the user can execute commands on the device   &lt;li&gt; d:devices - the user can uninstall the device   &lt;/ul&gt; .</param>
 public Device(string deviceId = default(string), string name = default(string), string label = default(string), string manufacturerName = default(string), string presentationId = default(string), string deviceManufacturerCode = default(string), string locationId = default(string), string ownerId = default(string), string roomId = default(string), string deviceTypeId = default(string), string deviceTypeName = default(string), string deviceNetworkType = default(string), List <DeviceComponent> components = default(List <DeviceComponent>), string createTime = default(string), string parentDeviceId = default(string), List <Device> childDevices = default(List <Device>), DeviceProfileReference profile = default(DeviceProfileReference), AppDeviceDetails app = default(AppDeviceDetails), Object ble = default(Object), BleD2DDeviceDetails bleD2D = default(BleD2DDeviceDetails), DthDeviceDetails dth = default(DthDeviceDetails), LanDeviceDetails lan = default(LanDeviceDetails), ZigbeeDeviceDetails zigbee = default(ZigbeeDeviceDetails), ZwaveDeviceDetails zwave = default(ZwaveDeviceDetails), MatterDeviceDetails matter = default(MatterDeviceDetails), IrDeviceDetails ir = default(IrDeviceDetails), IrDeviceDetails irOcf = default(IrDeviceDetails), OcfDeviceDetails ocf = default(OcfDeviceDetails), ViperDeviceDetails viper = default(ViperDeviceDetails), DeviceIntegrationType type = default(DeviceIntegrationType), int restrictionTier = default(int), List <string> allowed = default(List <string>))
 {
     // to ensure "deviceId" is required (not null)
     if (deviceId == null)
     {
         throw new ArgumentNullException("deviceId is a required property for Device and cannot be null");
     }
     this.DeviceId = deviceId;
     // to ensure "manufacturerName" is required (not null)
     if (manufacturerName == null)
     {
         throw new ArgumentNullException("manufacturerName is a required property for Device and cannot be null");
     }
     this.ManufacturerName = manufacturerName;
     // to ensure "presentationId" is required (not null)
     if (presentationId == null)
     {
         throw new ArgumentNullException("presentationId is a required property for Device and cannot be null");
     }
     this.PresentationId         = presentationId;
     this.Type                   = type;
     this.RestrictionTier        = restrictionTier;
     this.Name                   = name;
     this.Label                  = label;
     this.DeviceManufacturerCode = deviceManufacturerCode;
     this.LocationId             = locationId;
     this.OwnerId                = ownerId;
     this.RoomId                 = roomId;
     this.DeviceTypeId           = deviceTypeId;
     this.DeviceTypeName         = deviceTypeName;
     this.DeviceNetworkType      = deviceNetworkType;
     this.Components             = components;
     this.CreateTime             = createTime;
     this.ParentDeviceId         = parentDeviceId;
     this.ChildDevices           = childDevices;
     this.Profile                = profile;
     this.App     = app;
     this.Ble     = ble;
     this.BleD2D  = bleD2D;
     this.Dth     = dth;
     this.Lan     = lan;
     this.Zigbee  = zigbee;
     this.Zwave   = zwave;
     this.Matter  = matter;
     this.Ir      = ir;
     this.IrOcf   = irOcf;
     this.Ocf     = ocf;
     this.Viper   = viper;
     this.Allowed = allowed;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Device" /> class.
 /// </summary>
 /// <param name="deviceId">The identifier for the device instance..</param>
 /// <param name="name">The name that the device integration (Device Handler or SmartApp) defines for the device..</param>
 /// <param name="label">The name that a user chooses for the device. This defaults to the same value as name..</param>
 /// <param name="deviceManufacturerCode">The device manufacturer code..</param>
 /// <param name="locationId">The ID of the Location with which the device is associated..</param>
 /// <param name="roomId">The ID of the Room with which the device is associated. If the device is not associated with any room, then this field will be null..</param>
 /// <param name="deviceTypeId">Deprecated please look under \&quot;dth\&quot;..</param>
 /// <param name="deviceTypeName">Deprecated please look under \&quot;dth\&quot;..</param>
 /// <param name="deviceNetworkType">Deprecated please look under \&quot;dth\&quot;..</param>
 /// <param name="components">The IDs of all compenents on the device..</param>
 /// <param name="childDevices">Device details for all child devices of the device..</param>
 /// <param name="profile">profile.</param>
 /// <param name="app">app.</param>
 /// <param name="dth">dth.</param>
 /// <param name="ir">ir.</param>
 /// <param name="irOcf">irOcf.</param>
 /// <param name="viper">viper.</param>
 /// <param name="type">type.</param>
 /// <param name="restrictionTier">Restriction tier of the device, if any..</param>
 public Device(string deviceId = default(string), string name = default(string), string label = default(string), string deviceManufacturerCode = default(string), string locationId = default(string), string roomId = default(string), string deviceTypeId = default(string), string deviceTypeName = default(string), string deviceNetworkType = default(string), List <DeviceComponent> components = default(List <DeviceComponent>), List <Device> childDevices = default(List <Device>), DeviceProfileReference profile = default(DeviceProfileReference), AppDeviceDetails app = default(AppDeviceDetails), DthDeviceDetails dth = default(DthDeviceDetails), IrDeviceDetails ir = default(IrDeviceDetails), IrDeviceDetails irOcf = default(IrDeviceDetails), ViperDeviceDetails viper = default(ViperDeviceDetails), DeviceIntegrationType?type = default(DeviceIntegrationType?), int restrictionTier = default(int))
 {
     this.DeviceId = deviceId;
     this.Name     = name;
     this.Label    = label;
     this.DeviceManufacturerCode = deviceManufacturerCode;
     this.LocationId             = locationId;
     this.RoomId            = roomId;
     this.DeviceTypeId      = deviceTypeId;
     this.DeviceTypeName    = deviceTypeName;
     this.DeviceNetworkType = deviceNetworkType;
     this.Components        = components;
     this.ChildDevices      = childDevices;
     this.Profile           = profile;
     this.App             = app;
     this.Dth             = dth;
     this.Ir              = ir;
     this.IrOcf           = irOcf;
     this.Viper           = viper;
     this.Type            = type;
     this.RestrictionTier = restrictionTier;
 }