Model.fromJson constructor

Model.fromJson(
  1. Map json_
)

Implementation

Model.fromJson(core.Map json_)
    : this(
        activeOperations: json_.containsKey('activeOperations')
            ? (json_['activeOperations'] as core.List)
                .map((value) => Operation.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        modelHash: json_.containsKey('modelHash')
            ? json_['modelHash'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        state: json_.containsKey('state')
            ? ModelState.fromJson(
                json_['state'] as core.Map<core.String, core.dynamic>)
            : null,
        tags: json_.containsKey('tags')
            ? (json_['tags'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        tfliteModel: json_.containsKey('tfliteModel')
            ? TfLiteModel.fromJson(
                json_['tfliteModel'] as core.Map<core.String, core.dynamic>)
            : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
      );