GoogleCloudVideointelligenceV1VideoAnnotationResults.fromJson constructor

GoogleCloudVideointelligenceV1VideoAnnotationResults.fromJson(
  1. Map _json
)

Implementation

GoogleCloudVideointelligenceV1VideoAnnotationResults.fromJson(
    core.Map _json) {
  if (_json.containsKey("error")) {
    error = new GoogleRpcStatus.fromJson(_json["error"]);
  }
  if (_json.containsKey("explicitAnnotation")) {
    explicitAnnotation =
        new GoogleCloudVideointelligenceV1ExplicitContentAnnotation.fromJson(
            _json["explicitAnnotation"]);
  }
  if (_json.containsKey("frameLabelAnnotations")) {
    frameLabelAnnotations = (_json["frameLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1LabelAnnotation.fromJson(value))
        .toList();
  }
  if (_json.containsKey("inputUri")) {
    inputUri = _json["inputUri"];
  }
  if (_json.containsKey("logoRecognitionAnnotations")) {
    logoRecognitionAnnotations = (_json["logoRecognitionAnnotations"]
            as core.List)
        .map<GoogleCloudVideointelligenceV1LogoRecognitionAnnotation>(
            (value) =>
                new GoogleCloudVideointelligenceV1LogoRecognitionAnnotation
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("objectAnnotations")) {
    objectAnnotations = (_json["objectAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1ObjectTrackingAnnotation>(
            (value) =>
                new GoogleCloudVideointelligenceV1ObjectTrackingAnnotation
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("segment")) {
    segment = new GoogleCloudVideointelligenceV1VideoSegment.fromJson(
        _json["segment"]);
  }
  if (_json.containsKey("segmentLabelAnnotations")) {
    segmentLabelAnnotations = (_json["segmentLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1LabelAnnotation.fromJson(value))
        .toList();
  }
  if (_json.containsKey("segmentPresenceLabelAnnotations")) {
    segmentPresenceLabelAnnotations = (_json[
            "segmentPresenceLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1LabelAnnotation.fromJson(value))
        .toList();
  }
  if (_json.containsKey("shotAnnotations")) {
    shotAnnotations = (_json["shotAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1VideoSegment>((value) =>
            new GoogleCloudVideointelligenceV1VideoSegment.fromJson(value))
        .toList();
  }
  if (_json.containsKey("shotLabelAnnotations")) {
    shotLabelAnnotations = (_json["shotLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1LabelAnnotation.fromJson(value))
        .toList();
  }
  if (_json.containsKey("shotPresenceLabelAnnotations")) {
    shotPresenceLabelAnnotations = (_json["shotPresenceLabelAnnotations"]
            as core.List)
        .map<GoogleCloudVideointelligenceV1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1LabelAnnotation.fromJson(value))
        .toList();
  }
  if (_json.containsKey("speechTranscriptions")) {
    speechTranscriptions = (_json["speechTranscriptions"] as core.List)
        .map<GoogleCloudVideointelligenceV1SpeechTranscription>((value) =>
            new GoogleCloudVideointelligenceV1SpeechTranscription.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("textAnnotations")) {
    textAnnotations = (_json["textAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1TextAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1TextAnnotation.fromJson(value))
        .toList();
  }
}