Device constructor

Device({
  1. String? id,
  2. String? name,
  3. Int64? numId,
  4. Timestamp? lastHeartbeatTime,
  5. Timestamp? lastEventTime,
  6. Timestamp? lastErrorTime,
  7. Status? lastErrorStatus,
  8. Iterable<DeviceCredential>? credentials,
  9. DeviceConfig? config,
  10. Timestamp? lastConfigAckTime,
  11. DeviceState? state,
  12. Map<String, String>? metadata,
  13. Timestamp? lastConfigSendTime,
  14. bool? blocked,
  15. Timestamp? lastStateTime,
  16. LogLevel? logLevel,
  17. 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;
}