GoogleCloudDocumentaiV1beta2DocumentPage.fromJson constructor

GoogleCloudDocumentaiV1beta2DocumentPage.fromJson(
  1. Map _json
)

Implementation

GoogleCloudDocumentaiV1beta2DocumentPage.fromJson(core.Map _json)
    : this(
        blocks: _json.containsKey('blocks')
            ? (_json['blocks'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPageBlock>((value) =>
                    GoogleCloudDocumentaiV1beta2DocumentPageBlock.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        detectedLanguages: _json.containsKey('detectedLanguages')
            ? (_json['detectedLanguages'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage>(
                    (value) =>
                        GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage
                            .fromJson(
                                value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        dimension: _json.containsKey('dimension')
            ? GoogleCloudDocumentaiV1beta2DocumentPageDimension.fromJson(
                _json['dimension'] as core.Map<core.String, core.dynamic>)
            : null,
        formFields: _json.containsKey('formFields')
            ? (_json['formFields'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPageFormField>(
                    (value) =>
                        GoogleCloudDocumentaiV1beta2DocumentPageFormField
                            .fromJson(
                                value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        image: _json.containsKey('image')
            ? GoogleCloudDocumentaiV1beta2DocumentPageImage.fromJson(
                _json['image'] as core.Map<core.String, core.dynamic>)
            : null,
        layout: _json.containsKey('layout')
            ? GoogleCloudDocumentaiV1beta2DocumentPageLayout.fromJson(
                _json['layout'] as core.Map<core.String, core.dynamic>)
            : null,
        lines: _json.containsKey('lines')
            ? (_json['lines'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPageLine>((value) =>
                    GoogleCloudDocumentaiV1beta2DocumentPageLine.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        pageNumber: _json.containsKey('pageNumber')
            ? _json['pageNumber'] as core.int
            : null,
        paragraphs: _json.containsKey('paragraphs')
            ? (_json['paragraphs'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPageParagraph>(
                    (value) =>
                        GoogleCloudDocumentaiV1beta2DocumentPageParagraph
                            .fromJson(
                                value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        provenance: _json.containsKey('provenance')
            ? GoogleCloudDocumentaiV1beta2DocumentProvenance.fromJson(
                _json['provenance'] as core.Map<core.String, core.dynamic>)
            : null,
        tables: _json.containsKey('tables')
            ? (_json['tables'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPageTable>((value) =>
                    GoogleCloudDocumentaiV1beta2DocumentPageTable.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        tokens: _json.containsKey('tokens')
            ? (_json['tokens'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPageToken>((value) =>
                    GoogleCloudDocumentaiV1beta2DocumentPageToken.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        transforms: _json.containsKey('transforms')
            ? (_json['transforms'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPageMatrix>(
                    (value) => GoogleCloudDocumentaiV1beta2DocumentPageMatrix
                        .fromJson(
                            value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        visualElements: _json.containsKey('visualElements')
            ? (_json['visualElements'] as core.List)
                .map<GoogleCloudDocumentaiV1beta2DocumentPageVisualElement>(
                    (value) =>
                        GoogleCloudDocumentaiV1beta2DocumentPageVisualElement
                            .fromJson(
                                value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );