GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults.fromJson constructor

GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults.fromJson(
  1. Map _json
)

Implementation

GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults.fromJson(
    core.Map _json) {
  if (_json.containsKey("error")) {
    error = new GoogleRpcStatus.fromJson(_json["error"]);
  }
  if (_json.containsKey("explicitAnnotation")) {
    explicitAnnotation =
        new GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation
            .fromJson(_json["explicitAnnotation"]);
  }
  if (_json.containsKey("frameLabelAnnotations")) {
    frameLabelAnnotations = (_json["frameLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p1beta1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p1beta1LabelAnnotation.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("inputUri")) {
    inputUri = _json["inputUri"];
  }
  if (_json.containsKey("logoRecognitionAnnotations")) {
    logoRecognitionAnnotations = (_json["logoRecognitionAnnotations"]
            as core.List)
        .map<GoogleCloudVideointelligenceV1p1beta1LogoRecognitionAnnotation>(
            (value) =>
                new GoogleCloudVideointelligenceV1p1beta1LogoRecognitionAnnotation
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("objectAnnotations")) {
    objectAnnotations = (_json["objectAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation>(
            (value) =>
                new GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("segment")) {
    segment = new GoogleCloudVideointelligenceV1p1beta1VideoSegment.fromJson(
        _json["segment"]);
  }
  if (_json.containsKey("segmentLabelAnnotations")) {
    segmentLabelAnnotations = (_json["segmentLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p1beta1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p1beta1LabelAnnotation.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("segmentPresenceLabelAnnotations")) {
    segmentPresenceLabelAnnotations =
        (_json["segmentPresenceLabelAnnotations"] as core.List)
            .map<GoogleCloudVideointelligenceV1p1beta1LabelAnnotation>(
                (value) =>
                    new GoogleCloudVideointelligenceV1p1beta1LabelAnnotation
                        .fromJson(value))
            .toList();
  }
  if (_json.containsKey("shotAnnotations")) {
    shotAnnotations = (_json["shotAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p1beta1VideoSegment>((value) =>
            new GoogleCloudVideointelligenceV1p1beta1VideoSegment.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("shotLabelAnnotations")) {
    shotLabelAnnotations = (_json["shotLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p1beta1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p1beta1LabelAnnotation.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("shotPresenceLabelAnnotations")) {
    shotPresenceLabelAnnotations = (_json["shotPresenceLabelAnnotations"]
            as core.List)
        .map<GoogleCloudVideointelligenceV1p1beta1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p1beta1LabelAnnotation.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("speechTranscriptions")) {
    speechTranscriptions = (_json["speechTranscriptions"] as core.List)
        .map<GoogleCloudVideointelligenceV1p1beta1SpeechTranscription>(
            (value) =>
                new GoogleCloudVideointelligenceV1p1beta1SpeechTranscription
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("textAnnotations")) {
    textAnnotations = (_json["textAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p1beta1TextAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p1beta1TextAnnotation.fromJson(
                value))
        .toList();
  }
}