DataSource.fromJson constructor

DataSource.fromJson(
  1. Map _json
)

Implementation

DataSource.fromJson(core.Map _json) {
  if (_json.containsKey("authorizationType")) {
    authorizationType = _json["authorizationType"];
  }
  if (_json.containsKey("clientId")) {
    clientId = _json["clientId"];
  }
  if (_json.containsKey("dataRefreshType")) {
    dataRefreshType = _json["dataRefreshType"];
  }
  if (_json.containsKey("dataSourceId")) {
    dataSourceId = _json["dataSourceId"];
  }
  if (_json.containsKey("defaultDataRefreshWindowDays")) {
    defaultDataRefreshWindowDays = _json["defaultDataRefreshWindowDays"];
  }
  if (_json.containsKey("defaultSchedule")) {
    defaultSchedule = _json["defaultSchedule"];
  }
  if (_json.containsKey("description")) {
    description = _json["description"];
  }
  if (_json.containsKey("displayName")) {
    displayName = _json["displayName"];
  }
  if (_json.containsKey("helpUrl")) {
    helpUrl = _json["helpUrl"];
  }
  if (_json.containsKey("manualRunsDisabled")) {
    manualRunsDisabled = _json["manualRunsDisabled"];
  }
  if (_json.containsKey("minimumScheduleInterval")) {
    minimumScheduleInterval = _json["minimumScheduleInterval"];
  }
  if (_json.containsKey("name")) {
    name = _json["name"];
  }
  if (_json.containsKey("parameters")) {
    parameters = (_json["parameters"] as core.List)
        .map<DataSourceParameter>(
            (value) => new DataSourceParameter.fromJson(value))
        .toList();
  }
  if (_json.containsKey("scopes")) {
    scopes = (_json["scopes"] as core.List).cast<core.String>();
  }
  if (_json.containsKey("supportsCustomSchedule")) {
    supportsCustomSchedule = _json["supportsCustomSchedule"];
  }
  if (_json.containsKey("supportsMultipleTransfers")) {
    supportsMultipleTransfers = _json["supportsMultipleTransfers"];
  }
  if (_json.containsKey("transferType")) {
    transferType = _json["transferType"];
  }
  if (_json.containsKey("updateDeadlineSeconds")) {
    updateDeadlineSeconds = _json["updateDeadlineSeconds"];
  }
}