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,
      );