GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults.fromJson constructor

GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults.fromJson(
  1. Map _json
)

Implementation

GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults.fromJson(
    core.Map _json) {
  if (_json.containsKey("celebrityRecognitionAnnotations")) {
    celebrityRecognitionAnnotations =
        new GoogleCloudVideointelligenceV1p3beta1CelebrityRecognitionAnnotation
            .fromJson(_json["celebrityRecognitionAnnotations"]);
  }
  if (_json.containsKey("error")) {
    error = new GoogleRpcStatus.fromJson(_json["error"]);
  }
  if (_json.containsKey("explicitAnnotation")) {
    explicitAnnotation =
        new GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation
            .fromJson(_json["explicitAnnotation"]);
  }
  if (_json.containsKey("faceDetectionAnnotations")) {
    faceDetectionAnnotations = (_json["faceDetectionAnnotations"]
            as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1FaceDetectionAnnotation>(
            (value) =>
                new GoogleCloudVideointelligenceV1p3beta1FaceDetectionAnnotation
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("frameLabelAnnotations")) {
    frameLabelAnnotations = (_json["frameLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p3beta1LabelAnnotation.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("inputUri")) {
    inputUri = _json["inputUri"];
  }
  if (_json.containsKey("logoRecognitionAnnotations")) {
    logoRecognitionAnnotations = (_json["logoRecognitionAnnotations"]
            as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1LogoRecognitionAnnotation>(
            (value) =>
                new GoogleCloudVideointelligenceV1p3beta1LogoRecognitionAnnotation
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("objectAnnotations")) {
    objectAnnotations = (_json["objectAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation>(
            (value) =>
                new GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("personDetectionAnnotations")) {
    personDetectionAnnotations = (_json["personDetectionAnnotations"]
            as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1PersonDetectionAnnotation>(
            (value) =>
                new GoogleCloudVideointelligenceV1p3beta1PersonDetectionAnnotation
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("segment")) {
    segment = new GoogleCloudVideointelligenceV1p3beta1VideoSegment.fromJson(
        _json["segment"]);
  }
  if (_json.containsKey("segmentLabelAnnotations")) {
    segmentLabelAnnotations = (_json["segmentLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p3beta1LabelAnnotation.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("segmentPresenceLabelAnnotations")) {
    segmentPresenceLabelAnnotations =
        (_json["segmentPresenceLabelAnnotations"] as core.List)
            .map<GoogleCloudVideointelligenceV1p3beta1LabelAnnotation>(
                (value) =>
                    new GoogleCloudVideointelligenceV1p3beta1LabelAnnotation
                        .fromJson(value))
            .toList();
  }
  if (_json.containsKey("shotAnnotations")) {
    shotAnnotations = (_json["shotAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1VideoSegment>((value) =>
            new GoogleCloudVideointelligenceV1p3beta1VideoSegment.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("shotLabelAnnotations")) {
    shotLabelAnnotations = (_json["shotLabelAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p3beta1LabelAnnotation.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("shotPresenceLabelAnnotations")) {
    shotPresenceLabelAnnotations = (_json["shotPresenceLabelAnnotations"]
            as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1LabelAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p3beta1LabelAnnotation.fromJson(
                value))
        .toList();
  }
  if (_json.containsKey("speechTranscriptions")) {
    speechTranscriptions = (_json["speechTranscriptions"] as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1SpeechTranscription>(
            (value) =>
                new GoogleCloudVideointelligenceV1p3beta1SpeechTranscription
                    .fromJson(value))
        .toList();
  }
  if (_json.containsKey("textAnnotations")) {
    textAnnotations = (_json["textAnnotations"] as core.List)
        .map<GoogleCloudVideointelligenceV1p3beta1TextAnnotation>((value) =>
            new GoogleCloudVideointelligenceV1p3beta1TextAnnotation.fromJson(
                value))
        .toList();
  }
}