Device constructor
Device({
- String? id,
- String? name,
- Int64? numId,
- Timestamp? lastHeartbeatTime,
- Timestamp? lastEventTime,
- Timestamp? lastErrorTime,
- Status? lastErrorStatus,
- Iterable<
DeviceCredential> ? credentials, - DeviceConfig? config,
- Timestamp? lastConfigAckTime,
- DeviceState? state,
- Map<
String, String> ? metadata, - Timestamp? lastConfigSendTime,
- bool? blocked,
- Timestamp? lastStateTime,
- LogLevel? logLevel,
- GatewayConfig? gatewayConfig,
Implementation
factory Device({
$core.String? id,
$core.String? name,
$fixnum.Int64? numId,
$2.Timestamp? lastHeartbeatTime,
$2.Timestamp? lastEventTime,
$2.Timestamp? lastErrorTime,
$19.Status? lastErrorStatus,
$core.Iterable<DeviceCredential>? credentials,
DeviceConfig? config,
$2.Timestamp? lastConfigAckTime,
DeviceState? state,
$core.Map<$core.String, $core.String>? metadata,
$2.Timestamp? lastConfigSendTime,
$core.bool? blocked,
$2.Timestamp? lastStateTime,
LogLevel? logLevel,
GatewayConfig? gatewayConfig,
}) {
final $result = create();
if (id != null) {
$result.id = id;
}
if (name != null) {
$result.name = name;
}
if (numId != null) {
$result.numId = numId;
}
if (lastHeartbeatTime != null) {
$result.lastHeartbeatTime = lastHeartbeatTime;
}
if (lastEventTime != null) {
$result.lastEventTime = lastEventTime;
}
if (lastErrorTime != null) {
$result.lastErrorTime = lastErrorTime;
}
if (lastErrorStatus != null) {
$result.lastErrorStatus = lastErrorStatus;
}
if (credentials != null) {
$result.credentials.addAll(credentials);
}
if (config != null) {
$result.config = config;
}
if (lastConfigAckTime != null) {
$result.lastConfigAckTime = lastConfigAckTime;
}
if (state != null) {
$result.state = state;
}
if (metadata != null) {
$result.metadata.addAll(metadata);
}
if (lastConfigSendTime != null) {
$result.lastConfigSendTime = lastConfigSendTime;
}
if (blocked != null) {
$result.blocked = blocked;
}
if (lastStateTime != null) {
$result.lastStateTime = lastStateTime;
}
if (logLevel != null) {
$result.logLevel = logLevel;
}
if (gatewayConfig != null) {
$result.gatewayConfig = gatewayConfig;
}
return $result;
}