GoogleCloudDocumentaiV1beta2Document.fromJson constructor

GoogleCloudDocumentaiV1beta2Document.fromJson(
  1. Map _json
)

Implementation

GoogleCloudDocumentaiV1beta2Document.fromJson(core.Map _json)
    : this(
        content: _json.containsKey('content')
            ? _json['content'] as core.String
            : null,
        entities: _json.containsKey('entities')
            ? (_json['entities'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentEntity>((value) =>
                    GoogleCloudDocumentaiV1beta2DocumentEntity.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        entityRelations: _json.containsKey('entityRelations')
            ? (_json['entityRelations'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentEntityRelation>(
                    (value) =>
                        GoogleCloudDocumentaiV1beta2DocumentEntityRelation
                            .fromJson(
                                value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        error: _json.containsKey('error')
            ? GoogleRpcStatus.fromJson(
                _json['error'] as core.Map<core.String, core.dynamic>)
            : null,
        labels: _json.containsKey('labels')
            ? (_json['labels'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentLabel>((value) =>
                    GoogleCloudDocumentaiV1beta2DocumentLabel.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        mimeType: _json.containsKey('mimeType')
            ? _json['mimeType'] as core.String
            : null,
        pages: _json.containsKey('pages')
            ? (_json['pages'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPage>((value) =>
                    GoogleCloudDocumentaiV1beta2DocumentPage.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        revisions: _json.containsKey('revisions')
            ? (_json['revisions'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentRevision>((value) =>
                    GoogleCloudDocumentaiV1beta2DocumentRevision.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        shardInfo: _json.containsKey('shardInfo')
            ? GoogleCloudDocumentaiV1beta2DocumentShardInfo.fromJson(
                _json['shardInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        text: _json.containsKey('text') ? _json['text'] as core.String : null,
        textChanges: _json.containsKey('textChanges')
            ? (_json['textChanges'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentTextChange>(
                    (value) => GoogleCloudDocumentaiV1beta2DocumentTextChange
                        .fromJson(
                            value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        textStyles: _json.containsKey('textStyles')
            ? (_json['textStyles'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentStyle>((value) =>
                    GoogleCloudDocumentaiV1beta2DocumentStyle.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        uri: _json.containsKey('uri') ? _json['uri'] as core.String : null,
      );