toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var baseUrl = this.baseUrl;
  var buildDate = this.buildDate;
  var buildNumber = this.buildNumber;
  var deploymentType = this.deploymentType;
  var healthChecks = this.healthChecks;
  var scmInfo = this.scmInfo;
  var serverTime = this.serverTime;
  var serverTitle = this.serverTitle;
  var version = this.version;
  var versionNumbers = this.versionNumbers;

  final json = <String, Object?>{};
  if (baseUrl != null) {
    json[r'baseUrl'] = baseUrl;
  }
  if (buildDate != null) {
    json[r'buildDate'] = buildDate.toIso8601String();
  }
  if (buildNumber != null) {
    json[r'buildNumber'] = buildNumber;
  }
  if (deploymentType != null) {
    json[r'deploymentType'] = deploymentType;
  }
  json[r'healthChecks'] = healthChecks.map((i) => i.toJson()).toList();
  if (scmInfo != null) {
    json[r'scmInfo'] = scmInfo;
  }
  if (serverTime != null) {
    json[r'serverTime'] = serverTime.toIso8601String();
  }
  if (serverTitle != null) {
    json[r'serverTitle'] = serverTitle;
  }
  if (version != null) {
    json[r'version'] = version;
  }
  json[r'versionNumbers'] = versionNumbers;
  return json;
}