From f4e357dde1e81a3e3d2702b8989fd4e4a785842c Mon Sep 17 00:00:00 2001 From: DPE bot Date: Wed, 15 Nov 2017 11:42:18 -0800 Subject: [PATCH] samples: Auto-update dependencies. (#912) * Auto-update dependencies. * Reverted Vision API classes. * Fixed OperationalFuture references. * Fixed some more Vision classes back. * Fixed some more classes. --- video/src/main/java/com/example/video/Detect.java | 12 ++++++------ .../java/com/example/video/QuickstartSample.java | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/video/src/main/java/com/example/video/Detect.java b/video/src/main/java/com/example/video/Detect.java index 09fd5f879e3..23043145a91 100644 --- a/video/src/main/java/com/example/video/Detect.java +++ b/video/src/main/java/com/example/video/Detect.java @@ -16,7 +16,7 @@ package com.example.video; -import com.google.api.gax.rpc.OperationFuture; +import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.videointelligence.v1beta2.AnnotateVideoProgress; import com.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest; import com.google.cloud.videointelligence.v1beta2.AnnotateVideoResponse; @@ -113,7 +113,7 @@ public static void analyzeFaces(String gcsUri) throws Exception { .build(); // asynchronously perform facial analysis on videos - OperationFuture response + OperationFuture response = client.annotateVideoAsync(request); boolean faceFound = false; @@ -174,7 +174,7 @@ public static void analyzeLabels(String gcsUri) throws Exception { .addFeatures(Feature.LABEL_DETECTION) .build(); // Create an operation that will contain the response when the operation completes. - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete..."); @@ -261,7 +261,7 @@ public static void analyzeLabelsFile(String filePath) throws Exception { .build(); // Create an operation that will contain the response when the operation completes. - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete..."); @@ -344,7 +344,7 @@ public static void analyzeShots(String gcsUri) throws Exception { .build(); // Create an operation that will contain the response when the operation completes. - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete..."); @@ -382,7 +382,7 @@ public static void analyzeExplicitContent(String gcsUri) throws Exception { .addFeatures(Feature.EXPLICIT_CONTENT_DETECTION) .build(); - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete..."); diff --git a/video/src/main/java/com/example/video/QuickstartSample.java b/video/src/main/java/com/example/video/QuickstartSample.java index b6f8c8cee75..e4abed0f895 100644 --- a/video/src/main/java/com/example/video/QuickstartSample.java +++ b/video/src/main/java/com/example/video/QuickstartSample.java @@ -18,7 +18,7 @@ // [START videointelligence_quickstart] -import com.google.api.gax.rpc.OperationFuture; +import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.videointelligence.v1beta2.AnnotateVideoProgress; import com.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest; import com.google.cloud.videointelligence.v1beta2.AnnotateVideoResponse; @@ -28,7 +28,6 @@ import com.google.cloud.videointelligence.v1beta2.LabelSegment; import com.google.cloud.videointelligence.v1beta2.VideoAnnotationResults; import com.google.cloud.videointelligence.v1beta2.VideoIntelligenceServiceClient; -import com.google.longrunning.Operation; import java.util.List; public class QuickstartSample { @@ -48,7 +47,7 @@ public static void main(String[] args) throws Exception { .addFeatures(Feature.LABEL_DETECTION) .build(); - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete...");