Skip to content

Commit

Permalink
samples: Auto-update dependencies. (#912)
Browse files Browse the repository at this point in the history
* Auto-update dependencies.

* Reverted Vision API classes.

* Fixed OperationalFuture references.

* Fixed some more Vision classes back.

* Fixed some more classes.
  • Loading branch information
dpebot authored and chingor13 committed Feb 24, 2021
1 parent 8aa0ef3 commit f4e357d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 6 additions & 6 deletions video/src/main/java/com/example/video/Detect.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -113,7 +113,7 @@ public static void analyzeFaces(String gcsUri) throws Exception {
.build();

// asynchronously perform facial analysis on videos
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress, Operation> response
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> response
= client.annotateVideoAsync(request);

boolean faceFound = false;
Expand Down Expand Up @@ -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<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
client.annotateVideoAsync(request);

System.out.println("Waiting for operation to complete...");
Expand Down Expand Up @@ -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<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
client.annotateVideoAsync(request);

System.out.println("Waiting for operation to complete...");
Expand Down Expand Up @@ -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<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
client.annotateVideoAsync(request);
System.out.println("Waiting for operation to complete...");

Expand Down Expand Up @@ -382,7 +382,7 @@ public static void analyzeExplicitContent(String gcsUri) throws Exception {
.addFeatures(Feature.EXPLICIT_CONTENT_DETECTION)
.build();

OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
client.annotateVideoAsync(request);

System.out.println("Waiting for operation to complete...");
Expand Down
5 changes: 2 additions & 3 deletions video/src/main/java/com/example/video/QuickstartSample.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand All @@ -48,7 +47,7 @@ public static void main(String[] args) throws Exception {
.addFeatures(Feature.LABEL_DETECTION)
.build();

OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress, Operation> operation =
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
client.annotateVideoAsync(request);

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

0 comments on commit f4e357d

Please sign in to comment.