diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceSettings.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceSettings.java
index 38ca233d2815..ad9008306598 100644
--- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceSettings.java
+++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceSettings.java
@@ -53,7 +53,7 @@
*
* VideoIntelligenceServiceSettings.Builder videoIntelligenceServiceSettingsBuilder =
* VideoIntelligenceServiceSettings.newBuilder();
- * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettingsBuilder()
+ * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* VideoIntelligenceServiceSettings videoIntelligenceServiceSettings = videoIntelligenceServiceSettingsBuilder.build();
*
diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStubSettings.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStubSettings.java
index 4fcaecdebaf8..88b2f426bf36 100644
--- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStubSettings.java
+++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStubSettings.java
@@ -68,7 +68,7 @@
*
* VideoIntelligenceServiceStubSettings.Builder videoIntelligenceServiceSettingsBuilder =
* VideoIntelligenceServiceStubSettings.newBuilder();
- * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettingsBuilder()
+ * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* VideoIntelligenceServiceStubSettings videoIntelligenceServiceSettings = videoIntelligenceServiceSettingsBuilder.build();
*
diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceSettings.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceSettings.java
index 938eb88273ba..dea9309efe19 100644
--- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceSettings.java
+++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceSettings.java
@@ -53,7 +53,7 @@
*
* VideoIntelligenceServiceSettings.Builder videoIntelligenceServiceSettingsBuilder =
* VideoIntelligenceServiceSettings.newBuilder();
- * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettingsBuilder()
+ * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* VideoIntelligenceServiceSettings videoIntelligenceServiceSettings = videoIntelligenceServiceSettingsBuilder.build();
*
diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStubSettings.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStubSettings.java
index 6b14acce4df7..4da697fb1e53 100644
--- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStubSettings.java
+++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStubSettings.java
@@ -68,7 +68,7 @@
*
* VideoIntelligenceServiceStubSettings.Builder videoIntelligenceServiceSettingsBuilder =
* VideoIntelligenceServiceStubSettings.newBuilder();
- * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettingsBuilder()
+ * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* VideoIntelligenceServiceStubSettings videoIntelligenceServiceSettings = videoIntelligenceServiceSettingsBuilder.build();
*
diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceSettings.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceSettings.java
index 91aa59f4a5e5..3cfb898fd5a2 100644
--- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceSettings.java
+++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceSettings.java
@@ -53,7 +53,7 @@
*
* VideoIntelligenceServiceSettings.Builder videoIntelligenceServiceSettingsBuilder =
* VideoIntelligenceServiceSettings.newBuilder();
- * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettingsBuilder()
+ * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* VideoIntelligenceServiceSettings videoIntelligenceServiceSettings = videoIntelligenceServiceSettingsBuilder.build();
*
diff --git a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStubSettings.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStubSettings.java
index 19d47c4c654c..2e37558e95a2 100644
--- a/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStubSettings.java
+++ b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStubSettings.java
@@ -68,7 +68,7 @@
*
* VideoIntelligenceServiceStubSettings.Builder videoIntelligenceServiceSettingsBuilder =
* VideoIntelligenceServiceStubSettings.newBuilder();
- * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettingsBuilder()
+ * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* VideoIntelligenceServiceStubSettings videoIntelligenceServiceSettings = videoIntelligenceServiceSettingsBuilder.build();
*
diff --git a/google-cloud-videointelligence/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
similarity index 100%
rename from google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClient.java
rename to google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClient.java
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceSettings.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceSettings.java
similarity index 100%
rename from google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceSettings.java
rename to google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceSettings.java
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/package-info.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/package-info.java
similarity index 100%
rename from google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/package-info.java
rename to google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/package-info.java
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/GrpcVideoIntelligenceServiceStub.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/GrpcVideoIntelligenceServiceStub.java
similarity index 100%
rename from google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/GrpcVideoIntelligenceServiceStub.java
rename to google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/GrpcVideoIntelligenceServiceStub.java
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/VideoIntelligenceServiceStub.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/VideoIntelligenceServiceStub.java
similarity index 100%
rename from google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/VideoIntelligenceServiceStub.java
rename to google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/VideoIntelligenceServiceStub.java
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/VideoIntelligenceServiceStubSettings.java b/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/VideoIntelligenceServiceStubSettings.java
similarity index 100%
rename from google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/VideoIntelligenceServiceStubSettings.java
rename to google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p1beta1/stub/VideoIntelligenceServiceStubSettings.java
diff --git a/google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/MockVideoIntelligenceService.java b/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/MockVideoIntelligenceService.java
similarity index 100%
rename from google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/MockVideoIntelligenceService.java
rename to google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/MockVideoIntelligenceService.java
diff --git a/google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/MockVideoIntelligenceServiceImpl.java b/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/MockVideoIntelligenceServiceImpl.java
similarity index 100%
rename from google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/MockVideoIntelligenceServiceImpl.java
rename to google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/MockVideoIntelligenceServiceImpl.java
diff --git a/google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClientTest.java b/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClientTest.java
similarity index 100%
rename from google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClientTest.java
rename to google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceClientTest.java
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceClient.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceClient.java
deleted file mode 100644
index 197f5be8f5cc..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceClient.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.longrunning.OperationFuture;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.videointelligence.v1.stub.VideoIntelligenceServiceStub;
-import com.google.cloud.videointelligence.v1.stub.VideoIntelligenceServiceStubSettings;
-import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
-import java.io.IOException;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND SERVICE
-/**
- * Service Description: Service that implements Google Cloud Video Intelligence API.
- *
- *
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:
- *
- *
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().
- *
- *
The surface of this class includes several types of Java methods for each of the API's
- * methods:
- *
- *
- *
A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available as
- * parameters, and not every API method will have a flattened method entry point.
- *
A "request object" method. This type of method only takes one parameter, a request object,
- * which must be constructed before the call. Not every API method will have a request object
- * method.
- *
A "callable" method. This type of method takes no parameters and returns an immutable API
- * callable object, which can be used to initiate calls to the service.
- *
- *
- *
See the individual methods for example code.
- *
- *
Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- *
This class can be customized by passing in a custom instance of
- * VideoIntelligenceServiceSettings to create(). For example:
- *
- *
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi
-public class VideoIntelligenceServiceClient implements BackgroundResource {
- private final VideoIntelligenceServiceSettings settings;
- private final VideoIntelligenceServiceStub stub;
- private final OperationsClient operationsClient;
-
- /** Constructs an instance of VideoIntelligenceServiceClient with default settings. */
- public static final VideoIntelligenceServiceClient create() throws IOException {
- return create(VideoIntelligenceServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of VideoIntelligenceServiceClient, using the given settings. The
- * channels are created based on the settings passed in, or defaults for any settings that are not
- * set.
- */
- public static final VideoIntelligenceServiceClient create(
- VideoIntelligenceServiceSettings settings) throws IOException {
- return new VideoIntelligenceServiceClient(settings);
- }
-
- /**
- * Constructs an instance of VideoIntelligenceServiceClient, using the given stub for making
- * calls. This is for advanced usage - prefer to use VideoIntelligenceServiceSettings}.
- */
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public static final VideoIntelligenceServiceClient create(VideoIntelligenceServiceStub stub) {
- return new VideoIntelligenceServiceClient(stub);
- }
-
- /**
- * Constructs an instance of VideoIntelligenceServiceClient, using the given settings. This is
- * protected so that it is easy to make a subclass, but otherwise, the static factory methods
- * should be preferred.
- */
- protected VideoIntelligenceServiceClient(VideoIntelligenceServiceSettings settings)
- throws IOException {
- this.settings = settings;
- this.stub = ((VideoIntelligenceServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- protected VideoIntelligenceServiceClient(VideoIntelligenceServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- public final VideoIntelligenceServiceSettings getSettings() {
- return settings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public VideoIntelligenceServiceStub getStub() {
- return stub;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- public final OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Performs asynchronous video annotation. Progress and results can be retrieved through the
- * `google.longrunning.Operations` interface. `Operation.metadata` contains
- * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse`
- * (results).
- *
- *
- *
- * @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
- * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more
- * information, see [Request URIs](/storage/docs/reference-uris). A video URI may include
- * wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*'
- * to match 0 or more characters; '?' to match 1 character. If unset, the input video should
- * be embedded in the request as `input_content`. If set, `input_content` should be unset.
- * @param features Requested video annotation features.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture annotateVideoAsync(
- String inputUri, List features) {
-
- AnnotateVideoRequest request =
- AnnotateVideoRequest.newBuilder().setInputUri(inputUri).addAllFeatures(features).build();
- return annotateVideoAsync(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Performs asynchronous video annotation. Progress and results can be retrieved through the
- * `google.longrunning.Operations` interface. `Operation.metadata` contains
- * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse`
- * (results).
- *
- *
- *
- * @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
- */
- public final OperationFuture annotateVideoAsync(
- AnnotateVideoRequest request) {
- return annotateVideoOperationCallable().futureCall(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Performs asynchronous video annotation. Progress and results can be retrieved through the
- * `google.longrunning.Operations` interface. `Operation.metadata` contains
- * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse`
- * (results).
- *
- *
- */
- public final UnaryCallable annotateVideoCallable() {
- return stub.annotateVideoCallable();
- }
-
- @Override
- public final void close() throws Exception {
- stub.close();
- }
-
- @Override
- public void shutdown() {
- stub.shutdown();
- }
-
- @Override
- public boolean isShutdown() {
- return stub.isShutdown();
- }
-
- @Override
- public boolean isTerminated() {
- return stub.isTerminated();
- }
-
- @Override
- public void shutdownNow() {
- stub.shutdownNow();
- }
-
- @Override
- public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
- return stub.awaitTermination(duration, unit);
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceSettings.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceSettings.java
deleted file mode 100644
index ad9008306598..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceSettings.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1;
-
-import com.google.api.core.ApiFunction;
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.GoogleCredentialsProvider;
-import com.google.api.gax.core.InstantiatingExecutorProvider;
-import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
-import com.google.api.gax.rpc.ApiClientHeaderProvider;
-import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.ClientSettings;
-import com.google.api.gax.rpc.OperationCallSettings;
-import com.google.api.gax.rpc.TransportChannelProvider;
-import com.google.api.gax.rpc.UnaryCallSettings;
-import com.google.cloud.videointelligence.v1.stub.VideoIntelligenceServiceStubSettings;
-import com.google.longrunning.Operation;
-import java.io.IOException;
-import java.util.List;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Settings class to configure an instance of {@link VideoIntelligenceServiceClient}.
- *
- *
The default instance has everything set to sensible defaults:
- *
- *
- *
The default service address (videointelligence.googleapis.com) and default port (443) are
- * used.
- *
Credentials are acquired automatically through Application Default Credentials.
- *
Retries are configured for idempotent methods but not for non-idempotent methods.
- *
- *
- *
The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object. For
- * example, to set the total timeout of annotateVideoAsync to 30 seconds:
- *
- *
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi
-public class VideoIntelligenceServiceSettings
- extends ClientSettings {
- /** Returns the object with the settings used for calls to annotateVideo. */
- public UnaryCallSettings annotateVideoSettings() {
- return ((VideoIntelligenceServiceStubSettings) getStubSettings()).annotateVideoSettings();
- }
-
- /** Returns the object with the settings used for calls to annotateVideo. */
- public OperationCallSettings
- annotateVideoOperationSettings() {
- return ((VideoIntelligenceServiceStubSettings) getStubSettings())
- .annotateVideoOperationSettings();
- }
-
- public static final VideoIntelligenceServiceSettings create(
- VideoIntelligenceServiceStubSettings stub) throws IOException {
- return new VideoIntelligenceServiceSettings.Builder(stub.toBuilder()).build();
- }
-
- /** Returns a builder for the default ExecutorProvider for this service. */
- public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultExecutorProviderBuilder();
- }
-
- /** Returns the default service endpoint. */
- public static String getDefaultEndpoint() {
- return VideoIntelligenceServiceStubSettings.getDefaultEndpoint();
- }
-
- /** Returns the default service scopes. */
- public static List getDefaultServiceScopes() {
- return VideoIntelligenceServiceStubSettings.getDefaultServiceScopes();
- }
-
- /** Returns a builder for the default credentials for this service. */
- public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultCredentialsProviderBuilder();
- }
-
- /** Returns a builder for the default ChannelProvider for this service. */
- public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultGrpcTransportProviderBuilder();
- }
-
- public static TransportChannelProvider defaultTransportChannelProvider() {
- return VideoIntelligenceServiceStubSettings.defaultTransportChannelProvider();
- }
-
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultApiClientHeaderProviderBuilder();
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder() {
- return Builder.createDefault();
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder(ClientContext clientContext) {
- return new Builder(clientContext);
- }
-
- /** Returns a builder containing all the values of this settings class. */
- public Builder toBuilder() {
- return new Builder(this);
- }
-
- protected VideoIntelligenceServiceSettings(Builder settingsBuilder) throws IOException {
- super(settingsBuilder);
- }
-
- /** Builder for VideoIntelligenceServiceSettings. */
- public static class Builder
- extends ClientSettings.Builder {
- protected Builder() throws IOException {
- this((ClientContext) null);
- }
-
- protected Builder(ClientContext clientContext) {
- super(VideoIntelligenceServiceStubSettings.newBuilder(clientContext));
- }
-
- private static Builder createDefault() {
- return new Builder(VideoIntelligenceServiceStubSettings.newBuilder());
- }
-
- protected Builder(VideoIntelligenceServiceSettings settings) {
- super(settings.getStubSettings().toBuilder());
- }
-
- protected Builder(VideoIntelligenceServiceStubSettings.Builder stubSettings) {
- super(stubSettings);
- }
-
- public VideoIntelligenceServiceStubSettings.Builder getStubSettingsBuilder() {
- return ((VideoIntelligenceServiceStubSettings.Builder) getStubSettings());
- }
-
- /**
- * Applies the given settings updater function to all of the unary API methods in this service.
- *
- *
Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
- super.applyToAllUnaryMethods(
- getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
- return this;
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public UnaryCallSettings.Builder annotateVideoSettings() {
- return getStubSettingsBuilder().annotateVideoSettings();
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public OperationCallSettings.Builder<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings() {
- return getStubSettingsBuilder().annotateVideoOperationSettings();
- }
-
- @Override
- public VideoIntelligenceServiceSettings build() throws IOException {
- return new VideoIntelligenceServiceSettings(this);
- }
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/package-info.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/package-info.java
deleted file mode 100644
index 4db37157b399..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/package-info.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * A client to Cloud Video Intelligence API.
- *
- *
The interfaces provided are listed below, along with usage samples.
- *
- *
- */
-package com.google.cloud.videointelligence.v1;
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/GrpcVideoIntelligenceServiceStub.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/GrpcVideoIntelligenceServiceStub.java
deleted file mode 100644
index f2c4bd849371..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/GrpcVideoIntelligenceServiceStub.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1.stub;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.core.BackgroundResourceAggregation;
-import com.google.api.gax.grpc.GrpcCallSettings;
-import com.google.api.gax.grpc.GrpcCallableFactory;
-import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.videointelligence.v1.AnnotateVideoProgress;
-import com.google.cloud.videointelligence.v1.AnnotateVideoRequest;
-import com.google.cloud.videointelligence.v1.AnnotateVideoResponse;
-import com.google.longrunning.Operation;
-import com.google.longrunning.stub.GrpcOperationsStub;
-import io.grpc.MethodDescriptor;
-import io.grpc.protobuf.ProtoUtils;
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * gRPC stub implementation for Cloud Video Intelligence API.
- *
- *
This class is for advanced usage and reflects the underlying API directly.
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
-public class GrpcVideoIntelligenceServiceStub extends VideoIntelligenceServiceStub {
-
- private static final MethodDescriptor
- annotateVideoMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(
- "google.cloud.videointelligence.v1.VideoIntelligenceService/AnnotateVideo")
- .setRequestMarshaller(
- ProtoUtils.marshaller(AnnotateVideoRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
- .build();
-
- private final BackgroundResource backgroundResources;
- private final GrpcOperationsStub operationsStub;
-
- private final UnaryCallable annotateVideoCallable;
- private final OperationCallable<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationCallable;
-
- public static final GrpcVideoIntelligenceServiceStub create(
- VideoIntelligenceServiceStubSettings settings) throws IOException {
- return new GrpcVideoIntelligenceServiceStub(settings, ClientContext.create(settings));
- }
-
- public static final GrpcVideoIntelligenceServiceStub create(ClientContext clientContext)
- throws IOException {
- return new GrpcVideoIntelligenceServiceStub(
- VideoIntelligenceServiceStubSettings.newBuilder().build(), clientContext);
- }
-
- /**
- * Constructs an instance of GrpcVideoIntelligenceServiceStub, using the given settings. This is
- * protected so that it is easy to make a subclass, but otherwise, the static factory methods
- * should be preferred.
- */
- protected GrpcVideoIntelligenceServiceStub(
- VideoIntelligenceServiceStubSettings settings, ClientContext clientContext)
- throws IOException {
- this.operationsStub = GrpcOperationsStub.create(clientContext);
-
- GrpcCallSettings annotateVideoTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(annotateVideoMethodDescriptor)
- .build();
-
- this.annotateVideoCallable =
- GrpcCallableFactory.createUnaryCallable(
- annotateVideoTransportSettings, settings.annotateVideoSettings(), clientContext);
- this.annotateVideoOperationCallable =
- GrpcCallableFactory.createOperationCallable(
- annotateVideoTransportSettings,
- settings.annotateVideoOperationSettings(),
- clientContext,
- this.operationsStub);
-
- backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
- }
-
- public GrpcOperationsStub getOperationsStub() {
- return operationsStub;
- }
-
- public OperationCallable
- annotateVideoOperationCallable() {
- return annotateVideoOperationCallable;
- }
-
- public UnaryCallable annotateVideoCallable() {
- return annotateVideoCallable;
- }
-
- @Override
- public final void close() throws Exception {
- shutdown();
- }
-
- @Override
- public void shutdown() {
- backgroundResources.shutdown();
- }
-
- @Override
- public boolean isShutdown() {
- return backgroundResources.isShutdown();
- }
-
- @Override
- public boolean isTerminated() {
- return backgroundResources.isTerminated();
- }
-
- @Override
- public void shutdownNow() {
- backgroundResources.shutdownNow();
- }
-
- @Override
- public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
- return backgroundResources.awaitTermination(duration, unit);
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStub.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStub.java
deleted file mode 100644
index b322f92bbfd2..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStub.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1.stub;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.videointelligence.v1.AnnotateVideoProgress;
-import com.google.cloud.videointelligence.v1.AnnotateVideoRequest;
-import com.google.cloud.videointelligence.v1.AnnotateVideoResponse;
-import com.google.longrunning.Operation;
-import com.google.longrunning.stub.OperationsStub;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Base stub class for Cloud Video Intelligence API.
- *
- *
This class is for advanced usage and reflects the underlying API directly.
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
-public abstract class VideoIntelligenceServiceStub implements BackgroundResource {
-
- public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
- }
-
- public OperationCallable
- annotateVideoOperationCallable() {
- throw new UnsupportedOperationException("Not implemented: annotateVideoOperationCallable()");
- }
-
- public UnaryCallable annotateVideoCallable() {
- throw new UnsupportedOperationException("Not implemented: annotateVideoCallable()");
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStubSettings.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStubSettings.java
deleted file mode 100644
index 88b2f426bf36..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1/stub/VideoIntelligenceServiceStubSettings.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1.stub;
-
-import com.google.api.core.ApiFunction;
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.GaxProperties;
-import com.google.api.gax.core.GoogleCredentialsProvider;
-import com.google.api.gax.core.InstantiatingExecutorProvider;
-import com.google.api.gax.grpc.GaxGrpcProperties;
-import com.google.api.gax.grpc.GrpcTransportChannel;
-import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
-import com.google.api.gax.grpc.ProtoOperationTransformers;
-import com.google.api.gax.longrunning.OperationSnapshot;
-import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
-import com.google.api.gax.retrying.RetrySettings;
-import com.google.api.gax.rpc.ApiClientHeaderProvider;
-import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.OperationCallSettings;
-import com.google.api.gax.rpc.StatusCode;
-import com.google.api.gax.rpc.StubSettings;
-import com.google.api.gax.rpc.TransportChannelProvider;
-import com.google.api.gax.rpc.UnaryCallSettings;
-import com.google.cloud.videointelligence.v1.AnnotateVideoProgress;
-import com.google.cloud.videointelligence.v1.AnnotateVideoRequest;
-import com.google.cloud.videointelligence.v1.AnnotateVideoResponse;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-import com.google.longrunning.Operation;
-import java.io.IOException;
-import java.util.List;
-import javax.annotation.Generated;
-import org.threeten.bp.Duration;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Settings class to configure an instance of {@link VideoIntelligenceServiceStub}.
- *
- *
The default instance has everything set to sensible defaults:
- *
- *
- *
The default service address (videointelligence.googleapis.com) and default port (443) are
- * used.
- *
Credentials are acquired automatically through Application Default Credentials.
- *
Retries are configured for idempotent methods but not for non-idempotent methods.
- *
- *
- *
The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object. For
- * example, to set the total timeout of annotateVideoAsync to 30 seconds:
- *
- *
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi
-public class VideoIntelligenceServiceStubSettings
- extends StubSettings {
- /** The default scopes of the service. */
- private static final ImmutableList DEFAULT_SERVICE_SCOPES =
- ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
-
- private final UnaryCallSettings annotateVideoSettings;
- private final OperationCallSettings<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings;
-
- /** Returns the object with the settings used for calls to annotateVideo. */
- public UnaryCallSettings annotateVideoSettings() {
- return annotateVideoSettings;
- }
-
- /** Returns the object with the settings used for calls to annotateVideo. */
- public OperationCallSettings
- annotateVideoOperationSettings() {
- return annotateVideoOperationSettings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public VideoIntelligenceServiceStub createStub() throws IOException {
- if (getTransportChannelProvider()
- .getTransportName()
- .equals(GrpcTransportChannel.getGrpcTransportName())) {
- return GrpcVideoIntelligenceServiceStub.create(this);
- } else {
- throw new UnsupportedOperationException(
- "Transport not supported: " + getTransportChannelProvider().getTransportName());
- }
- }
-
- /** Returns a builder for the default ExecutorProvider for this service. */
- public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
- return InstantiatingExecutorProvider.newBuilder();
- }
-
- /** Returns the default service endpoint. */
- public static String getDefaultEndpoint() {
- return "videointelligence.googleapis.com:443";
- }
-
- /** Returns the default service scopes. */
- public static List getDefaultServiceScopes() {
- return DEFAULT_SERVICE_SCOPES;
- }
-
- /** Returns a builder for the default credentials for this service. */
- public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
- return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
- }
-
- /** Returns a builder for the default ChannelProvider for this service. */
- public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
- return InstantiatingGrpcChannelProvider.newBuilder();
- }
-
- public static TransportChannelProvider defaultTransportChannelProvider() {
- return defaultGrpcTransportProviderBuilder().build();
- }
-
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
- return ApiClientHeaderProvider.newBuilder()
- .setGeneratedLibToken(
- "gapic", GaxProperties.getLibraryVersion(VideoIntelligenceServiceStubSettings.class))
- .setTransportToken(
- GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder() {
- return Builder.createDefault();
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder(ClientContext clientContext) {
- return new Builder(clientContext);
- }
-
- /** Returns a builder containing all the values of this settings class. */
- public Builder toBuilder() {
- return new Builder(this);
- }
-
- protected VideoIntelligenceServiceStubSettings(Builder settingsBuilder) throws IOException {
- super(settingsBuilder);
-
- annotateVideoSettings = settingsBuilder.annotateVideoSettings().build();
- annotateVideoOperationSettings = settingsBuilder.annotateVideoOperationSettings().build();
- }
-
- /** Builder for VideoIntelligenceServiceStubSettings. */
- public static class Builder
- extends StubSettings.Builder {
- private final ImmutableList> unaryMethodSettingsBuilders;
-
- private final UnaryCallSettings.Builder annotateVideoSettings;
- private final OperationCallSettings.Builder<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings;
-
- private static final ImmutableMap>
- RETRYABLE_CODE_DEFINITIONS;
-
- static {
- ImmutableMap.Builder> definitions =
- ImmutableMap.builder();
- definitions.put(
- "idempotent",
- ImmutableSet.copyOf(
- Lists.newArrayList(
- StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
- definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList()));
- RETRYABLE_CODE_DEFINITIONS = definitions.build();
- }
-
- private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
-
- static {
- ImmutableMap.Builder definitions = ImmutableMap.builder();
- RetrySettings settings = null;
- settings =
- RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1000L))
- .setRetryDelayMultiplier(2.5)
- .setMaxRetryDelay(Duration.ofMillis(120000L))
- .setInitialRpcTimeout(Duration.ofMillis(120000L))
- .setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(120000L))
- .setTotalTimeout(Duration.ofMillis(600000L))
- .build();
- definitions.put("default", settings);
- RETRY_PARAM_DEFINITIONS = definitions.build();
- }
-
- protected Builder() {
- this((ClientContext) null);
- }
-
- protected Builder(ClientContext clientContext) {
- super(clientContext);
-
- annotateVideoSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
- annotateVideoOperationSettings = OperationCallSettings.newBuilder();
-
- unaryMethodSettingsBuilders =
- ImmutableList.>of(annotateVideoSettings);
-
- initDefaults(this);
- }
-
- private static Builder createDefault() {
- Builder builder = new Builder((ClientContext) null);
- builder.setTransportChannelProvider(defaultTransportChannelProvider());
- builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
- builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
- builder.setEndpoint(getDefaultEndpoint());
- return initDefaults(builder);
- }
-
- private static Builder initDefaults(Builder builder) {
-
- builder
- .annotateVideoSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
- builder
- .annotateVideoOperationSettings()
- .setInitialCallSettings(
- UnaryCallSettings
- .newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
- .build())
- .setResponseTransformer(
- ProtoOperationTransformers.ResponseTransformer.create(AnnotateVideoResponse.class))
- .setMetadataTransformer(
- ProtoOperationTransformers.MetadataTransformer.create(AnnotateVideoProgress.class))
- .setPollingAlgorithm(
- OperationTimedPollAlgorithm.create(
- RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(20000L))
- .setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO) // ignored
- .setRpcTimeoutMultiplier(1.0) // ignored
- .setMaxRpcTimeout(Duration.ZERO) // ignored
- .setTotalTimeout(Duration.ofMillis(86400000L))
- .build()));
-
- return builder;
- }
-
- protected Builder(VideoIntelligenceServiceStubSettings settings) {
- super(settings);
-
- annotateVideoSettings = settings.annotateVideoSettings.toBuilder();
- annotateVideoOperationSettings = settings.annotateVideoOperationSettings.toBuilder();
-
- unaryMethodSettingsBuilders =
- ImmutableList.>of(annotateVideoSettings);
- }
-
- /**
- * Applies the given settings updater function to all of the unary API methods in this service.
- *
- *
Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
- super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
- return this;
- }
-
- public ImmutableList> unaryMethodSettingsBuilders() {
- return unaryMethodSettingsBuilders;
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public UnaryCallSettings.Builder annotateVideoSettings() {
- return annotateVideoSettings;
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public OperationCallSettings.Builder<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings() {
- return annotateVideoOperationSettings;
- }
-
- @Override
- public VideoIntelligenceServiceStubSettings build() throws IOException {
- return new VideoIntelligenceServiceStubSettings(this);
- }
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceClient.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceClient.java
deleted file mode 100644
index 131e92b0574e..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceClient.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta1;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.longrunning.OperationFuture;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.videointelligence.v1beta1.stub.VideoIntelligenceServiceStub;
-import com.google.cloud.videointelligence.v1beta1.stub.VideoIntelligenceServiceStubSettings;
-import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
-import java.io.IOException;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND SERVICE
-/**
- * Service Description: Service that implements Google Cloud Video Intelligence API.
- *
- *
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:
- *
- *
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().
- *
- *
The surface of this class includes several types of Java methods for each of the API's
- * methods:
- *
- *
- *
A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available as
- * parameters, and not every API method will have a flattened method entry point.
- *
A "request object" method. This type of method only takes one parameter, a request object,
- * which must be constructed before the call. Not every API method will have a request object
- * method.
- *
A "callable" method. This type of method takes no parameters and returns an immutable API
- * callable object, which can be used to initiate calls to the service.
- *
- *
- *
See the individual methods for example code.
- *
- *
Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- *
This class can be customized by passing in a custom instance of
- * VideoIntelligenceServiceSettings to create(). For example:
- *
- *
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi
-public class VideoIntelligenceServiceClient implements BackgroundResource {
- private final VideoIntelligenceServiceSettings settings;
- private final VideoIntelligenceServiceStub stub;
- private final OperationsClient operationsClient;
-
- /** Constructs an instance of VideoIntelligenceServiceClient with default settings. */
- public static final VideoIntelligenceServiceClient create() throws IOException {
- return create(VideoIntelligenceServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of VideoIntelligenceServiceClient, using the given settings. The
- * channels are created based on the settings passed in, or defaults for any settings that are not
- * set.
- */
- public static final VideoIntelligenceServiceClient create(
- VideoIntelligenceServiceSettings settings) throws IOException {
- return new VideoIntelligenceServiceClient(settings);
- }
-
- /**
- * Constructs an instance of VideoIntelligenceServiceClient, using the given stub for making
- * calls. This is for advanced usage - prefer to use VideoIntelligenceServiceSettings}.
- */
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public static final VideoIntelligenceServiceClient create(VideoIntelligenceServiceStub stub) {
- return new VideoIntelligenceServiceClient(stub);
- }
-
- /**
- * Constructs an instance of VideoIntelligenceServiceClient, using the given settings. This is
- * protected so that it is easy to make a subclass, but otherwise, the static factory methods
- * should be preferred.
- */
- protected VideoIntelligenceServiceClient(VideoIntelligenceServiceSettings settings)
- throws IOException {
- this.settings = settings;
- this.stub = ((VideoIntelligenceServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- protected VideoIntelligenceServiceClient(VideoIntelligenceServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- public final VideoIntelligenceServiceSettings getSettings() {
- return settings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public VideoIntelligenceServiceStub getStub() {
- return stub;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- public final OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Performs asynchronous video annotation. Progress and results can be retrieved through the
- * `google.longrunning.Operations` interface. `Operation.metadata` contains
- * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse`
- * (results).
- *
- *
- *
- * @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
- * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more
- * information, see [Request URIs](/storage/docs/reference-uris). A video URI may include
- * wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*'
- * to match 0 or more characters; '?' to match 1 character. If unset, the input video should
- * be embedded in the request as `input_content`. If set, `input_content` should be unset.
- * @param features Requested video annotation features.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture annotateVideoAsync(
- String inputUri, List features) {
-
- AnnotateVideoRequest request =
- AnnotateVideoRequest.newBuilder().setInputUri(inputUri).addAllFeatures(features).build();
- return annotateVideoAsync(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Performs asynchronous video annotation. Progress and results can be retrieved through the
- * `google.longrunning.Operations` interface. `Operation.metadata` contains
- * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse`
- * (results).
- *
- *
- *
- * @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
- */
- public final OperationFuture annotateVideoAsync(
- AnnotateVideoRequest request) {
- return annotateVideoOperationCallable().futureCall(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Performs asynchronous video annotation. Progress and results can be retrieved through the
- * `google.longrunning.Operations` interface. `Operation.metadata` contains
- * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse`
- * (results).
- *
- *
- */
- public final UnaryCallable annotateVideoCallable() {
- return stub.annotateVideoCallable();
- }
-
- @Override
- public final void close() throws Exception {
- stub.close();
- }
-
- @Override
- public void shutdown() {
- stub.shutdown();
- }
-
- @Override
- public boolean isShutdown() {
- return stub.isShutdown();
- }
-
- @Override
- public boolean isTerminated() {
- return stub.isTerminated();
- }
-
- @Override
- public void shutdownNow() {
- stub.shutdownNow();
- }
-
- @Override
- public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
- return stub.awaitTermination(duration, unit);
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceSettings.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceSettings.java
deleted file mode 100644
index dea9309efe19..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceSettings.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta1;
-
-import com.google.api.core.ApiFunction;
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.GoogleCredentialsProvider;
-import com.google.api.gax.core.InstantiatingExecutorProvider;
-import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
-import com.google.api.gax.rpc.ApiClientHeaderProvider;
-import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.ClientSettings;
-import com.google.api.gax.rpc.OperationCallSettings;
-import com.google.api.gax.rpc.TransportChannelProvider;
-import com.google.api.gax.rpc.UnaryCallSettings;
-import com.google.cloud.videointelligence.v1beta1.stub.VideoIntelligenceServiceStubSettings;
-import com.google.longrunning.Operation;
-import java.io.IOException;
-import java.util.List;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Settings class to configure an instance of {@link VideoIntelligenceServiceClient}.
- *
- *
The default instance has everything set to sensible defaults:
- *
- *
- *
The default service address (videointelligence.googleapis.com) and default port (443) are
- * used.
- *
Credentials are acquired automatically through Application Default Credentials.
- *
Retries are configured for idempotent methods but not for non-idempotent methods.
- *
- *
- *
The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object. For
- * example, to set the total timeout of annotateVideoAsync to 30 seconds:
- *
- *
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi
-public class VideoIntelligenceServiceSettings
- extends ClientSettings {
- /** Returns the object with the settings used for calls to annotateVideo. */
- public UnaryCallSettings annotateVideoSettings() {
- return ((VideoIntelligenceServiceStubSettings) getStubSettings()).annotateVideoSettings();
- }
-
- /** Returns the object with the settings used for calls to annotateVideo. */
- public OperationCallSettings
- annotateVideoOperationSettings() {
- return ((VideoIntelligenceServiceStubSettings) getStubSettings())
- .annotateVideoOperationSettings();
- }
-
- public static final VideoIntelligenceServiceSettings create(
- VideoIntelligenceServiceStubSettings stub) throws IOException {
- return new VideoIntelligenceServiceSettings.Builder(stub.toBuilder()).build();
- }
-
- /** Returns a builder for the default ExecutorProvider for this service. */
- public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultExecutorProviderBuilder();
- }
-
- /** Returns the default service endpoint. */
- public static String getDefaultEndpoint() {
- return VideoIntelligenceServiceStubSettings.getDefaultEndpoint();
- }
-
- /** Returns the default service scopes. */
- public static List getDefaultServiceScopes() {
- return VideoIntelligenceServiceStubSettings.getDefaultServiceScopes();
- }
-
- /** Returns a builder for the default credentials for this service. */
- public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultCredentialsProviderBuilder();
- }
-
- /** Returns a builder for the default ChannelProvider for this service. */
- public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultGrpcTransportProviderBuilder();
- }
-
- public static TransportChannelProvider defaultTransportChannelProvider() {
- return VideoIntelligenceServiceStubSettings.defaultTransportChannelProvider();
- }
-
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultApiClientHeaderProviderBuilder();
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder() {
- return Builder.createDefault();
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder(ClientContext clientContext) {
- return new Builder(clientContext);
- }
-
- /** Returns a builder containing all the values of this settings class. */
- public Builder toBuilder() {
- return new Builder(this);
- }
-
- protected VideoIntelligenceServiceSettings(Builder settingsBuilder) throws IOException {
- super(settingsBuilder);
- }
-
- /** Builder for VideoIntelligenceServiceSettings. */
- public static class Builder
- extends ClientSettings.Builder {
- protected Builder() throws IOException {
- this((ClientContext) null);
- }
-
- protected Builder(ClientContext clientContext) {
- super(VideoIntelligenceServiceStubSettings.newBuilder(clientContext));
- }
-
- private static Builder createDefault() {
- return new Builder(VideoIntelligenceServiceStubSettings.newBuilder());
- }
-
- protected Builder(VideoIntelligenceServiceSettings settings) {
- super(settings.getStubSettings().toBuilder());
- }
-
- protected Builder(VideoIntelligenceServiceStubSettings.Builder stubSettings) {
- super(stubSettings);
- }
-
- public VideoIntelligenceServiceStubSettings.Builder getStubSettingsBuilder() {
- return ((VideoIntelligenceServiceStubSettings.Builder) getStubSettings());
- }
-
- /**
- * Applies the given settings updater function to all of the unary API methods in this service.
- *
- *
Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
- super.applyToAllUnaryMethods(
- getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
- return this;
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public UnaryCallSettings.Builder annotateVideoSettings() {
- return getStubSettingsBuilder().annotateVideoSettings();
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public OperationCallSettings.Builder<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings() {
- return getStubSettingsBuilder().annotateVideoOperationSettings();
- }
-
- @Override
- public VideoIntelligenceServiceSettings build() throws IOException {
- return new VideoIntelligenceServiceSettings(this);
- }
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/package-info.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/package-info.java
deleted file mode 100644
index 5b481c51c40b..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/package-info.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * A client to Google Cloud Video Intelligence API.
- *
- *
The interfaces provided are listed below, along with usage samples.
- *
- *
- */
-package com.google.cloud.videointelligence.v1beta1;
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/GrpcVideoIntelligenceServiceStub.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/GrpcVideoIntelligenceServiceStub.java
deleted file mode 100644
index 1329acdf7efd..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/GrpcVideoIntelligenceServiceStub.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta1.stub;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.core.BackgroundResourceAggregation;
-import com.google.api.gax.grpc.GrpcCallSettings;
-import com.google.api.gax.grpc.GrpcCallableFactory;
-import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.videointelligence.v1beta1.AnnotateVideoProgress;
-import com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest;
-import com.google.cloud.videointelligence.v1beta1.AnnotateVideoResponse;
-import com.google.longrunning.Operation;
-import com.google.longrunning.stub.GrpcOperationsStub;
-import io.grpc.MethodDescriptor;
-import io.grpc.protobuf.ProtoUtils;
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * gRPC stub implementation for Google Cloud Video Intelligence API.
- *
- *
This class is for advanced usage and reflects the underlying API directly.
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
-public class GrpcVideoIntelligenceServiceStub extends VideoIntelligenceServiceStub {
-
- private static final MethodDescriptor
- annotateVideoMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(
- "google.cloud.videointelligence.v1beta1.VideoIntelligenceService/AnnotateVideo")
- .setRequestMarshaller(
- ProtoUtils.marshaller(AnnotateVideoRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
- .build();
-
- private final BackgroundResource backgroundResources;
- private final GrpcOperationsStub operationsStub;
-
- private final UnaryCallable annotateVideoCallable;
- private final OperationCallable<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationCallable;
-
- public static final GrpcVideoIntelligenceServiceStub create(
- VideoIntelligenceServiceStubSettings settings) throws IOException {
- return new GrpcVideoIntelligenceServiceStub(settings, ClientContext.create(settings));
- }
-
- public static final GrpcVideoIntelligenceServiceStub create(ClientContext clientContext)
- throws IOException {
- return new GrpcVideoIntelligenceServiceStub(
- VideoIntelligenceServiceStubSettings.newBuilder().build(), clientContext);
- }
-
- /**
- * Constructs an instance of GrpcVideoIntelligenceServiceStub, using the given settings. This is
- * protected so that it is easy to make a subclass, but otherwise, the static factory methods
- * should be preferred.
- */
- protected GrpcVideoIntelligenceServiceStub(
- VideoIntelligenceServiceStubSettings settings, ClientContext clientContext)
- throws IOException {
- this.operationsStub = GrpcOperationsStub.create(clientContext);
-
- GrpcCallSettings annotateVideoTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(annotateVideoMethodDescriptor)
- .build();
-
- this.annotateVideoCallable =
- GrpcCallableFactory.createUnaryCallable(
- annotateVideoTransportSettings, settings.annotateVideoSettings(), clientContext);
- this.annotateVideoOperationCallable =
- GrpcCallableFactory.createOperationCallable(
- annotateVideoTransportSettings,
- settings.annotateVideoOperationSettings(),
- clientContext,
- this.operationsStub);
-
- backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
- }
-
- public GrpcOperationsStub getOperationsStub() {
- return operationsStub;
- }
-
- public OperationCallable
- annotateVideoOperationCallable() {
- return annotateVideoOperationCallable;
- }
-
- public UnaryCallable annotateVideoCallable() {
- return annotateVideoCallable;
- }
-
- @Override
- public final void close() throws Exception {
- shutdown();
- }
-
- @Override
- public void shutdown() {
- backgroundResources.shutdown();
- }
-
- @Override
- public boolean isShutdown() {
- return backgroundResources.isShutdown();
- }
-
- @Override
- public boolean isTerminated() {
- return backgroundResources.isTerminated();
- }
-
- @Override
- public void shutdownNow() {
- backgroundResources.shutdownNow();
- }
-
- @Override
- public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
- return backgroundResources.awaitTermination(duration, unit);
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStub.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStub.java
deleted file mode 100644
index c7d49c7ca3fb..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStub.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta1.stub;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.videointelligence.v1beta1.AnnotateVideoProgress;
-import com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest;
-import com.google.cloud.videointelligence.v1beta1.AnnotateVideoResponse;
-import com.google.longrunning.Operation;
-import com.google.longrunning.stub.OperationsStub;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Base stub class for Google Cloud Video Intelligence API.
- *
- *
This class is for advanced usage and reflects the underlying API directly.
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
-public abstract class VideoIntelligenceServiceStub implements BackgroundResource {
-
- public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
- }
-
- public OperationCallable
- annotateVideoOperationCallable() {
- throw new UnsupportedOperationException("Not implemented: annotateVideoOperationCallable()");
- }
-
- public UnaryCallable annotateVideoCallable() {
- throw new UnsupportedOperationException("Not implemented: annotateVideoCallable()");
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStubSettings.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStubSettings.java
deleted file mode 100644
index 4da697fb1e53..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta1/stub/VideoIntelligenceServiceStubSettings.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta1.stub;
-
-import com.google.api.core.ApiFunction;
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.GaxProperties;
-import com.google.api.gax.core.GoogleCredentialsProvider;
-import com.google.api.gax.core.InstantiatingExecutorProvider;
-import com.google.api.gax.grpc.GaxGrpcProperties;
-import com.google.api.gax.grpc.GrpcTransportChannel;
-import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
-import com.google.api.gax.grpc.ProtoOperationTransformers;
-import com.google.api.gax.longrunning.OperationSnapshot;
-import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
-import com.google.api.gax.retrying.RetrySettings;
-import com.google.api.gax.rpc.ApiClientHeaderProvider;
-import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.OperationCallSettings;
-import com.google.api.gax.rpc.StatusCode;
-import com.google.api.gax.rpc.StubSettings;
-import com.google.api.gax.rpc.TransportChannelProvider;
-import com.google.api.gax.rpc.UnaryCallSettings;
-import com.google.cloud.videointelligence.v1beta1.AnnotateVideoProgress;
-import com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest;
-import com.google.cloud.videointelligence.v1beta1.AnnotateVideoResponse;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-import com.google.longrunning.Operation;
-import java.io.IOException;
-import java.util.List;
-import javax.annotation.Generated;
-import org.threeten.bp.Duration;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Settings class to configure an instance of {@link VideoIntelligenceServiceStub}.
- *
- *
The default instance has everything set to sensible defaults:
- *
- *
- *
The default service address (videointelligence.googleapis.com) and default port (443) are
- * used.
- *
Credentials are acquired automatically through Application Default Credentials.
- *
Retries are configured for idempotent methods but not for non-idempotent methods.
- *
- *
- *
The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object. For
- * example, to set the total timeout of annotateVideoAsync to 30 seconds:
- *
- *
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi
-public class VideoIntelligenceServiceStubSettings
- extends StubSettings {
- /** The default scopes of the service. */
- private static final ImmutableList DEFAULT_SERVICE_SCOPES =
- ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
-
- private final UnaryCallSettings annotateVideoSettings;
- private final OperationCallSettings<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings;
-
- /** Returns the object with the settings used for calls to annotateVideo. */
- public UnaryCallSettings annotateVideoSettings() {
- return annotateVideoSettings;
- }
-
- /** Returns the object with the settings used for calls to annotateVideo. */
- public OperationCallSettings
- annotateVideoOperationSettings() {
- return annotateVideoOperationSettings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public VideoIntelligenceServiceStub createStub() throws IOException {
- if (getTransportChannelProvider()
- .getTransportName()
- .equals(GrpcTransportChannel.getGrpcTransportName())) {
- return GrpcVideoIntelligenceServiceStub.create(this);
- } else {
- throw new UnsupportedOperationException(
- "Transport not supported: " + getTransportChannelProvider().getTransportName());
- }
- }
-
- /** Returns a builder for the default ExecutorProvider for this service. */
- public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
- return InstantiatingExecutorProvider.newBuilder();
- }
-
- /** Returns the default service endpoint. */
- public static String getDefaultEndpoint() {
- return "videointelligence.googleapis.com:443";
- }
-
- /** Returns the default service scopes. */
- public static List getDefaultServiceScopes() {
- return DEFAULT_SERVICE_SCOPES;
- }
-
- /** Returns a builder for the default credentials for this service. */
- public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
- return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
- }
-
- /** Returns a builder for the default ChannelProvider for this service. */
- public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
- return InstantiatingGrpcChannelProvider.newBuilder();
- }
-
- public static TransportChannelProvider defaultTransportChannelProvider() {
- return defaultGrpcTransportProviderBuilder().build();
- }
-
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
- return ApiClientHeaderProvider.newBuilder()
- .setGeneratedLibToken(
- "gapic", GaxProperties.getLibraryVersion(VideoIntelligenceServiceStubSettings.class))
- .setTransportToken(
- GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder() {
- return Builder.createDefault();
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder(ClientContext clientContext) {
- return new Builder(clientContext);
- }
-
- /** Returns a builder containing all the values of this settings class. */
- public Builder toBuilder() {
- return new Builder(this);
- }
-
- protected VideoIntelligenceServiceStubSettings(Builder settingsBuilder) throws IOException {
- super(settingsBuilder);
-
- annotateVideoSettings = settingsBuilder.annotateVideoSettings().build();
- annotateVideoOperationSettings = settingsBuilder.annotateVideoOperationSettings().build();
- }
-
- /** Builder for VideoIntelligenceServiceStubSettings. */
- public static class Builder
- extends StubSettings.Builder {
- private final ImmutableList> unaryMethodSettingsBuilders;
-
- private final UnaryCallSettings.Builder annotateVideoSettings;
- private final OperationCallSettings.Builder<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings;
-
- private static final ImmutableMap>
- RETRYABLE_CODE_DEFINITIONS;
-
- static {
- ImmutableMap.Builder> definitions =
- ImmutableMap.builder();
- definitions.put(
- "idempotent",
- ImmutableSet.copyOf(
- Lists.newArrayList(
- StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
- definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList()));
- RETRYABLE_CODE_DEFINITIONS = definitions.build();
- }
-
- private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
-
- static {
- ImmutableMap.Builder definitions = ImmutableMap.builder();
- RetrySettings settings = null;
- settings =
- RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1000L))
- .setRetryDelayMultiplier(2.5)
- .setMaxRetryDelay(Duration.ofMillis(120000L))
- .setInitialRpcTimeout(Duration.ofMillis(120000L))
- .setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(120000L))
- .setTotalTimeout(Duration.ofMillis(600000L))
- .build();
- definitions.put("default", settings);
- RETRY_PARAM_DEFINITIONS = definitions.build();
- }
-
- protected Builder() {
- this((ClientContext) null);
- }
-
- protected Builder(ClientContext clientContext) {
- super(clientContext);
-
- annotateVideoSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
- annotateVideoOperationSettings = OperationCallSettings.newBuilder();
-
- unaryMethodSettingsBuilders =
- ImmutableList.>of(annotateVideoSettings);
-
- initDefaults(this);
- }
-
- private static Builder createDefault() {
- Builder builder = new Builder((ClientContext) null);
- builder.setTransportChannelProvider(defaultTransportChannelProvider());
- builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
- builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
- builder.setEndpoint(getDefaultEndpoint());
- return initDefaults(builder);
- }
-
- private static Builder initDefaults(Builder builder) {
-
- builder
- .annotateVideoSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
- builder
- .annotateVideoOperationSettings()
- .setInitialCallSettings(
- UnaryCallSettings
- .newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
- .build())
- .setResponseTransformer(
- ProtoOperationTransformers.ResponseTransformer.create(AnnotateVideoResponse.class))
- .setMetadataTransformer(
- ProtoOperationTransformers.MetadataTransformer.create(AnnotateVideoProgress.class))
- .setPollingAlgorithm(
- OperationTimedPollAlgorithm.create(
- RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(20000L))
- .setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO) // ignored
- .setRpcTimeoutMultiplier(1.0) // ignored
- .setMaxRpcTimeout(Duration.ZERO) // ignored
- .setTotalTimeout(Duration.ofMillis(86400000L))
- .build()));
-
- return builder;
- }
-
- protected Builder(VideoIntelligenceServiceStubSettings settings) {
- super(settings);
-
- annotateVideoSettings = settings.annotateVideoSettings.toBuilder();
- annotateVideoOperationSettings = settings.annotateVideoOperationSettings.toBuilder();
-
- unaryMethodSettingsBuilders =
- ImmutableList.>of(annotateVideoSettings);
- }
-
- /**
- * Applies the given settings updater function to all of the unary API methods in this service.
- *
- *
Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
- super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
- return this;
- }
-
- public ImmutableList> unaryMethodSettingsBuilders() {
- return unaryMethodSettingsBuilders;
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public UnaryCallSettings.Builder annotateVideoSettings() {
- return annotateVideoSettings;
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public OperationCallSettings.Builder<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings() {
- return annotateVideoOperationSettings;
- }
-
- @Override
- public VideoIntelligenceServiceStubSettings build() throws IOException {
- return new VideoIntelligenceServiceStubSettings(this);
- }
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceClient.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceClient.java
deleted file mode 100644
index fd8bd71161ec..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceClient.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta2;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.longrunning.OperationFuture;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.videointelligence.v1beta2.stub.VideoIntelligenceServiceStub;
-import com.google.cloud.videointelligence.v1beta2.stub.VideoIntelligenceServiceStubSettings;
-import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
-import java.io.IOException;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND SERVICE
-/**
- * Service Description: Service that implements Google Cloud Video Intelligence API.
- *
- *
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:
- *
- *
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().
- *
- *
The surface of this class includes several types of Java methods for each of the API's
- * methods:
- *
- *
- *
A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available as
- * parameters, and not every API method will have a flattened method entry point.
- *
A "request object" method. This type of method only takes one parameter, a request object,
- * which must be constructed before the call. Not every API method will have a request object
- * method.
- *
A "callable" method. This type of method takes no parameters and returns an immutable API
- * callable object, which can be used to initiate calls to the service.
- *
- *
- *
See the individual methods for example code.
- *
- *
Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- *
This class can be customized by passing in a custom instance of
- * VideoIntelligenceServiceSettings to create(). For example:
- *
- *
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi
-public class VideoIntelligenceServiceClient implements BackgroundResource {
- private final VideoIntelligenceServiceSettings settings;
- private final VideoIntelligenceServiceStub stub;
- private final OperationsClient operationsClient;
-
- /** Constructs an instance of VideoIntelligenceServiceClient with default settings. */
- public static final VideoIntelligenceServiceClient create() throws IOException {
- return create(VideoIntelligenceServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of VideoIntelligenceServiceClient, using the given settings. The
- * channels are created based on the settings passed in, or defaults for any settings that are not
- * set.
- */
- public static final VideoIntelligenceServiceClient create(
- VideoIntelligenceServiceSettings settings) throws IOException {
- return new VideoIntelligenceServiceClient(settings);
- }
-
- /**
- * Constructs an instance of VideoIntelligenceServiceClient, using the given stub for making
- * calls. This is for advanced usage - prefer to use VideoIntelligenceServiceSettings}.
- */
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public static final VideoIntelligenceServiceClient create(VideoIntelligenceServiceStub stub) {
- return new VideoIntelligenceServiceClient(stub);
- }
-
- /**
- * Constructs an instance of VideoIntelligenceServiceClient, using the given settings. This is
- * protected so that it is easy to make a subclass, but otherwise, the static factory methods
- * should be preferred.
- */
- protected VideoIntelligenceServiceClient(VideoIntelligenceServiceSettings settings)
- throws IOException {
- this.settings = settings;
- this.stub = ((VideoIntelligenceServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- protected VideoIntelligenceServiceClient(VideoIntelligenceServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- public final VideoIntelligenceServiceSettings getSettings() {
- return settings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public VideoIntelligenceServiceStub getStub() {
- return stub;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- public final OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Performs asynchronous video annotation. Progress and results can be retrieved through the
- * `google.longrunning.Operations` interface. `Operation.metadata` contains
- * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse`
- * (results).
- *
- *
- *
- * @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
- * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more
- * information, see [Request URIs](/storage/docs/reference-uris). A video URI may include
- * wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*'
- * to match 0 or more characters; '?' to match 1 character. If unset, the input video should
- * be embedded in the request as `input_content`. If set, `input_content` should be unset.
- * @param features Requested video annotation features.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture annotateVideoAsync(
- String inputUri, List features) {
-
- AnnotateVideoRequest request =
- AnnotateVideoRequest.newBuilder().setInputUri(inputUri).addAllFeatures(features).build();
- return annotateVideoAsync(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Performs asynchronous video annotation. Progress and results can be retrieved through the
- * `google.longrunning.Operations` interface. `Operation.metadata` contains
- * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse`
- * (results).
- *
- *
- *
- * @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
- */
- public final OperationFuture annotateVideoAsync(
- AnnotateVideoRequest request) {
- return annotateVideoOperationCallable().futureCall(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Performs asynchronous video annotation. Progress and results can be retrieved through the
- * `google.longrunning.Operations` interface. `Operation.metadata` contains
- * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse`
- * (results).
- *
- *
- */
- public final UnaryCallable annotateVideoCallable() {
- return stub.annotateVideoCallable();
- }
-
- @Override
- public final void close() throws Exception {
- stub.close();
- }
-
- @Override
- public void shutdown() {
- stub.shutdown();
- }
-
- @Override
- public boolean isShutdown() {
- return stub.isShutdown();
- }
-
- @Override
- public boolean isTerminated() {
- return stub.isTerminated();
- }
-
- @Override
- public void shutdownNow() {
- stub.shutdownNow();
- }
-
- @Override
- public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
- return stub.awaitTermination(duration, unit);
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceSettings.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceSettings.java
deleted file mode 100644
index 3cfb898fd5a2..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/VideoIntelligenceServiceSettings.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta2;
-
-import com.google.api.core.ApiFunction;
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.GoogleCredentialsProvider;
-import com.google.api.gax.core.InstantiatingExecutorProvider;
-import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
-import com.google.api.gax.rpc.ApiClientHeaderProvider;
-import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.ClientSettings;
-import com.google.api.gax.rpc.OperationCallSettings;
-import com.google.api.gax.rpc.TransportChannelProvider;
-import com.google.api.gax.rpc.UnaryCallSettings;
-import com.google.cloud.videointelligence.v1beta2.stub.VideoIntelligenceServiceStubSettings;
-import com.google.longrunning.Operation;
-import java.io.IOException;
-import java.util.List;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Settings class to configure an instance of {@link VideoIntelligenceServiceClient}.
- *
- *
The default instance has everything set to sensible defaults:
- *
- *
- *
The default service address (videointelligence.googleapis.com) and default port (443) are
- * used.
- *
Credentials are acquired automatically through Application Default Credentials.
- *
Retries are configured for idempotent methods but not for non-idempotent methods.
- *
- *
- *
The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object. For
- * example, to set the total timeout of annotateVideoAsync to 30 seconds:
- *
- *
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi
-public class VideoIntelligenceServiceSettings
- extends ClientSettings {
- /** Returns the object with the settings used for calls to annotateVideo. */
- public UnaryCallSettings annotateVideoSettings() {
- return ((VideoIntelligenceServiceStubSettings) getStubSettings()).annotateVideoSettings();
- }
-
- /** Returns the object with the settings used for calls to annotateVideo. */
- public OperationCallSettings
- annotateVideoOperationSettings() {
- return ((VideoIntelligenceServiceStubSettings) getStubSettings())
- .annotateVideoOperationSettings();
- }
-
- public static final VideoIntelligenceServiceSettings create(
- VideoIntelligenceServiceStubSettings stub) throws IOException {
- return new VideoIntelligenceServiceSettings.Builder(stub.toBuilder()).build();
- }
-
- /** Returns a builder for the default ExecutorProvider for this service. */
- public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultExecutorProviderBuilder();
- }
-
- /** Returns the default service endpoint. */
- public static String getDefaultEndpoint() {
- return VideoIntelligenceServiceStubSettings.getDefaultEndpoint();
- }
-
- /** Returns the default service scopes. */
- public static List getDefaultServiceScopes() {
- return VideoIntelligenceServiceStubSettings.getDefaultServiceScopes();
- }
-
- /** Returns a builder for the default credentials for this service. */
- public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultCredentialsProviderBuilder();
- }
-
- /** Returns a builder for the default ChannelProvider for this service. */
- public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultGrpcTransportProviderBuilder();
- }
-
- public static TransportChannelProvider defaultTransportChannelProvider() {
- return VideoIntelligenceServiceStubSettings.defaultTransportChannelProvider();
- }
-
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
- return VideoIntelligenceServiceStubSettings.defaultApiClientHeaderProviderBuilder();
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder() {
- return Builder.createDefault();
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder(ClientContext clientContext) {
- return new Builder(clientContext);
- }
-
- /** Returns a builder containing all the values of this settings class. */
- public Builder toBuilder() {
- return new Builder(this);
- }
-
- protected VideoIntelligenceServiceSettings(Builder settingsBuilder) throws IOException {
- super(settingsBuilder);
- }
-
- /** Builder for VideoIntelligenceServiceSettings. */
- public static class Builder
- extends ClientSettings.Builder {
- protected Builder() throws IOException {
- this((ClientContext) null);
- }
-
- protected Builder(ClientContext clientContext) {
- super(VideoIntelligenceServiceStubSettings.newBuilder(clientContext));
- }
-
- private static Builder createDefault() {
- return new Builder(VideoIntelligenceServiceStubSettings.newBuilder());
- }
-
- protected Builder(VideoIntelligenceServiceSettings settings) {
- super(settings.getStubSettings().toBuilder());
- }
-
- protected Builder(VideoIntelligenceServiceStubSettings.Builder stubSettings) {
- super(stubSettings);
- }
-
- public VideoIntelligenceServiceStubSettings.Builder getStubSettingsBuilder() {
- return ((VideoIntelligenceServiceStubSettings.Builder) getStubSettings());
- }
-
- /**
- * Applies the given settings updater function to all of the unary API methods in this service.
- *
- *
Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
- super.applyToAllUnaryMethods(
- getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
- return this;
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public UnaryCallSettings.Builder annotateVideoSettings() {
- return getStubSettingsBuilder().annotateVideoSettings();
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public OperationCallSettings.Builder<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings() {
- return getStubSettingsBuilder().annotateVideoOperationSettings();
- }
-
- @Override
- public VideoIntelligenceServiceSettings build() throws IOException {
- return new VideoIntelligenceServiceSettings(this);
- }
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/package-info.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/package-info.java
deleted file mode 100644
index 5dc0160f8d7e..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/package-info.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * A client to Google Cloud Video Intelligence API.
- *
- *
The interfaces provided are listed below, along with usage samples.
- *
- *
- */
-package com.google.cloud.videointelligence.v1beta2;
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/GrpcVideoIntelligenceServiceStub.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/GrpcVideoIntelligenceServiceStub.java
deleted file mode 100644
index ba2685392268..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/GrpcVideoIntelligenceServiceStub.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta2.stub;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.core.BackgroundResourceAggregation;
-import com.google.api.gax.grpc.GrpcCallSettings;
-import com.google.api.gax.grpc.GrpcCallableFactory;
-import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.videointelligence.v1beta2.AnnotateVideoProgress;
-import com.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest;
-import com.google.cloud.videointelligence.v1beta2.AnnotateVideoResponse;
-import com.google.longrunning.Operation;
-import com.google.longrunning.stub.GrpcOperationsStub;
-import io.grpc.MethodDescriptor;
-import io.grpc.protobuf.ProtoUtils;
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * gRPC stub implementation for Google Cloud Video Intelligence API.
- *
- *
This class is for advanced usage and reflects the underlying API directly.
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
-public class GrpcVideoIntelligenceServiceStub extends VideoIntelligenceServiceStub {
-
- private static final MethodDescriptor
- annotateVideoMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(
- "google.cloud.videointelligence.v1beta2.VideoIntelligenceService/AnnotateVideo")
- .setRequestMarshaller(
- ProtoUtils.marshaller(AnnotateVideoRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
- .build();
-
- private final BackgroundResource backgroundResources;
- private final GrpcOperationsStub operationsStub;
-
- private final UnaryCallable annotateVideoCallable;
- private final OperationCallable<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationCallable;
-
- public static final GrpcVideoIntelligenceServiceStub create(
- VideoIntelligenceServiceStubSettings settings) throws IOException {
- return new GrpcVideoIntelligenceServiceStub(settings, ClientContext.create(settings));
- }
-
- public static final GrpcVideoIntelligenceServiceStub create(ClientContext clientContext)
- throws IOException {
- return new GrpcVideoIntelligenceServiceStub(
- VideoIntelligenceServiceStubSettings.newBuilder().build(), clientContext);
- }
-
- /**
- * Constructs an instance of GrpcVideoIntelligenceServiceStub, using the given settings. This is
- * protected so that it is easy to make a subclass, but otherwise, the static factory methods
- * should be preferred.
- */
- protected GrpcVideoIntelligenceServiceStub(
- VideoIntelligenceServiceStubSettings settings, ClientContext clientContext)
- throws IOException {
- this.operationsStub = GrpcOperationsStub.create(clientContext);
-
- GrpcCallSettings annotateVideoTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(annotateVideoMethodDescriptor)
- .build();
-
- this.annotateVideoCallable =
- GrpcCallableFactory.createUnaryCallable(
- annotateVideoTransportSettings, settings.annotateVideoSettings(), clientContext);
- this.annotateVideoOperationCallable =
- GrpcCallableFactory.createOperationCallable(
- annotateVideoTransportSettings,
- settings.annotateVideoOperationSettings(),
- clientContext,
- this.operationsStub);
-
- backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
- }
-
- public GrpcOperationsStub getOperationsStub() {
- return operationsStub;
- }
-
- public OperationCallable
- annotateVideoOperationCallable() {
- return annotateVideoOperationCallable;
- }
-
- public UnaryCallable annotateVideoCallable() {
- return annotateVideoCallable;
- }
-
- @Override
- public final void close() throws Exception {
- shutdown();
- }
-
- @Override
- public void shutdown() {
- backgroundResources.shutdown();
- }
-
- @Override
- public boolean isShutdown() {
- return backgroundResources.isShutdown();
- }
-
- @Override
- public boolean isTerminated() {
- return backgroundResources.isTerminated();
- }
-
- @Override
- public void shutdownNow() {
- backgroundResources.shutdownNow();
- }
-
- @Override
- public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
- return backgroundResources.awaitTermination(duration, unit);
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStub.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStub.java
deleted file mode 100644
index 6cf5324f40bb..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStub.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta2.stub;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.videointelligence.v1beta2.AnnotateVideoProgress;
-import com.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest;
-import com.google.cloud.videointelligence.v1beta2.AnnotateVideoResponse;
-import com.google.longrunning.Operation;
-import com.google.longrunning.stub.OperationsStub;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Base stub class for Google Cloud Video Intelligence API.
- *
- *
This class is for advanced usage and reflects the underlying API directly.
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
-public abstract class VideoIntelligenceServiceStub implements BackgroundResource {
-
- public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
- }
-
- public OperationCallable
- annotateVideoOperationCallable() {
- throw new UnsupportedOperationException("Not implemented: annotateVideoOperationCallable()");
- }
-
- public UnaryCallable annotateVideoCallable() {
- throw new UnsupportedOperationException("Not implemented: annotateVideoCallable()");
- }
-}
diff --git a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStubSettings.java b/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStubSettings.java
deleted file mode 100644
index 2e37558e95a2..000000000000
--- a/google-cloud-videointelligence/src/main/java/com/google/cloud/videointelligence/v1beta2/stub/VideoIntelligenceServiceStubSettings.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1beta2.stub;
-
-import com.google.api.core.ApiFunction;
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.GaxProperties;
-import com.google.api.gax.core.GoogleCredentialsProvider;
-import com.google.api.gax.core.InstantiatingExecutorProvider;
-import com.google.api.gax.grpc.GaxGrpcProperties;
-import com.google.api.gax.grpc.GrpcTransportChannel;
-import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
-import com.google.api.gax.grpc.ProtoOperationTransformers;
-import com.google.api.gax.longrunning.OperationSnapshot;
-import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
-import com.google.api.gax.retrying.RetrySettings;
-import com.google.api.gax.rpc.ApiClientHeaderProvider;
-import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.OperationCallSettings;
-import com.google.api.gax.rpc.StatusCode;
-import com.google.api.gax.rpc.StubSettings;
-import com.google.api.gax.rpc.TransportChannelProvider;
-import com.google.api.gax.rpc.UnaryCallSettings;
-import com.google.cloud.videointelligence.v1beta2.AnnotateVideoProgress;
-import com.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest;
-import com.google.cloud.videointelligence.v1beta2.AnnotateVideoResponse;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-import com.google.longrunning.Operation;
-import java.io.IOException;
-import java.util.List;
-import javax.annotation.Generated;
-import org.threeten.bp.Duration;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Settings class to configure an instance of {@link VideoIntelligenceServiceStub}.
- *
- *
The default instance has everything set to sensible defaults:
- *
- *
- *
The default service address (videointelligence.googleapis.com) and default port (443) are
- * used.
- *
Credentials are acquired automatically through Application Default Credentials.
- *
Retries are configured for idempotent methods but not for non-idempotent methods.
- *
- *
- *
The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object. For
- * example, to set the total timeout of annotateVideoAsync to 30 seconds:
- *
- *
- */
-@Generated("by GAPIC v0.0.5")
-@BetaApi
-public class VideoIntelligenceServiceStubSettings
- extends StubSettings {
- /** The default scopes of the service. */
- private static final ImmutableList DEFAULT_SERVICE_SCOPES =
- ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
-
- private final UnaryCallSettings annotateVideoSettings;
- private final OperationCallSettings<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings;
-
- /** Returns the object with the settings used for calls to annotateVideo. */
- public UnaryCallSettings annotateVideoSettings() {
- return annotateVideoSettings;
- }
-
- /** Returns the object with the settings used for calls to annotateVideo. */
- public OperationCallSettings
- annotateVideoOperationSettings() {
- return annotateVideoOperationSettings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public VideoIntelligenceServiceStub createStub() throws IOException {
- if (getTransportChannelProvider()
- .getTransportName()
- .equals(GrpcTransportChannel.getGrpcTransportName())) {
- return GrpcVideoIntelligenceServiceStub.create(this);
- } else {
- throw new UnsupportedOperationException(
- "Transport not supported: " + getTransportChannelProvider().getTransportName());
- }
- }
-
- /** Returns a builder for the default ExecutorProvider for this service. */
- public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
- return InstantiatingExecutorProvider.newBuilder();
- }
-
- /** Returns the default service endpoint. */
- public static String getDefaultEndpoint() {
- return "videointelligence.googleapis.com:443";
- }
-
- /** Returns the default service scopes. */
- public static List getDefaultServiceScopes() {
- return DEFAULT_SERVICE_SCOPES;
- }
-
- /** Returns a builder for the default credentials for this service. */
- public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
- return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
- }
-
- /** Returns a builder for the default ChannelProvider for this service. */
- public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
- return InstantiatingGrpcChannelProvider.newBuilder();
- }
-
- public static TransportChannelProvider defaultTransportChannelProvider() {
- return defaultGrpcTransportProviderBuilder().build();
- }
-
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
- return ApiClientHeaderProvider.newBuilder()
- .setGeneratedLibToken(
- "gapic", GaxProperties.getLibraryVersion(VideoIntelligenceServiceStubSettings.class))
- .setTransportToken(
- GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder() {
- return Builder.createDefault();
- }
-
- /** Returns a new builder for this class. */
- public static Builder newBuilder(ClientContext clientContext) {
- return new Builder(clientContext);
- }
-
- /** Returns a builder containing all the values of this settings class. */
- public Builder toBuilder() {
- return new Builder(this);
- }
-
- protected VideoIntelligenceServiceStubSettings(Builder settingsBuilder) throws IOException {
- super(settingsBuilder);
-
- annotateVideoSettings = settingsBuilder.annotateVideoSettings().build();
- annotateVideoOperationSettings = settingsBuilder.annotateVideoOperationSettings().build();
- }
-
- /** Builder for VideoIntelligenceServiceStubSettings. */
- public static class Builder
- extends StubSettings.Builder {
- private final ImmutableList> unaryMethodSettingsBuilders;
-
- private final UnaryCallSettings.Builder annotateVideoSettings;
- private final OperationCallSettings.Builder<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings;
-
- private static final ImmutableMap>
- RETRYABLE_CODE_DEFINITIONS;
-
- static {
- ImmutableMap.Builder> definitions =
- ImmutableMap.builder();
- definitions.put(
- "idempotent",
- ImmutableSet.copyOf(
- Lists.newArrayList(
- StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
- definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList()));
- RETRYABLE_CODE_DEFINITIONS = definitions.build();
- }
-
- private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
-
- static {
- ImmutableMap.Builder definitions = ImmutableMap.builder();
- RetrySettings settings = null;
- settings =
- RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1000L))
- .setRetryDelayMultiplier(2.5)
- .setMaxRetryDelay(Duration.ofMillis(120000L))
- .setInitialRpcTimeout(Duration.ofMillis(120000L))
- .setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(120000L))
- .setTotalTimeout(Duration.ofMillis(600000L))
- .build();
- definitions.put("default", settings);
- RETRY_PARAM_DEFINITIONS = definitions.build();
- }
-
- protected Builder() {
- this((ClientContext) null);
- }
-
- protected Builder(ClientContext clientContext) {
- super(clientContext);
-
- annotateVideoSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
- annotateVideoOperationSettings = OperationCallSettings.newBuilder();
-
- unaryMethodSettingsBuilders =
- ImmutableList.>of(annotateVideoSettings);
-
- initDefaults(this);
- }
-
- private static Builder createDefault() {
- Builder builder = new Builder((ClientContext) null);
- builder.setTransportChannelProvider(defaultTransportChannelProvider());
- builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
- builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
- builder.setEndpoint(getDefaultEndpoint());
- return initDefaults(builder);
- }
-
- private static Builder initDefaults(Builder builder) {
-
- builder
- .annotateVideoSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
- builder
- .annotateVideoOperationSettings()
- .setInitialCallSettings(
- UnaryCallSettings
- .newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
- .build())
- .setResponseTransformer(
- ProtoOperationTransformers.ResponseTransformer.create(AnnotateVideoResponse.class))
- .setMetadataTransformer(
- ProtoOperationTransformers.MetadataTransformer.create(AnnotateVideoProgress.class))
- .setPollingAlgorithm(
- OperationTimedPollAlgorithm.create(
- RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(20000L))
- .setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO) // ignored
- .setRpcTimeoutMultiplier(1.0) // ignored
- .setMaxRpcTimeout(Duration.ZERO) // ignored
- .setTotalTimeout(Duration.ofMillis(86400000L))
- .build()));
-
- return builder;
- }
-
- protected Builder(VideoIntelligenceServiceStubSettings settings) {
- super(settings);
-
- annotateVideoSettings = settings.annotateVideoSettings.toBuilder();
- annotateVideoOperationSettings = settings.annotateVideoOperationSettings.toBuilder();
-
- unaryMethodSettingsBuilders =
- ImmutableList.>of(annotateVideoSettings);
- }
-
- /**
- * Applies the given settings updater function to all of the unary API methods in this service.
- *
- *
Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
- super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
- return this;
- }
-
- public ImmutableList> unaryMethodSettingsBuilders() {
- return unaryMethodSettingsBuilders;
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public UnaryCallSettings.Builder annotateVideoSettings() {
- return annotateVideoSettings;
- }
-
- /** Returns the builder for the settings used for calls to annotateVideo. */
- public OperationCallSettings.Builder<
- AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress>
- annotateVideoOperationSettings() {
- return annotateVideoOperationSettings;
- }
-
- @Override
- public VideoIntelligenceServiceStubSettings build() throws IOException {
- return new VideoIntelligenceServiceStubSettings(this);
- }
- }
-}
diff --git a/google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1/MockVideoIntelligenceService.java b/google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1/MockVideoIntelligenceService.java
deleted file mode 100644
index 33b0177dd3dc..000000000000
--- a/google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1/MockVideoIntelligenceService.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.grpc.testing.MockGrpcService;
-import com.google.protobuf.GeneratedMessageV3;
-import io.grpc.ServerServiceDefinition;
-import java.util.List;
-
-@javax.annotation.Generated("by GAPIC")
-@BetaApi
-public class MockVideoIntelligenceService implements MockGrpcService {
- private final MockVideoIntelligenceServiceImpl serviceImpl;
-
- public MockVideoIntelligenceService() {
- serviceImpl = new MockVideoIntelligenceServiceImpl();
- }
-
- @Override
- public List getRequests() {
- return serviceImpl.getRequests();
- }
-
- @Override
- public void addResponse(GeneratedMessageV3 response) {
- serviceImpl.addResponse(response);
- }
-
- @Override
- public void addException(Exception exception) {
- serviceImpl.addException(exception);
- }
-
- @Override
- public ServerServiceDefinition getServiceDefinition() {
- return serviceImpl.bindService();
- }
-
- @Override
- public void reset() {
- serviceImpl.reset();
- }
-}
diff --git a/google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1/MockVideoIntelligenceServiceImpl.java b/google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1/MockVideoIntelligenceServiceImpl.java
deleted file mode 100644
index b63e560e83b7..000000000000
--- a/google-cloud-videointelligence/src/test/java/com/google/cloud/videointelligence/v1/MockVideoIntelligenceServiceImpl.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.videointelligence.v1;
-
-import com.google.api.core.BetaApi;
-import com.google.cloud.videointelligence.v1.VideoIntelligenceServiceGrpc.VideoIntelligenceServiceImplBase;
-import com.google.longrunning.Operation;
-import com.google.protobuf.GeneratedMessageV3;
-import io.grpc.stub.StreamObserver;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-
-@javax.annotation.Generated("by GAPIC")
-@BetaApi
-public class MockVideoIntelligenceServiceImpl extends VideoIntelligenceServiceImplBase {
- private ArrayList requests;
- private Queue