MonitoredResourceDescriptor.fromJson constructor

MonitoredResourceDescriptor.fromJson(
  1. Map _json
)

Implementation

MonitoredResourceDescriptor.fromJson(core.Map _json) {
  if (_json.containsKey("description")) {
    description = _json["description"];
  }
  if (_json.containsKey("displayName")) {
    displayName = _json["displayName"];
  }
  if (_json.containsKey("labels")) {
    labels = (_json["labels"] as core.List)
        .map<LabelDescriptor>((value) => new LabelDescriptor.fromJson(value))
        .toList();
  }
  if (_json.containsKey("launchStage")) {
    launchStage = _json["launchStage"];
  }
  if (_json.containsKey("name")) {
    name = _json["name"];
  }
  if (_json.containsKey("type")) {
    type = _json["type"];
  }
}