Skip to content

Commit f4e357d

Browse files
dpebotchingor13
authored andcommitted
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.
1 parent 8aa0ef3 commit f4e357d

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

video/src/main/java/com/example/video/Detect.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package com.example.video;
1818

19-
import com.google.api.gax.rpc.OperationFuture;
19+
import com.google.api.gax.longrunning.OperationFuture;
2020
import com.google.cloud.videointelligence.v1beta2.AnnotateVideoProgress;
2121
import com.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest;
2222
import com.google.cloud.videointelligence.v1beta2.AnnotateVideoResponse;
@@ -113,7 +113,7 @@ public static void analyzeFaces(String gcsUri) throws Exception {
113113
.build();
114114

115115
// asynchronously perform facial analysis on videos
116-
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress, Operation> response
116+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> response
117117
= client.annotateVideoAsync(request);
118118

119119
boolean faceFound = false;
@@ -174,7 +174,7 @@ public static void analyzeLabels(String gcsUri) throws Exception {
174174
.addFeatures(Feature.LABEL_DETECTION)
175175
.build();
176176
// Create an operation that will contain the response when the operation completes.
177-
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
177+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
178178
client.annotateVideoAsync(request);
179179

180180
System.out.println("Waiting for operation to complete...");
@@ -261,7 +261,7 @@ public static void analyzeLabelsFile(String filePath) throws Exception {
261261
.build();
262262

263263
// Create an operation that will contain the response when the operation completes.
264-
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
264+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
265265
client.annotateVideoAsync(request);
266266

267267
System.out.println("Waiting for operation to complete...");
@@ -344,7 +344,7 @@ public static void analyzeShots(String gcsUri) throws Exception {
344344
.build();
345345

346346
// Create an operation that will contain the response when the operation completes.
347-
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
347+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
348348
client.annotateVideoAsync(request);
349349
System.out.println("Waiting for operation to complete...");
350350

@@ -382,7 +382,7 @@ public static void analyzeExplicitContent(String gcsUri) throws Exception {
382382
.addFeatures(Feature.EXPLICIT_CONTENT_DETECTION)
383383
.build();
384384

385-
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
385+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
386386
client.annotateVideoAsync(request);
387387

388388
System.out.println("Waiting for operation to complete...");

video/src/main/java/com/example/video/QuickstartSample.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// [START videointelligence_quickstart]
2020

21-
import com.google.api.gax.rpc.OperationFuture;
21+
import com.google.api.gax.longrunning.OperationFuture;
2222
import com.google.cloud.videointelligence.v1beta2.AnnotateVideoProgress;
2323
import com.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest;
2424
import com.google.cloud.videointelligence.v1beta2.AnnotateVideoResponse;
@@ -28,7 +28,6 @@
2828
import com.google.cloud.videointelligence.v1beta2.LabelSegment;
2929
import com.google.cloud.videointelligence.v1beta2.VideoAnnotationResults;
3030
import com.google.cloud.videointelligence.v1beta2.VideoIntelligenceServiceClient;
31-
import com.google.longrunning.Operation;
3231
import java.util.List;
3332

3433
public class QuickstartSample {
@@ -48,7 +47,7 @@ public static void main(String[] args) throws Exception {
4847
.addFeatures(Feature.LABEL_DETECTION)
4948
.build();
5049

51-
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
50+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
5251
client.annotateVideoAsync(request);
5352

5453
System.out.println("Waiting for operation to complete...");

0 commit comments

Comments
 (0)