diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceClient.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceClient.java index 6ae521cbd..1a7e01f21 100644 --- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceClient.java +++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceClient.java @@ -37,6 +37,16 @@ *
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Note: close() needs to be called on the VideoIntelligenceServiceClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -159,6 +169,18 @@ public final OperationsClient getOperationsClient() { * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` * (results). * + *
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * * @param inputUri Input video location. Currently, only [Cloud * Storage](https://cloud.google.com/storage/) URIs are supported. URIs must be specified in * the following format: `gs://bucket-id/object-id` (other URI formats return @@ -185,6 +207,25 @@ public final OperationFuturefeatures = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -201,6 +242,25 @@ public final OperationFuture()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(request).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final OperationCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * OperationFuture future = + * videoIntelligenceServiceClient.annotateVideoOperationCallable().futureCall(request); + * // Do something. + * AnnotateVideoResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final UnaryCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * ApiFuture future = + * videoIntelligenceServiceClient.annotateVideoCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Service Description: Service that implements the Video Intelligence API. * *
Sample for VideoIntelligenceServiceClient: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List*/ @Generated("by gapic-generator-java") package com.google.cloud.videointelligence.v1; diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceClient.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceClient.java index 5eeafab4e..c584e784c 100644 --- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceClient.java +++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceClient.java @@ -37,6 +37,16 @@ *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Note: close() needs to be called on the VideoIntelligenceServiceClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -160,6 +170,18 @@ public final OperationsClient getOperationsClient() { * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` * (results). * + *
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * * @param inputUri Input video location. Currently, only [Google Cloud * Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in * the following format: `gs://bucket-id/object-id` (other URI formats return @@ -186,6 +208,25 @@ public final OperationFuturefeatures = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -202,6 +243,25 @@ public final OperationFuture()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(request).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final OperationCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * OperationFuture future = + * videoIntelligenceServiceClient.annotateVideoOperationCallable().futureCall(request); + * // Do something. + * AnnotateVideoResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final UnaryCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * ApiFuture future = + * videoIntelligenceServiceClient.annotateVideoCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Service Description: Service that implements Google Cloud Video Intelligence API. * *
Sample for VideoIntelligenceServiceClient: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List*/ @Generated("by gapic-generator-java") package com.google.cloud.videointelligence.v1beta2; diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClient.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClient.java index 1ebdffa27..804943d90 100644 --- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClient.java +++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClient.java @@ -37,6 +37,16 @@ *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Note: close() needs to be called on the VideoIntelligenceServiceClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -160,6 +170,18 @@ public final OperationsClient getOperationsClient() { * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` * (results). * + *
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * * @param inputUri Input video location. Currently, only [Google Cloud * Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in * the following format: `gs://bucket-id/object-id` (other URI formats return @@ -186,6 +208,25 @@ public final OperationFuturefeatures = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -202,6 +243,25 @@ public final OperationFuture()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(request).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final OperationCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * OperationFuture future = + * videoIntelligenceServiceClient.annotateVideoOperationCallable().futureCall(request); + * // Do something. + * AnnotateVideoResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final UnaryCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * ApiFuture future = + * videoIntelligenceServiceClient.annotateVideoCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Service Description: Service that implements Google Cloud Video Intelligence API. * *
Sample for VideoIntelligenceServiceClient: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List*/ @Generated("by gapic-generator-java") package com.google.cloud.videointelligence.v1p1beta1; diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p2beta1/VideoIntelligenceServiceClient.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p2beta1/VideoIntelligenceServiceClient.java index 26c93b04f..ef840faab 100644 --- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p2beta1/VideoIntelligenceServiceClient.java +++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p2beta1/VideoIntelligenceServiceClient.java @@ -37,6 +37,16 @@ *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Note: close() needs to be called on the VideoIntelligenceServiceClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -160,6 +170,18 @@ public final OperationsClient getOperationsClient() { * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` * (results). * + *
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * * @param inputUri Input video location. Currently, only [Google Cloud * Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in * the following format: `gs://bucket-id/object-id` (other URI formats return @@ -186,6 +208,25 @@ public final OperationFuturefeatures = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -202,6 +243,25 @@ public final OperationFuture()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(request).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final OperationCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * OperationFuture future = + * videoIntelligenceServiceClient.annotateVideoOperationCallable().futureCall(request); + * // Do something. + * AnnotateVideoResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final UnaryCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * ApiFuture future = + * videoIntelligenceServiceClient.annotateVideoCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Service Description: Service that implements Google Cloud Video Intelligence API. * *
Sample for VideoIntelligenceServiceClient: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List*/ @Generated("by gapic-generator-java") package com.google.cloud.videointelligence.v1p2beta1; diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClient.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClient.java index 453927438..dfe9eb321 100644 --- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClient.java +++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClient.java @@ -32,6 +32,19 @@ *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (StreamingVideoIntelligenceServiceClient streamingVideoIntelligenceServiceClient = + * StreamingVideoIntelligenceServiceClient.create()) { + * BidiStream+ * *bidiStream = + * streamingVideoIntelligenceServiceClient.streamingAnnotateVideoCallable().call(); + * StreamingAnnotateVideoRequest request = StreamingAnnotateVideoRequest.newBuilder().build(); + * bidiStream.send(request); + * for (StreamingAnnotateVideoResponse response : bidiStream) { + * // Do something when a response is received. + * } + * } + * }
Note: close() needs to be called on the StreamingVideoIntelligenceServiceClient object to * clean up resources such as threads. In the example above, try-with-resources is used, which * automatically calls close(). @@ -146,6 +159,19 @@ public StreamingVideoIntelligenceServiceStub getStub() { * video/audio bytes. This method is only available via the gRPC API (not REST). * *
Sample code: + * + *
{@code + * try (StreamingVideoIntelligenceServiceClient streamingVideoIntelligenceServiceClient = + * StreamingVideoIntelligenceServiceClient.create()) { + * BidiStream*/ public final BidiStreamingCallablebidiStream = + * streamingVideoIntelligenceServiceClient.streamingAnnotateVideoCallable().call(); + * StreamingAnnotateVideoRequest request = StreamingAnnotateVideoRequest.newBuilder().build(); + * bidiStream.send(request); + * for (StreamingAnnotateVideoResponse response : bidiStream) { + * // Do something when a response is received. + * } + * } + * }
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Note: close() needs to be called on the VideoIntelligenceServiceClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -160,6 +170,18 @@ public final OperationsClient getOperationsClient() { * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` * (results). * + *
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * * @param inputUri Input video location. Currently, only [Cloud * Storage](https://cloud.google.com/storage/) URIs are supported. URIs must be specified in * the following format: `gs://bucket-id/object-id` (other URI formats return @@ -186,6 +208,25 @@ public final OperationFuturefeatures = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -202,6 +243,25 @@ public final OperationFuture()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(request).get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final OperationCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * OperationFuture future = + * videoIntelligenceServiceClient.annotateVideoOperationCallable().futureCall(request); + * // Do something. + * AnnotateVideoResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * AnnotateVideoRequest request = + * AnnotateVideoRequest.newBuilder() + * .setInputUri("inputUri470706498") + * .setInputContent(ByteString.EMPTY) + * .addAllFeatures(new ArrayList*/ public final UnaryCallable()) + * .setVideoContext(VideoContext.newBuilder().build()) + * .setOutputUri("outputUri-2119300949") + * .setLocationId("locationId1541836720") + * .build(); + * ApiFuture future = + * videoIntelligenceServiceClient.annotateVideoCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample for VideoIntelligenceServiceClient: * + *
{@code + * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = + * VideoIntelligenceServiceClient.create()) { + * String inputUri = "inputUri470706498"; + * List+ * *features = new ArrayList<>(); + * AnnotateVideoResponse response = + * videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get(); + * } + * }
======================= StreamingVideoIntelligenceServiceClient ======================= * *
Service Description: Service that implements streaming Video Intelligence API. * *
Sample for StreamingVideoIntelligenceServiceClient: + * + *
{@code + * try (StreamingVideoIntelligenceServiceClient streamingVideoIntelligenceServiceClient = + * StreamingVideoIntelligenceServiceClient.create()) { + * BidiStream*/ @Generated("by gapic-generator-java") package com.google.cloud.videointelligence.v1p3beta1; diff --git a/samples/snippets/src/main/java/video/DetectPerson.java b/samples/snippets/src/main/java/video/DetectPerson.java index 66ce6409c..29653db79 100644 --- a/samples/snippets/src/main/java/video/DetectPerson.java +++ b/samples/snippets/src/main/java/video/DetectPerson.java @@ -101,7 +101,8 @@ public static void detectPerson(String localFilePath) throws Exception { // posture of the person detected. TimestampedObject firstTimestampedObject = track.getTimestampedObjects(0); - // Attributes include unique pieces of clothing, poses (i.e., body landmarks) of the person detected. + // Attributes include unique pieces of clothing, poses (i.e., body landmarks) + // of the person detected. for (DetectedAttribute attribute : firstTimestampedObject.getAttributesList()) { System.out.printf( "\tAttribute: %s; Value: %s\n", attribute.getName(), attribute.getValue()); diff --git a/samples/snippets/src/main/java/video/DetectPersonGcs.java b/samples/snippets/src/main/java/video/DetectPersonGcs.java index 4525604b5..df4fdd078 100644 --- a/samples/snippets/src/main/java/video/DetectPersonGcs.java +++ b/samples/snippets/src/main/java/video/DetectPersonGcs.java @@ -93,7 +93,8 @@ public static void detectPersonGcs(String gcsUri) throws Exception { // posture of the person detected. TimestampedObject firstTimestampedObject = track.getTimestampedObjects(0); - // Attributes include unique pieces of clothing, poses (i.e., body landmarks) of the person detected. + // Attributes include unique pieces of clothing, poses (i.e., body landmarks) + // of the person detected. for (DetectedAttribute attribute : firstTimestampedObject.getAttributesList()) { System.out.printf( "\tAttribute: %s; Value: %s\n", attribute.getName(), attribute.getValue()); diff --git a/synth.metadata b/synth.metadata index 168470e5c..719d39d01 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", + "internalRef": "356341083" } }, {bidiStream = + * streamingVideoIntelligenceServiceClient.streamingAnnotateVideoCallable().call(); + * StreamingAnnotateVideoRequest request = StreamingAnnotateVideoRequest.newBuilder().build(); + * bidiStream.send(request); + * for (StreamingAnnotateVideoResponse response : bidiStream) { + * // Do something when a response is received. + * } + * } + * }