toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'fingerprint'] = this.fingerprint;
  if (this.cores != null) {
    json[r'cores'] = this.cores;
  } else {
    json[r'cores'] = null;
  }
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
  if (this.ip != null) {
    json[r'ip'] = this.ip;
  } else {
    json[r'ip'] = null;
  }
  if (this.hostname != null) {
    json[r'hostname'] = this.hostname;
  } else {
    json[r'hostname'] = null;
  }
  if (this.platform != null) {
    json[r'platform'] = this.platform;
  } else {
    json[r'platform'] = null;
  }
  if (this.maxProcesses != null) {
    json[r'maxProcesses'] = this.maxProcesses;
  } else {
    json[r'maxProcesses'] = null;
  }
  if (this.requireHeartbeat != null) {
    json[r'requireHeartbeat'] = this.requireHeartbeat;
  } else {
    json[r'requireHeartbeat'] = null;
  }
  if (this.heartbeatStatus != null) {
    json[r'heartbeatStatus'] = this.heartbeatStatus;
  } else {
    json[r'heartbeatStatus'] = null;
  }
  if (this.heartbeatDuration != null) {
    json[r'heartbeatDuration'] = this.heartbeatDuration;
  } else {
    json[r'heartbeatDuration'] = null;
  }
  if (this.lastHeartbeat != null) {
    json[r'lastHeartbeat'] = this.lastHeartbeat!.toUtc().toIso8601String();
  } else {
    json[r'lastHeartbeat'] = null;
  }
  if (this.nextHeartbeat != null) {
    json[r'nextHeartbeat'] = this.nextHeartbeat!.toUtc().toIso8601String();
  } else {
    json[r'nextHeartbeat'] = null;
  }
  if (this.lastCheckOut != null) {
    json[r'lastCheckOut'] = this.lastCheckOut!.toUtc().toIso8601String();
  } else {
    json[r'lastCheckOut'] = null;
  }
    json[r'metadata'] = this.metadata;
  if (this.created != null) {
    json[r'created'] = this.created!.toUtc().toIso8601String();
  } else {
    json[r'created'] = null;
  }
  if (this.updated != null) {
    json[r'updated'] = this.updated!.toUtc().toIso8601String();
  } else {
    json[r'updated'] = null;
  }
  return json;
}