com.google.cloud.visionai.v1.LiveVideoAnalyticsSettings Maven / Gradle / Ivy
/*
* Copyright 2024 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.visionai.v1;
import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListAnalysesPagedResponse;
import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListOperatorsPagedResponse;
import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListProcessesPagedResponse;
import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListPublicOperatorsPagedResponse;
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.httpjson.InstantiatingHttpJsonChannelProvider;
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.PagedCallSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.visionai.v1.stub.LiveVideoAnalyticsStubSettings;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
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 LiveVideoAnalyticsClient}.
*
* The default instance has everything set to sensible defaults:
*
*
* - The default service address (visionai.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
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
* of resolveOperatorInfo:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* LiveVideoAnalyticsSettings.Builder liveVideoAnalyticsSettingsBuilder =
* LiveVideoAnalyticsSettings.newBuilder();
* liveVideoAnalyticsSettingsBuilder
* .resolveOperatorInfoSettings()
* .setRetrySettings(
* liveVideoAnalyticsSettingsBuilder
* .resolveOperatorInfoSettings()
* .getRetrySettings()
* .toBuilder()
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
* .setMaxAttempts(5)
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
* .setRetryDelayMultiplier(1.3)
* .setRpcTimeoutMultiplier(1.5)
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
* .build());
* LiveVideoAnalyticsSettings liveVideoAnalyticsSettings =
* liveVideoAnalyticsSettingsBuilder.build();
* }
*
* Please refer to the [Client Side Retry
* Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
* additional support in setting retries.
*
* To configure the RetrySettings of a Long Running Operation method, create an
* OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
* configure the RetrySettings for createOperator:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* LiveVideoAnalyticsSettings.Builder liveVideoAnalyticsSettingsBuilder =
* LiveVideoAnalyticsSettings.newBuilder();
* TimedRetryAlgorithm timedRetryAlgorithm =
* OperationalTimedPollAlgorithm.create(
* RetrySettings.newBuilder()
* .setInitialRetryDelayDuration(Duration.ofMillis(500))
* .setRetryDelayMultiplier(1.5)
* .setMaxRetryDelay(Duration.ofMillis(5000))
* .setTotalTimeoutDuration(Duration.ofHours(24))
* .build());
* liveVideoAnalyticsSettingsBuilder
* .createClusterOperationSettings()
* .setPollingAlgorithm(timedRetryAlgorithm)
* .build();
* }
*/
@Generated("by gapic-generator-java")
public class LiveVideoAnalyticsSettings extends ClientSettings {
/** Returns the object with the settings used for calls to listPublicOperators. */
public PagedCallSettings<
ListPublicOperatorsRequest, ListPublicOperatorsResponse, ListPublicOperatorsPagedResponse>
listPublicOperatorsSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).listPublicOperatorsSettings();
}
/** Returns the object with the settings used for calls to resolveOperatorInfo. */
public UnaryCallSettings
resolveOperatorInfoSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).resolveOperatorInfoSettings();
}
/** Returns the object with the settings used for calls to listOperators. */
public PagedCallSettings
listOperatorsSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).listOperatorsSettings();
}
/** Returns the object with the settings used for calls to getOperator. */
public UnaryCallSettings getOperatorSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).getOperatorSettings();
}
/** Returns the object with the settings used for calls to createOperator. */
public UnaryCallSettings createOperatorSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createOperatorSettings();
}
/** Returns the object with the settings used for calls to createOperator. */
public OperationCallSettings
createOperatorOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createOperatorOperationSettings();
}
/** Returns the object with the settings used for calls to updateOperator. */
public UnaryCallSettings updateOperatorSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateOperatorSettings();
}
/** Returns the object with the settings used for calls to updateOperator. */
public OperationCallSettings
updateOperatorOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateOperatorOperationSettings();
}
/** Returns the object with the settings used for calls to deleteOperator. */
public UnaryCallSettings deleteOperatorSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteOperatorSettings();
}
/** Returns the object with the settings used for calls to deleteOperator. */
public OperationCallSettings
deleteOperatorOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteOperatorOperationSettings();
}
/** Returns the object with the settings used for calls to listAnalyses. */
public PagedCallSettings
listAnalysesSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).listAnalysesSettings();
}
/** Returns the object with the settings used for calls to getAnalysis. */
public UnaryCallSettings getAnalysisSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).getAnalysisSettings();
}
/** Returns the object with the settings used for calls to createAnalysis. */
public UnaryCallSettings createAnalysisSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createAnalysisSettings();
}
/** Returns the object with the settings used for calls to createAnalysis. */
public OperationCallSettings
createAnalysisOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createAnalysisOperationSettings();
}
/** Returns the object with the settings used for calls to updateAnalysis. */
public UnaryCallSettings updateAnalysisSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateAnalysisSettings();
}
/** Returns the object with the settings used for calls to updateAnalysis. */
public OperationCallSettings
updateAnalysisOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateAnalysisOperationSettings();
}
/** Returns the object with the settings used for calls to deleteAnalysis. */
public UnaryCallSettings deleteAnalysisSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteAnalysisSettings();
}
/** Returns the object with the settings used for calls to deleteAnalysis. */
public OperationCallSettings
deleteAnalysisOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteAnalysisOperationSettings();
}
/** Returns the object with the settings used for calls to listProcesses. */
public PagedCallSettings
listProcessesSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).listProcessesSettings();
}
/** Returns the object with the settings used for calls to getProcess. */
public UnaryCallSettings getProcessSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).getProcessSettings();
}
/** Returns the object with the settings used for calls to createProcess. */
public UnaryCallSettings createProcessSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createProcessSettings();
}
/** Returns the object with the settings used for calls to createProcess. */
public OperationCallSettings
createProcessOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createProcessOperationSettings();
}
/** Returns the object with the settings used for calls to updateProcess. */
public UnaryCallSettings updateProcessSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateProcessSettings();
}
/** Returns the object with the settings used for calls to updateProcess. */
public OperationCallSettings
updateProcessOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateProcessOperationSettings();
}
/** Returns the object with the settings used for calls to deleteProcess. */
public UnaryCallSettings deleteProcessSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteProcessSettings();
}
/** Returns the object with the settings used for calls to deleteProcess. */
public OperationCallSettings
deleteProcessOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteProcessOperationSettings();
}
/** Returns the object with the settings used for calls to batchRunProcess. */
public UnaryCallSettings batchRunProcessSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).batchRunProcessSettings();
}
/** Returns the object with the settings used for calls to batchRunProcess. */
public OperationCallSettings
batchRunProcessOperationSettings() {
return ((LiveVideoAnalyticsStubSettings) getStubSettings()).batchRunProcessOperationSettings();
}
public static final LiveVideoAnalyticsSettings create(LiveVideoAnalyticsStubSettings stub)
throws IOException {
return new LiveVideoAnalyticsSettings.Builder(stub.toBuilder()).build();
}
/** Returns a builder for the default ExecutorProvider for this service. */
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
return LiveVideoAnalyticsStubSettings.defaultExecutorProviderBuilder();
}
/** Returns the default service endpoint. */
public static String getDefaultEndpoint() {
return LiveVideoAnalyticsStubSettings.getDefaultEndpoint();
}
/** Returns the default service scopes. */
public static List getDefaultServiceScopes() {
return LiveVideoAnalyticsStubSettings.getDefaultServiceScopes();
}
/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return LiveVideoAnalyticsStubSettings.defaultCredentialsProviderBuilder();
}
/** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return LiveVideoAnalyticsStubSettings.defaultGrpcTransportProviderBuilder();
}
/** Returns a builder for the default REST ChannelProvider for this service. */
@BetaApi
public static InstantiatingHttpJsonChannelProvider.Builder
defaultHttpJsonTransportProviderBuilder() {
return LiveVideoAnalyticsStubSettings.defaultHttpJsonTransportProviderBuilder();
}
public static TransportChannelProvider defaultTransportChannelProvider() {
return LiveVideoAnalyticsStubSettings.defaultTransportChannelProvider();
}
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return LiveVideoAnalyticsStubSettings.defaultApiClientHeaderProviderBuilder();
}
/** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
/** Returns a new REST builder for this class. */
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
/** 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 LiveVideoAnalyticsSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
}
/** Builder for LiveVideoAnalyticsSettings. */
public static class Builder extends ClientSettings.Builder {
protected Builder() throws IOException {
this(((ClientContext) null));
}
protected Builder(ClientContext clientContext) {
super(LiveVideoAnalyticsStubSettings.newBuilder(clientContext));
}
protected Builder(LiveVideoAnalyticsSettings settings) {
super(settings.getStubSettings().toBuilder());
}
protected Builder(LiveVideoAnalyticsStubSettings.Builder stubSettings) {
super(stubSettings);
}
private static Builder createDefault() {
return new Builder(LiveVideoAnalyticsStubSettings.newBuilder());
}
private static Builder createHttpJsonDefault() {
return new Builder(LiveVideoAnalyticsStubSettings.newHttpJsonBuilder());
}
public LiveVideoAnalyticsStubSettings.Builder getStubSettingsBuilder() {
return ((LiveVideoAnalyticsStubSettings.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) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
}
/** Returns the builder for the settings used for calls to listPublicOperators. */
public PagedCallSettings.Builder<
ListPublicOperatorsRequest,
ListPublicOperatorsResponse,
ListPublicOperatorsPagedResponse>
listPublicOperatorsSettings() {
return getStubSettingsBuilder().listPublicOperatorsSettings();
}
/** Returns the builder for the settings used for calls to resolveOperatorInfo. */
public UnaryCallSettings.Builder
resolveOperatorInfoSettings() {
return getStubSettingsBuilder().resolveOperatorInfoSettings();
}
/** Returns the builder for the settings used for calls to listOperators. */
public PagedCallSettings.Builder<
ListOperatorsRequest, ListOperatorsResponse, ListOperatorsPagedResponse>
listOperatorsSettings() {
return getStubSettingsBuilder().listOperatorsSettings();
}
/** Returns the builder for the settings used for calls to getOperator. */
public UnaryCallSettings.Builder getOperatorSettings() {
return getStubSettingsBuilder().getOperatorSettings();
}
/** Returns the builder for the settings used for calls to createOperator. */
public UnaryCallSettings.Builder createOperatorSettings() {
return getStubSettingsBuilder().createOperatorSettings();
}
/** Returns the builder for the settings used for calls to createOperator. */
public OperationCallSettings.Builder
createOperatorOperationSettings() {
return getStubSettingsBuilder().createOperatorOperationSettings();
}
/** Returns the builder for the settings used for calls to updateOperator. */
public UnaryCallSettings.Builder updateOperatorSettings() {
return getStubSettingsBuilder().updateOperatorSettings();
}
/** Returns the builder for the settings used for calls to updateOperator. */
public OperationCallSettings.Builder
updateOperatorOperationSettings() {
return getStubSettingsBuilder().updateOperatorOperationSettings();
}
/** Returns the builder for the settings used for calls to deleteOperator. */
public UnaryCallSettings.Builder deleteOperatorSettings() {
return getStubSettingsBuilder().deleteOperatorSettings();
}
/** Returns the builder for the settings used for calls to deleteOperator. */
public OperationCallSettings.Builder
deleteOperatorOperationSettings() {
return getStubSettingsBuilder().deleteOperatorOperationSettings();
}
/** Returns the builder for the settings used for calls to listAnalyses. */
public PagedCallSettings.Builder<
ListAnalysesRequest, ListAnalysesResponse, ListAnalysesPagedResponse>
listAnalysesSettings() {
return getStubSettingsBuilder().listAnalysesSettings();
}
/** Returns the builder for the settings used for calls to getAnalysis. */
public UnaryCallSettings.Builder getAnalysisSettings() {
return getStubSettingsBuilder().getAnalysisSettings();
}
/** Returns the builder for the settings used for calls to createAnalysis. */
public UnaryCallSettings.Builder createAnalysisSettings() {
return getStubSettingsBuilder().createAnalysisSettings();
}
/** Returns the builder for the settings used for calls to createAnalysis. */
public OperationCallSettings.Builder
createAnalysisOperationSettings() {
return getStubSettingsBuilder().createAnalysisOperationSettings();
}
/** Returns the builder for the settings used for calls to updateAnalysis. */
public UnaryCallSettings.Builder updateAnalysisSettings() {
return getStubSettingsBuilder().updateAnalysisSettings();
}
/** Returns the builder for the settings used for calls to updateAnalysis. */
public OperationCallSettings.Builder
updateAnalysisOperationSettings() {
return getStubSettingsBuilder().updateAnalysisOperationSettings();
}
/** Returns the builder for the settings used for calls to deleteAnalysis. */
public UnaryCallSettings.Builder deleteAnalysisSettings() {
return getStubSettingsBuilder().deleteAnalysisSettings();
}
/** Returns the builder for the settings used for calls to deleteAnalysis. */
public OperationCallSettings.Builder
deleteAnalysisOperationSettings() {
return getStubSettingsBuilder().deleteAnalysisOperationSettings();
}
/** Returns the builder for the settings used for calls to listProcesses. */
public PagedCallSettings.Builder<
ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse>
listProcessesSettings() {
return getStubSettingsBuilder().listProcessesSettings();
}
/** Returns the builder for the settings used for calls to getProcess. */
public UnaryCallSettings.Builder getProcessSettings() {
return getStubSettingsBuilder().getProcessSettings();
}
/** Returns the builder for the settings used for calls to createProcess. */
public UnaryCallSettings.Builder createProcessSettings() {
return getStubSettingsBuilder().createProcessSettings();
}
/** Returns the builder for the settings used for calls to createProcess. */
public OperationCallSettings.Builder
createProcessOperationSettings() {
return getStubSettingsBuilder().createProcessOperationSettings();
}
/** Returns the builder for the settings used for calls to updateProcess. */
public UnaryCallSettings.Builder updateProcessSettings() {
return getStubSettingsBuilder().updateProcessSettings();
}
/** Returns the builder for the settings used for calls to updateProcess. */
public OperationCallSettings.Builder
updateProcessOperationSettings() {
return getStubSettingsBuilder().updateProcessOperationSettings();
}
/** Returns the builder for the settings used for calls to deleteProcess. */
public UnaryCallSettings.Builder deleteProcessSettings() {
return getStubSettingsBuilder().deleteProcessSettings();
}
/** Returns the builder for the settings used for calls to deleteProcess. */
public OperationCallSettings.Builder
deleteProcessOperationSettings() {
return getStubSettingsBuilder().deleteProcessOperationSettings();
}
/** Returns the builder for the settings used for calls to batchRunProcess. */
public UnaryCallSettings.Builder batchRunProcessSettings() {
return getStubSettingsBuilder().batchRunProcessSettings();
}
/** Returns the builder for the settings used for calls to batchRunProcess. */
public OperationCallSettings.Builder<
BatchRunProcessRequest, BatchRunProcessResponse, OperationMetadata>
batchRunProcessOperationSettings() {
return getStubSettingsBuilder().batchRunProcessOperationSettings();
}
@Override
public LiveVideoAnalyticsSettings build() throws IOException {
return new LiveVideoAnalyticsSettings(this);
}
}
}