Goal.fromJson constructor

Goal.fromJson(Map _json)

Implementation

Goal.fromJson(core.Map _json) {
  if (_json.containsKey("accountId")) {
    accountId = _json["accountId"];
  }
  if (_json.containsKey("active")) {
    active = _json["active"];
  }
  if (_json.containsKey("created")) {
    created = core.DateTime.parse(_json["created"]);
  }
  if (_json.containsKey("eventDetails")) {
    eventDetails = new GoalEventDetails.fromJson(_json["eventDetails"]);
  }
  if (_json.containsKey("id")) {
    id = _json["id"];
  }
  if (_json.containsKey("internalWebPropertyId")) {
    internalWebPropertyId = _json["internalWebPropertyId"];
  }
  if (_json.containsKey("kind")) {
    kind = _json["kind"];
  }
  if (_json.containsKey("name")) {
    name = _json["name"];
  }
  if (_json.containsKey("parentLink")) {
    parentLink = new GoalParentLink.fromJson(_json["parentLink"]);
  }
  if (_json.containsKey("profileId")) {
    profileId = _json["profileId"];
  }
  if (_json.containsKey("selfLink")) {
    selfLink = _json["selfLink"];
  }
  if (_json.containsKey("type")) {
    type = _json["type"];
  }
  if (_json.containsKey("updated")) {
    updated = core.DateTime.parse(_json["updated"]);
  }
  if (_json.containsKey("urlDestinationDetails")) {
    urlDestinationDetails = new GoalUrlDestinationDetails.fromJson(
        _json["urlDestinationDetails"]);
  }
  if (_json.containsKey("value")) {
    value = _json["value"].toDouble();
  }
  if (_json.containsKey("visitNumPagesDetails")) {
    visitNumPagesDetails =
        new GoalVisitNumPagesDetails.fromJson(_json["visitNumPagesDetails"]);
  }
  if (_json.containsKey("visitTimeOnSiteDetails")) {
    visitTimeOnSiteDetails = new GoalVisitTimeOnSiteDetails.fromJson(
        _json["visitTimeOnSiteDetails"]);
  }
  if (_json.containsKey("webPropertyId")) {
    webPropertyId = _json["webPropertyId"];
  }
}