AnnotateImageResponse.fromJson constructor

AnnotateImageResponse.fromJson(
  1. Map json_
)

Implementation

AnnotateImageResponse.fromJson(core.Map json_)
    : this(
        context: json_.containsKey('context')
            ? ImageAnnotationContext.fromJson(
                json_['context'] as core.Map<core.String, core.dynamic>)
            : null,
        cropHintsAnnotation: json_.containsKey('cropHintsAnnotation')
            ? CropHintsAnnotation.fromJson(json_['cropHintsAnnotation']
                as core.Map<core.String, core.dynamic>)
            : null,
        error: json_.containsKey('error')
            ? Status.fromJson(
                json_['error'] as core.Map<core.String, core.dynamic>)
            : null,
        faceAnnotations: json_.containsKey('faceAnnotations')
            ? (json_['faceAnnotations'] as core.List)
                .map((value) => FaceAnnotation.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        fullTextAnnotation: json_.containsKey('fullTextAnnotation')
            ? TextAnnotation.fromJson(json_['fullTextAnnotation']
                as core.Map<core.String, core.dynamic>)
            : null,
        imagePropertiesAnnotation:
            json_.containsKey('imagePropertiesAnnotation')
                ? ImageProperties.fromJson(json_['imagePropertiesAnnotation']
                    as core.Map<core.String, core.dynamic>)
                : null,
        labelAnnotations: json_.containsKey('labelAnnotations')
            ? (json_['labelAnnotations'] as core.List)
                .map((value) => EntityAnnotation.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        landmarkAnnotations: json_.containsKey('landmarkAnnotations')
            ? (json_['landmarkAnnotations'] as core.List)
                .map((value) => EntityAnnotation.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        localizedObjectAnnotations:
            json_.containsKey('localizedObjectAnnotations')
                ? (json_['localizedObjectAnnotations'] as core.List)
                    .map((value) => LocalizedObjectAnnotation.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                    .toList()
                : null,
        logoAnnotations: json_.containsKey('logoAnnotations')
            ? (json_['logoAnnotations'] as core.List)
                .map((value) => EntityAnnotation.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        productSearchResults: json_.containsKey('productSearchResults')
            ? ProductSearchResults.fromJson(json_['productSearchResults']
                as core.Map<core.String, core.dynamic>)
            : null,
        safeSearchAnnotation: json_.containsKey('safeSearchAnnotation')
            ? SafeSearchAnnotation.fromJson(json_['safeSearchAnnotation']
                as core.Map<core.String, core.dynamic>)
            : null,
        textAnnotations: json_.containsKey('textAnnotations')
            ? (json_['textAnnotations'] as core.List)
                .map((value) => EntityAnnotation.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        webDetection: json_.containsKey('webDetection')
            ? WebDetection.fromJson(
                json_['webDetection'] as core.Map<core.String, core.dynamic>)
            : null,
      );