All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.notebooks.v1.stub.ManagedNotebookServiceStubSettings Maven / Gradle / Ivy

Go to download

is a managed service that offers an integrated and secure JupyterLab environment for data scientists and machine learning developers to experiment, develop, and deploy models into production. Users can create instances running JupyterLab that come pre-installed with the latest data science and machine learning frameworks in a single click.

There is a newer version: 1.54.0
Show newest version
/*
 * 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.notebooks.v1.stub;

import static com.google.cloud.notebooks.v1.ManagedNotebookServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.notebooks.v1.ManagedNotebookServiceClient.ListRuntimesPagedResponse;

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ObsoleteApi;
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.ApiCallContext;
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.PageContext;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.PagedListDescriptor;
import com.google.api.gax.rpc.PagedListResponseFactory;
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.api.gax.rpc.UnaryCallable;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.notebooks.v1.CreateRuntimeRequest;
import com.google.cloud.notebooks.v1.DeleteRuntimeRequest;
import com.google.cloud.notebooks.v1.DiagnoseRuntimeRequest;
import com.google.cloud.notebooks.v1.GetRuntimeRequest;
import com.google.cloud.notebooks.v1.ListRuntimesRequest;
import com.google.cloud.notebooks.v1.ListRuntimesResponse;
import com.google.cloud.notebooks.v1.OperationMetadata;
import com.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest;
import com.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse;
import com.google.cloud.notebooks.v1.ReportRuntimeEventRequest;
import com.google.cloud.notebooks.v1.ResetRuntimeRequest;
import com.google.cloud.notebooks.v1.Runtime;
import com.google.cloud.notebooks.v1.StartRuntimeRequest;
import com.google.cloud.notebooks.v1.StopRuntimeRequest;
import com.google.cloud.notebooks.v1.SwitchRuntimeRequest;
import com.google.cloud.notebooks.v1.UpdateRuntimeRequest;
import com.google.cloud.notebooks.v1.UpgradeRuntimeRequest;
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.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.time.Duration;
import java.util.List;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * Settings class to configure an instance of {@link ManagedNotebookServiceStub}.
 *
 * 

The default instance has everything set to sensible defaults: * *

    *
  • The default service address (notebooks.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 getRuntime: * *

{@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
 * ManagedNotebookServiceStubSettings.Builder managedNotebookServiceSettingsBuilder =
 *     ManagedNotebookServiceStubSettings.newBuilder();
 * managedNotebookServiceSettingsBuilder
 *     .getRuntimeSettings()
 *     .setRetrySettings(
 *         managedNotebookServiceSettingsBuilder
 *             .getRuntimeSettings()
 *             .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());
 * ManagedNotebookServiceStubSettings managedNotebookServiceSettings =
 *     managedNotebookServiceSettingsBuilder.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 createRuntime: * *

{@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
 * ManagedNotebookServiceStubSettings.Builder managedNotebookServiceSettingsBuilder =
 *     ManagedNotebookServiceStubSettings.newBuilder();
 * TimedRetryAlgorithm timedRetryAlgorithm =
 *     OperationalTimedPollAlgorithm.create(
 *         RetrySettings.newBuilder()
 *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
 *             .setRetryDelayMultiplier(1.5)
 *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
 *             .setTotalTimeoutDuration(Duration.ofHours(24))
 *             .build());
 * managedNotebookServiceSettingsBuilder
 *     .createClusterOperationSettings()
 *     .setPollingAlgorithm(timedRetryAlgorithm)
 *     .build();
 * }
*/ @Generated("by gapic-generator-java") public class ManagedNotebookServiceStubSettings 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 PagedCallSettings< ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse> listRuntimesSettings; private final UnaryCallSettings getRuntimeSettings; private final UnaryCallSettings createRuntimeSettings; private final OperationCallSettings createRuntimeOperationSettings; private final UnaryCallSettings updateRuntimeSettings; private final OperationCallSettings updateRuntimeOperationSettings; private final UnaryCallSettings deleteRuntimeSettings; private final OperationCallSettings deleteRuntimeOperationSettings; private final UnaryCallSettings startRuntimeSettings; private final OperationCallSettings startRuntimeOperationSettings; private final UnaryCallSettings stopRuntimeSettings; private final OperationCallSettings stopRuntimeOperationSettings; private final UnaryCallSettings switchRuntimeSettings; private final OperationCallSettings switchRuntimeOperationSettings; private final UnaryCallSettings resetRuntimeSettings; private final OperationCallSettings resetRuntimeOperationSettings; private final UnaryCallSettings upgradeRuntimeSettings; private final OperationCallSettings upgradeRuntimeOperationSettings; private final UnaryCallSettings reportRuntimeEventSettings; private final OperationCallSettings reportRuntimeEventOperationSettings; private final UnaryCallSettings< RefreshRuntimeTokenInternalRequest, RefreshRuntimeTokenInternalResponse> refreshRuntimeTokenInternalSettings; private final UnaryCallSettings diagnoseRuntimeSettings; private final OperationCallSettings diagnoseRuntimeOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; private final UnaryCallSettings getLocationSettings; private final UnaryCallSettings setIamPolicySettings; private final UnaryCallSettings getIamPolicySettings; private final UnaryCallSettings testIamPermissionsSettings; private static final PagedListDescriptor LIST_RUNTIMES_PAGE_STR_DESC = new PagedListDescriptor() { @Override public String emptyToken() { return ""; } @Override public ListRuntimesRequest injectToken(ListRuntimesRequest payload, String token) { return ListRuntimesRequest.newBuilder(payload).setPageToken(token).build(); } @Override public ListRuntimesRequest injectPageSize(ListRuntimesRequest payload, int pageSize) { return ListRuntimesRequest.newBuilder(payload).setPageSize(pageSize).build(); } @Override public Integer extractPageSize(ListRuntimesRequest payload) { return payload.getPageSize(); } @Override public String extractNextToken(ListRuntimesResponse payload) { return payload.getNextPageToken(); } @Override public Iterable extractResources(ListRuntimesResponse payload) { return payload.getRuntimesList(); } }; private static final PagedListDescriptor LIST_LOCATIONS_PAGE_STR_DESC = new PagedListDescriptor() { @Override public String emptyToken() { return ""; } @Override public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); } @Override public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); } @Override public Integer extractPageSize(ListLocationsRequest payload) { return payload.getPageSize(); } @Override public String extractNextToken(ListLocationsResponse payload) { return payload.getNextPageToken(); } @Override public Iterable extractResources(ListLocationsResponse payload) { return payload.getLocationsList(); } }; private static final PagedListResponseFactory< ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse> LIST_RUNTIMES_PAGE_STR_FACT = new PagedListResponseFactory< ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse>() { @Override public ApiFuture getFuturePagedResponse( UnaryCallable callable, ListRuntimesRequest request, ApiCallContext context, ApiFuture futureResponse) { PageContext pageContext = PageContext.create(callable, LIST_RUNTIMES_PAGE_STR_DESC, request, context); return ListRuntimesPagedResponse.createAsync(pageContext, futureResponse); } }; private static final PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> LIST_LOCATIONS_PAGE_STR_FACT = new PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { @Override public ApiFuture getFuturePagedResponse( UnaryCallable callable, ListLocationsRequest request, ApiCallContext context, ApiFuture futureResponse) { PageContext pageContext = PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); } }; /** Returns the object with the settings used for calls to listRuntimes. */ public PagedCallSettings listRuntimesSettings() { return listRuntimesSettings; } /** Returns the object with the settings used for calls to getRuntime. */ public UnaryCallSettings getRuntimeSettings() { return getRuntimeSettings; } /** Returns the object with the settings used for calls to createRuntime. */ public UnaryCallSettings createRuntimeSettings() { return createRuntimeSettings; } /** Returns the object with the settings used for calls to createRuntime. */ public OperationCallSettings createRuntimeOperationSettings() { return createRuntimeOperationSettings; } /** Returns the object with the settings used for calls to updateRuntime. */ public UnaryCallSettings updateRuntimeSettings() { return updateRuntimeSettings; } /** Returns the object with the settings used for calls to updateRuntime. */ public OperationCallSettings updateRuntimeOperationSettings() { return updateRuntimeOperationSettings; } /** Returns the object with the settings used for calls to deleteRuntime. */ public UnaryCallSettings deleteRuntimeSettings() { return deleteRuntimeSettings; } /** Returns the object with the settings used for calls to deleteRuntime. */ public OperationCallSettings deleteRuntimeOperationSettings() { return deleteRuntimeOperationSettings; } /** Returns the object with the settings used for calls to startRuntime. */ public UnaryCallSettings startRuntimeSettings() { return startRuntimeSettings; } /** Returns the object with the settings used for calls to startRuntime. */ public OperationCallSettings startRuntimeOperationSettings() { return startRuntimeOperationSettings; } /** Returns the object with the settings used for calls to stopRuntime. */ public UnaryCallSettings stopRuntimeSettings() { return stopRuntimeSettings; } /** Returns the object with the settings used for calls to stopRuntime. */ public OperationCallSettings stopRuntimeOperationSettings() { return stopRuntimeOperationSettings; } /** Returns the object with the settings used for calls to switchRuntime. */ public UnaryCallSettings switchRuntimeSettings() { return switchRuntimeSettings; } /** Returns the object with the settings used for calls to switchRuntime. */ public OperationCallSettings switchRuntimeOperationSettings() { return switchRuntimeOperationSettings; } /** Returns the object with the settings used for calls to resetRuntime. */ public UnaryCallSettings resetRuntimeSettings() { return resetRuntimeSettings; } /** Returns the object with the settings used for calls to resetRuntime. */ public OperationCallSettings resetRuntimeOperationSettings() { return resetRuntimeOperationSettings; } /** Returns the object with the settings used for calls to upgradeRuntime. */ public UnaryCallSettings upgradeRuntimeSettings() { return upgradeRuntimeSettings; } /** Returns the object with the settings used for calls to upgradeRuntime. */ public OperationCallSettings upgradeRuntimeOperationSettings() { return upgradeRuntimeOperationSettings; } /** Returns the object with the settings used for calls to reportRuntimeEvent. */ public UnaryCallSettings reportRuntimeEventSettings() { return reportRuntimeEventSettings; } /** Returns the object with the settings used for calls to reportRuntimeEvent. */ public OperationCallSettings reportRuntimeEventOperationSettings() { return reportRuntimeEventOperationSettings; } /** Returns the object with the settings used for calls to refreshRuntimeTokenInternal. */ public UnaryCallSettings refreshRuntimeTokenInternalSettings() { return refreshRuntimeTokenInternalSettings; } /** Returns the object with the settings used for calls to diagnoseRuntime. */ public UnaryCallSettings diagnoseRuntimeSettings() { return diagnoseRuntimeSettings; } /** Returns the object with the settings used for calls to diagnoseRuntime. */ public OperationCallSettings diagnoseRuntimeOperationSettings() { return diagnoseRuntimeOperationSettings; } /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { return listLocationsSettings; } /** Returns the object with the settings used for calls to getLocation. */ public UnaryCallSettings getLocationSettings() { return getLocationSettings; } /** Returns the object with the settings used for calls to setIamPolicy. */ public UnaryCallSettings setIamPolicySettings() { return setIamPolicySettings; } /** Returns the object with the settings used for calls to getIamPolicy. */ public UnaryCallSettings getIamPolicySettings() { return getIamPolicySettings; } /** Returns the object with the settings used for calls to testIamPermissions. */ public UnaryCallSettings testIamPermissionsSettings() { return testIamPermissionsSettings; } public ManagedNotebookServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcManagedNotebookServiceStub.create(this); } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } /** Returns the default service name. */ @Override public String getServiceName() { return "notebooks"; } /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); } /** Returns the default service endpoint. */ @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "notebooks.googleapis.com:443"; } /** Returns the default mTLS service endpoint. */ public static String getDefaultMtlsEndpoint() { return "notebooks.mtls.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) .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(ManagedNotebookServiceStubSettings.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 ManagedNotebookServiceStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); listRuntimesSettings = settingsBuilder.listRuntimesSettings().build(); getRuntimeSettings = settingsBuilder.getRuntimeSettings().build(); createRuntimeSettings = settingsBuilder.createRuntimeSettings().build(); createRuntimeOperationSettings = settingsBuilder.createRuntimeOperationSettings().build(); updateRuntimeSettings = settingsBuilder.updateRuntimeSettings().build(); updateRuntimeOperationSettings = settingsBuilder.updateRuntimeOperationSettings().build(); deleteRuntimeSettings = settingsBuilder.deleteRuntimeSettings().build(); deleteRuntimeOperationSettings = settingsBuilder.deleteRuntimeOperationSettings().build(); startRuntimeSettings = settingsBuilder.startRuntimeSettings().build(); startRuntimeOperationSettings = settingsBuilder.startRuntimeOperationSettings().build(); stopRuntimeSettings = settingsBuilder.stopRuntimeSettings().build(); stopRuntimeOperationSettings = settingsBuilder.stopRuntimeOperationSettings().build(); switchRuntimeSettings = settingsBuilder.switchRuntimeSettings().build(); switchRuntimeOperationSettings = settingsBuilder.switchRuntimeOperationSettings().build(); resetRuntimeSettings = settingsBuilder.resetRuntimeSettings().build(); resetRuntimeOperationSettings = settingsBuilder.resetRuntimeOperationSettings().build(); upgradeRuntimeSettings = settingsBuilder.upgradeRuntimeSettings().build(); upgradeRuntimeOperationSettings = settingsBuilder.upgradeRuntimeOperationSettings().build(); reportRuntimeEventSettings = settingsBuilder.reportRuntimeEventSettings().build(); reportRuntimeEventOperationSettings = settingsBuilder.reportRuntimeEventOperationSettings().build(); refreshRuntimeTokenInternalSettings = settingsBuilder.refreshRuntimeTokenInternalSettings().build(); diagnoseRuntimeSettings = settingsBuilder.diagnoseRuntimeSettings().build(); diagnoseRuntimeOperationSettings = settingsBuilder.diagnoseRuntimeOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); } /** Builder for ManagedNotebookServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; private final PagedCallSettings.Builder< ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse> listRuntimesSettings; private final UnaryCallSettings.Builder getRuntimeSettings; private final UnaryCallSettings.Builder createRuntimeSettings; private final OperationCallSettings.Builder createRuntimeOperationSettings; private final UnaryCallSettings.Builder updateRuntimeSettings; private final OperationCallSettings.Builder updateRuntimeOperationSettings; private final UnaryCallSettings.Builder deleteRuntimeSettings; private final OperationCallSettings.Builder deleteRuntimeOperationSettings; private final UnaryCallSettings.Builder startRuntimeSettings; private final OperationCallSettings.Builder startRuntimeOperationSettings; private final UnaryCallSettings.Builder stopRuntimeSettings; private final OperationCallSettings.Builder stopRuntimeOperationSettings; private final UnaryCallSettings.Builder switchRuntimeSettings; private final OperationCallSettings.Builder switchRuntimeOperationSettings; private final UnaryCallSettings.Builder resetRuntimeSettings; private final OperationCallSettings.Builder resetRuntimeOperationSettings; private final UnaryCallSettings.Builder upgradeRuntimeSettings; private final OperationCallSettings.Builder upgradeRuntimeOperationSettings; private final UnaryCallSettings.Builder reportRuntimeEventSettings; private final OperationCallSettings.Builder< ReportRuntimeEventRequest, Runtime, OperationMetadata> reportRuntimeEventOperationSettings; private final UnaryCallSettings.Builder< RefreshRuntimeTokenInternalRequest, RefreshRuntimeTokenInternalResponse> refreshRuntimeTokenInternalSettings; private final UnaryCallSettings.Builder diagnoseRuntimeSettings; private final OperationCallSettings.Builder diagnoseRuntimeOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; private final UnaryCallSettings.Builder getLocationSettings; private final UnaryCallSettings.Builder setIamPolicySettings; private final UnaryCallSettings.Builder getIamPolicySettings; private final UnaryCallSettings.Builder testIamPermissionsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; static { ImmutableMap.Builder> definitions = ImmutableMap.builder(); definitions.put( "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "retry_policy_0_codes", ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } private static final ImmutableMap RETRY_PARAM_DEFINITIONS; static { ImmutableMap.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; settings = RetrySettings.newBuilder() .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) .setTotalTimeoutDuration(Duration.ofMillis(60000L)) .build(); definitions.put("no_retry_1_params", settings); settings = RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(100L)) .setRetryDelayMultiplier(1.3) .setMaxRetryDelayDuration(Duration.ofMillis(60000L)) .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) .setTotalTimeoutDuration(Duration.ofMillis(60000L)) .build(); definitions.put("retry_policy_0_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } protected Builder() { this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(clientContext); listRuntimesSettings = PagedCallSettings.newBuilder(LIST_RUNTIMES_PAGE_STR_FACT); getRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createRuntimeOperationSettings = OperationCallSettings.newBuilder(); updateRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateRuntimeOperationSettings = OperationCallSettings.newBuilder(); deleteRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteRuntimeOperationSettings = OperationCallSettings.newBuilder(); startRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); startRuntimeOperationSettings = OperationCallSettings.newBuilder(); stopRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); stopRuntimeOperationSettings = OperationCallSettings.newBuilder(); switchRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); switchRuntimeOperationSettings = OperationCallSettings.newBuilder(); resetRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); resetRuntimeOperationSettings = OperationCallSettings.newBuilder(); upgradeRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); upgradeRuntimeOperationSettings = OperationCallSettings.newBuilder(); reportRuntimeEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); reportRuntimeEventOperationSettings = OperationCallSettings.newBuilder(); refreshRuntimeTokenInternalSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); diagnoseRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); diagnoseRuntimeOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( listRuntimesSettings, getRuntimeSettings, createRuntimeSettings, updateRuntimeSettings, deleteRuntimeSettings, startRuntimeSettings, stopRuntimeSettings, switchRuntimeSettings, resetRuntimeSettings, upgradeRuntimeSettings, reportRuntimeEventSettings, refreshRuntimeTokenInternalSettings, diagnoseRuntimeSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, getIamPolicySettings, testIamPermissionsSettings); initDefaults(this); } protected Builder(ManagedNotebookServiceStubSettings settings) { super(settings); listRuntimesSettings = settings.listRuntimesSettings.toBuilder(); getRuntimeSettings = settings.getRuntimeSettings.toBuilder(); createRuntimeSettings = settings.createRuntimeSettings.toBuilder(); createRuntimeOperationSettings = settings.createRuntimeOperationSettings.toBuilder(); updateRuntimeSettings = settings.updateRuntimeSettings.toBuilder(); updateRuntimeOperationSettings = settings.updateRuntimeOperationSettings.toBuilder(); deleteRuntimeSettings = settings.deleteRuntimeSettings.toBuilder(); deleteRuntimeOperationSettings = settings.deleteRuntimeOperationSettings.toBuilder(); startRuntimeSettings = settings.startRuntimeSettings.toBuilder(); startRuntimeOperationSettings = settings.startRuntimeOperationSettings.toBuilder(); stopRuntimeSettings = settings.stopRuntimeSettings.toBuilder(); stopRuntimeOperationSettings = settings.stopRuntimeOperationSettings.toBuilder(); switchRuntimeSettings = settings.switchRuntimeSettings.toBuilder(); switchRuntimeOperationSettings = settings.switchRuntimeOperationSettings.toBuilder(); resetRuntimeSettings = settings.resetRuntimeSettings.toBuilder(); resetRuntimeOperationSettings = settings.resetRuntimeOperationSettings.toBuilder(); upgradeRuntimeSettings = settings.upgradeRuntimeSettings.toBuilder(); upgradeRuntimeOperationSettings = settings.upgradeRuntimeOperationSettings.toBuilder(); reportRuntimeEventSettings = settings.reportRuntimeEventSettings.toBuilder(); reportRuntimeEventOperationSettings = settings.reportRuntimeEventOperationSettings.toBuilder(); refreshRuntimeTokenInternalSettings = settings.refreshRuntimeTokenInternalSettings.toBuilder(); diagnoseRuntimeSettings = settings.diagnoseRuntimeSettings.toBuilder(); diagnoseRuntimeOperationSettings = settings.diagnoseRuntimeOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( listRuntimesSettings, getRuntimeSettings, createRuntimeSettings, updateRuntimeSettings, deleteRuntimeSettings, startRuntimeSettings, stopRuntimeSettings, switchRuntimeSettings, resetRuntimeSettings, upgradeRuntimeSettings, reportRuntimeEventSettings, refreshRuntimeTokenInternalSettings, diagnoseRuntimeSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, getIamPolicySettings, testIamPermissionsSettings); } private static Builder createDefault() { Builder builder = new Builder(((ClientContext) null)); builder.setTransportChannelProvider(defaultTransportChannelProvider()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); builder.setSwitchToMtlsEndpointAllowed(true); return initDefaults(builder); } private static Builder initDefaults(Builder builder) { builder .listRuntimesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .getRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .createRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .updateRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .deleteRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .startRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .stopRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .switchRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .resetRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .upgradeRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .reportRuntimeEventSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .refreshRuntimeTokenInternalSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .diagnoseRuntimeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getLocationSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .setIamPolicySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getIamPolicySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .testIamPermissionsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .createRuntimeOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder .updateRuntimeOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder .deleteRuntimeOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder .startRuntimeOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder .stopRuntimeOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder .switchRuntimeOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder .resetRuntimeOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder .upgradeRuntimeOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder .reportRuntimeEventOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder .diagnoseRuntimeOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeoutDuration(Duration.ZERO) .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); return builder; } /** * 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(unaryMethodSettingsBuilders, settingsUpdater); return this; } public ImmutableList> unaryMethodSettingsBuilders() { return unaryMethodSettingsBuilders; } /** Returns the builder for the settings used for calls to listRuntimes. */ public PagedCallSettings.Builder< ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse> listRuntimesSettings() { return listRuntimesSettings; } /** Returns the builder for the settings used for calls to getRuntime. */ public UnaryCallSettings.Builder getRuntimeSettings() { return getRuntimeSettings; } /** Returns the builder for the settings used for calls to createRuntime. */ public UnaryCallSettings.Builder createRuntimeSettings() { return createRuntimeSettings; } /** Returns the builder for the settings used for calls to createRuntime. */ public OperationCallSettings.Builder createRuntimeOperationSettings() { return createRuntimeOperationSettings; } /** Returns the builder for the settings used for calls to updateRuntime. */ public UnaryCallSettings.Builder updateRuntimeSettings() { return updateRuntimeSettings; } /** Returns the builder for the settings used for calls to updateRuntime. */ public OperationCallSettings.Builder updateRuntimeOperationSettings() { return updateRuntimeOperationSettings; } /** Returns the builder for the settings used for calls to deleteRuntime. */ public UnaryCallSettings.Builder deleteRuntimeSettings() { return deleteRuntimeSettings; } /** Returns the builder for the settings used for calls to deleteRuntime. */ public OperationCallSettings.Builder deleteRuntimeOperationSettings() { return deleteRuntimeOperationSettings; } /** Returns the builder for the settings used for calls to startRuntime. */ public UnaryCallSettings.Builder startRuntimeSettings() { return startRuntimeSettings; } /** Returns the builder for the settings used for calls to startRuntime. */ public OperationCallSettings.Builder startRuntimeOperationSettings() { return startRuntimeOperationSettings; } /** Returns the builder for the settings used for calls to stopRuntime. */ public UnaryCallSettings.Builder stopRuntimeSettings() { return stopRuntimeSettings; } /** Returns the builder for the settings used for calls to stopRuntime. */ public OperationCallSettings.Builder stopRuntimeOperationSettings() { return stopRuntimeOperationSettings; } /** Returns the builder for the settings used for calls to switchRuntime. */ public UnaryCallSettings.Builder switchRuntimeSettings() { return switchRuntimeSettings; } /** Returns the builder for the settings used for calls to switchRuntime. */ public OperationCallSettings.Builder switchRuntimeOperationSettings() { return switchRuntimeOperationSettings; } /** Returns the builder for the settings used for calls to resetRuntime. */ public UnaryCallSettings.Builder resetRuntimeSettings() { return resetRuntimeSettings; } /** Returns the builder for the settings used for calls to resetRuntime. */ public OperationCallSettings.Builder resetRuntimeOperationSettings() { return resetRuntimeOperationSettings; } /** Returns the builder for the settings used for calls to upgradeRuntime. */ public UnaryCallSettings.Builder upgradeRuntimeSettings() { return upgradeRuntimeSettings; } /** Returns the builder for the settings used for calls to upgradeRuntime. */ public OperationCallSettings.Builder upgradeRuntimeOperationSettings() { return upgradeRuntimeOperationSettings; } /** Returns the builder for the settings used for calls to reportRuntimeEvent. */ public UnaryCallSettings.Builder reportRuntimeEventSettings() { return reportRuntimeEventSettings; } /** Returns the builder for the settings used for calls to reportRuntimeEvent. */ public OperationCallSettings.Builder reportRuntimeEventOperationSettings() { return reportRuntimeEventOperationSettings; } /** Returns the builder for the settings used for calls to refreshRuntimeTokenInternal. */ public UnaryCallSettings.Builder< RefreshRuntimeTokenInternalRequest, RefreshRuntimeTokenInternalResponse> refreshRuntimeTokenInternalSettings() { return refreshRuntimeTokenInternalSettings; } /** Returns the builder for the settings used for calls to diagnoseRuntime. */ public UnaryCallSettings.Builder diagnoseRuntimeSettings() { return diagnoseRuntimeSettings; } /** Returns the builder for the settings used for calls to diagnoseRuntime. */ public OperationCallSettings.Builder diagnoseRuntimeOperationSettings() { return diagnoseRuntimeOperationSettings; } /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings() { return listLocationsSettings; } /** Returns the builder for the settings used for calls to getLocation. */ public UnaryCallSettings.Builder getLocationSettings() { return getLocationSettings; } /** Returns the builder for the settings used for calls to setIamPolicy. */ public UnaryCallSettings.Builder setIamPolicySettings() { return setIamPolicySettings; } /** Returns the builder for the settings used for calls to getIamPolicy. */ public UnaryCallSettings.Builder getIamPolicySettings() { return getIamPolicySettings; } /** Returns the builder for the settings used for calls to testIamPermissions. */ public UnaryCallSettings.Builder testIamPermissionsSettings() { return testIamPermissionsSettings; } @Override public ManagedNotebookServiceStubSettings build() throws IOException { return new ManagedNotebookServiceStubSettings(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy