Experiment.fromJson constructor

Experiment.fromJson(
  1. Map json_
)

Implementation

Experiment.fromJson(core.Map json_)
    : this(
        accountId: json_.containsKey('accountId')
            ? json_['accountId'] as core.String
            : null,
        created: json_.containsKey('created')
            ? core.DateTime.parse(json_['created'] as core.String)
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        editableInGaUi: json_.containsKey('editableInGaUi')
            ? json_['editableInGaUi'] as core.bool
            : null,
        endTime: json_.containsKey('endTime')
            ? core.DateTime.parse(json_['endTime'] as core.String)
            : null,
        equalWeighting: json_.containsKey('equalWeighting')
            ? json_['equalWeighting'] as core.bool
            : 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,
        minimumExperimentLengthInDays:
            json_.containsKey('minimumExperimentLengthInDays')
                ? json_['minimumExperimentLengthInDays'] as core.int
                : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        objectiveMetric: json_.containsKey('objectiveMetric')
            ? json_['objectiveMetric'] as core.String
            : null,
        optimizationType: json_.containsKey('optimizationType')
            ? json_['optimizationType'] as core.String
            : null,
        parentLink: json_.containsKey('parentLink')
            ? ExperimentParentLink.fromJson(
                json_['parentLink'] as core.Map<core.String, core.dynamic>)
            : null,
        profileId: json_.containsKey('profileId')
            ? json_['profileId'] as core.String
            : null,
        reasonExperimentEnded: json_.containsKey('reasonExperimentEnded')
            ? json_['reasonExperimentEnded'] as core.String
            : null,
        rewriteVariationUrlsAsOriginal:
            json_.containsKey('rewriteVariationUrlsAsOriginal')
                ? json_['rewriteVariationUrlsAsOriginal'] as core.bool
                : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        servingFramework: json_.containsKey('servingFramework')
            ? json_['servingFramework'] as core.String
            : null,
        snippet: json_.containsKey('snippet')
            ? json_['snippet'] as core.String
            : null,
        startTime: json_.containsKey('startTime')
            ? core.DateTime.parse(json_['startTime'] as core.String)
            : null,
        status: json_.containsKey('status')
            ? json_['status'] as core.String
            : null,
        trafficCoverage: json_.containsKey('trafficCoverage')
            ? (json_['trafficCoverage'] as core.num).toDouble()
            : null,
        updated: json_.containsKey('updated')
            ? core.DateTime.parse(json_['updated'] as core.String)
            : null,
        variations: json_.containsKey('variations')
            ? (json_['variations'] as core.List)
                .map((value) => ExperimentVariations.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        webPropertyId: json_.containsKey('webPropertyId')
            ? json_['webPropertyId'] as core.String
            : null,
        winnerConfidenceLevel: json_.containsKey('winnerConfidenceLevel')
            ? (json_['winnerConfidenceLevel'] as core.num).toDouble()
            : null,
        winnerFound: json_.containsKey('winnerFound')
            ? json_['winnerFound'] as core.bool
            : null,
      );