GoogleCloudDocumentaiV1beta1Document.fromJson constructor
GoogleCloudDocumentaiV1beta1Document.fromJson(
- Map _json
Implementation
GoogleCloudDocumentaiV1beta1Document.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<GoogleCloudDocumentaiV1beta1DocumentEntity>((value) =>
GoogleCloudDocumentaiV1beta1DocumentEntity.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
entityRelations: _json.containsKey('entityRelations')
? (_json['entityRelations'] as core.List)
.map<GoogleCloudDocumentaiV1beta1DocumentEntityRelation>(
(value) =>
GoogleCloudDocumentaiV1beta1DocumentEntityRelation
.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,
mimeType: _json.containsKey('mimeType')
? _json['mimeType'] as core.String
: null,
pages: _json.containsKey('pages')
? (_json['pages'] as core.List)
.map<GoogleCloudDocumentaiV1beta1DocumentPage>((value) =>
GoogleCloudDocumentaiV1beta1DocumentPage.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
revisions: _json.containsKey('revisions')
? (_json['revisions'] as core.List)
.map<GoogleCloudDocumentaiV1beta1DocumentRevision>((value) =>
GoogleCloudDocumentaiV1beta1DocumentRevision.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
shardInfo: _json.containsKey('shardInfo')
? GoogleCloudDocumentaiV1beta1DocumentShardInfo.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<GoogleCloudDocumentaiV1beta1DocumentTextChange>(
(value) => GoogleCloudDocumentaiV1beta1DocumentTextChange
.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
textStyles: _json.containsKey('textStyles')
? (_json['textStyles'] as core.List)
.map<GoogleCloudDocumentaiV1beta1DocumentStyle>((value) =>
GoogleCloudDocumentaiV1beta1DocumentStyle.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
uri: _json.containsKey('uri') ? _json['uri'] as core.String : null,
);