Model.fromJson constructor

Model.fromJson(
  1. Map json_
)

Implementation

Model.fromJson(core.Map json_)
    : this(
        bestTrialId: json_.containsKey('bestTrialId')
            ? json_['bestTrialId'] as core.String
            : null,
        creationTime: json_.containsKey('creationTime')
            ? json_['creationTime'] as core.String
            : null,
        defaultTrialId: json_.containsKey('defaultTrialId')
            ? json_['defaultTrialId'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        encryptionConfiguration: json_.containsKey('encryptionConfiguration')
            ? EncryptionConfiguration.fromJson(
                json_['encryptionConfiguration']
                    as core.Map<core.String, core.dynamic>)
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        expirationTime: json_.containsKey('expirationTime')
            ? json_['expirationTime'] as core.String
            : null,
        featureColumns: json_.containsKey('featureColumns')
            ? (json_['featureColumns'] as core.List)
                .map((value) => StandardSqlField.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        friendlyName: json_.containsKey('friendlyName')
            ? json_['friendlyName'] as core.String
            : null,
        hparamSearchSpaces: json_.containsKey('hparamSearchSpaces')
            ? HparamSearchSpaces.fromJson(json_['hparamSearchSpaces']
                as core.Map<core.String, core.dynamic>)
            : null,
        hparamTrials: json_.containsKey('hparamTrials')
            ? (json_['hparamTrials'] as core.List)
                .map((value) => HparamTuningTrial.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        labelColumns: json_.containsKey('labelColumns')
            ? (json_['labelColumns'] as core.List)
                .map((value) => StandardSqlField.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        lastModifiedTime: json_.containsKey('lastModifiedTime')
            ? json_['lastModifiedTime'] as core.String
            : null,
        location: json_.containsKey('location')
            ? json_['location'] as core.String
            : null,
        modelReference: json_.containsKey('modelReference')
            ? ModelReference.fromJson(json_['modelReference']
                as core.Map<core.String, core.dynamic>)
            : null,
        modelType: json_.containsKey('modelType')
            ? json_['modelType'] as core.String
            : null,
        optimalTrialIds: json_.containsKey('optimalTrialIds')
            ? (json_['optimalTrialIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        remoteModelInfo: json_.containsKey('remoteModelInfo')
            ? RemoteModelInfo.fromJson(json_['remoteModelInfo']
                as core.Map<core.String, core.dynamic>)
            : null,
        trainingRuns: json_.containsKey('trainingRuns')
            ? (json_['trainingRuns'] as core.List)
                .map((value) => TrainingRun.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        transformColumns: json_.containsKey('transformColumns')
            ? (json_['transformColumns'] as core.List)
                .map((value) => TransformColumn.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );