Goal.fromJson constructor

Goal.fromJson(
  1. Map json_
)

Implementation

Goal.fromJson(core.Map json_)
    : this(
        accountId: json_.containsKey('accountId')
            ? json_['accountId'] as core.String
            : null,
        active:
            json_.containsKey('active') ? json_['active'] as core.bool : null,
        created: json_.containsKey('created')
            ? core.DateTime.parse(json_['created'] as core.String)
            : null,
        eventDetails: json_.containsKey('eventDetails')
            ? GoalEventDetails.fromJson(
                json_['eventDetails'] as core.Map<core.String, core.dynamic>)
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        internalWebPropertyId: json_.containsKey('internalWebPropertyId')
            ? json_['internalWebPropertyId'] as core.String
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        parentLink: json_.containsKey('parentLink')
            ? GoalParentLink.fromJson(
                json_['parentLink'] as core.Map<core.String, core.dynamic>)
            : null,
        profileId: json_.containsKey('profileId')
            ? json_['profileId'] as core.String
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        updated: json_.containsKey('updated')
            ? core.DateTime.parse(json_['updated'] as core.String)
            : null,
        urlDestinationDetails: json_.containsKey('urlDestinationDetails')
            ? GoalUrlDestinationDetails.fromJson(
                json_['urlDestinationDetails']
                    as core.Map<core.String, core.dynamic>)
            : null,
        value: json_.containsKey('value')
            ? (json_['value'] as core.num).toDouble()
            : null,
        visitNumPagesDetails: json_.containsKey('visitNumPagesDetails')
            ? GoalVisitNumPagesDetails.fromJson(json_['visitNumPagesDetails']
                as core.Map<core.String, core.dynamic>)
            : null,
        visitTimeOnSiteDetails: json_.containsKey('visitTimeOnSiteDetails')
            ? GoalVisitTimeOnSiteDetails.fromJson(
                json_['visitTimeOnSiteDetails']
                    as core.Map<core.String, core.dynamic>)
            : null,
        webPropertyId: json_.containsKey('webPropertyId')
            ? json_['webPropertyId'] as core.String
            : null,
      );