Class DeviceInfo
java.lang.Object
com.cumulocity.microservice.lpwan.codec.model.DeviceInfo
The DeviceInfo class uniquely represents one device with the device manufacturer name, the device model.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDeviceInfo
(@NotBlank String deviceManufacturer, @NotBlank String deviceModel) Instantiates a new DeviceInfo.DeviceInfo
(@NotBlank String deviceManufacturer, @NotBlank String deviceModel, @Null Set<DeviceCommand> supportedCommands) DeviceInfo
(@NotNull Map<String, String> properties) -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the manufacturer, model and the supported commands for a devicevoid
validate()
This method validates the object field.
-
Field Details
-
DEVICE_MANUFACTURER
- See Also:
-
DEVICE_MODEL
- See Also:
-
-
Constructor Details
-
DeviceInfo
public DeviceInfo(@NotBlank @NotBlank String deviceManufacturer, @NotBlank @NotBlank String deviceModel) Instantiates a new DeviceInfo.- Parameters:
deviceManufacturer
- represents the name of the device manufacturer.deviceModel
- represents the name of the device model.
-
DeviceInfo
public DeviceInfo(@NotBlank @NotBlank String deviceManufacturer, @NotBlank @NotBlank String deviceModel, @Null @Null Set<DeviceCommand> supportedCommands) -
DeviceInfo
-
-
Method Details
-
getAttributes
This method returns the manufacturer, model and the supported commands for a device- Returns:
- Map The resultant map consisting of the attributes of the device
-
validate
public void validate()This method validates the object field.- Throws:
IllegalArgumentException
- if the field marked with @NotBlank are either null or blank.- See Also:
-