com.google.cloud.apigateway.v1.stub.ApiGatewayServiceStubSettings Maven / Gradle / Ivy
Show all versions of google-cloud-api-gateway Show documentation
/*
* 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.apigateway.v1.stub;
import static com.google.cloud.apigateway.v1.ApiGatewayServiceClient.ListApiConfigsPagedResponse;
import static com.google.cloud.apigateway.v1.ApiGatewayServiceClient.ListApisPagedResponse;
import static com.google.cloud.apigateway.v1.ApiGatewayServiceClient.ListGatewaysPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.BetaApi;
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.httpjson.GaxHttpJsonProperties;
import com.google.api.gax.httpjson.HttpJsonTransportChannel;
import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
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.apigateway.v1.Api;
import com.google.cloud.apigateway.v1.ApiConfig;
import com.google.cloud.apigateway.v1.CreateApiConfigRequest;
import com.google.cloud.apigateway.v1.CreateApiRequest;
import com.google.cloud.apigateway.v1.CreateGatewayRequest;
import com.google.cloud.apigateway.v1.DeleteApiConfigRequest;
import com.google.cloud.apigateway.v1.DeleteApiRequest;
import com.google.cloud.apigateway.v1.DeleteGatewayRequest;
import com.google.cloud.apigateway.v1.Gateway;
import com.google.cloud.apigateway.v1.GetApiConfigRequest;
import com.google.cloud.apigateway.v1.GetApiRequest;
import com.google.cloud.apigateway.v1.GetGatewayRequest;
import com.google.cloud.apigateway.v1.ListApiConfigsRequest;
import com.google.cloud.apigateway.v1.ListApiConfigsResponse;
import com.google.cloud.apigateway.v1.ListApisRequest;
import com.google.cloud.apigateway.v1.ListApisResponse;
import com.google.cloud.apigateway.v1.ListGatewaysRequest;
import com.google.cloud.apigateway.v1.ListGatewaysResponse;
import com.google.cloud.apigateway.v1.OperationMetadata;
import com.google.cloud.apigateway.v1.UpdateApiConfigRequest;
import com.google.cloud.apigateway.v1.UpdateApiRequest;
import com.google.cloud.apigateway.v1.UpdateGatewayRequest;
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 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 ApiGatewayServiceStub}.
*
* The default instance has everything set to sensible defaults:
*
*
* - The default service address (apigateway.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 getGateway:
*
*
{@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
* ApiGatewayServiceStubSettings.Builder apiGatewayServiceSettingsBuilder =
* ApiGatewayServiceStubSettings.newBuilder();
* apiGatewayServiceSettingsBuilder
* .getGatewaySettings()
* .setRetrySettings(
* apiGatewayServiceSettingsBuilder
* .getGatewaySettings()
* .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());
* ApiGatewayServiceStubSettings apiGatewayServiceSettings =
* apiGatewayServiceSettingsBuilder.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 createGateway:
*
*
{@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
* ApiGatewayServiceStubSettings.Builder apiGatewayServiceSettingsBuilder =
* ApiGatewayServiceStubSettings.newBuilder();
* TimedRetryAlgorithm timedRetryAlgorithm =
* OperationalTimedPollAlgorithm.create(
* RetrySettings.newBuilder()
* .setInitialRetryDelayDuration(Duration.ofMillis(500))
* .setRetryDelayMultiplier(1.5)
* .setMaxRetryDelayDuration(Duration.ofMillis(5000))
* .setTotalTimeoutDuration(Duration.ofHours(24))
* .build());
* apiGatewayServiceSettingsBuilder
* .createClusterOperationSettings()
* .setPollingAlgorithm(timedRetryAlgorithm)
* .build();
* }
*/
@Generated("by gapic-generator-java")
public class ApiGatewayServiceStubSettings 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<
ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse>
listGatewaysSettings;
private final UnaryCallSettings getGatewaySettings;
private final UnaryCallSettings createGatewaySettings;
private final OperationCallSettings
createGatewayOperationSettings;
private final UnaryCallSettings updateGatewaySettings;
private final OperationCallSettings
updateGatewayOperationSettings;
private final UnaryCallSettings deleteGatewaySettings;
private final OperationCallSettings
deleteGatewayOperationSettings;
private final PagedCallSettings
listApisSettings;
private final UnaryCallSettings getApiSettings;
private final UnaryCallSettings createApiSettings;
private final OperationCallSettings
createApiOperationSettings;
private final UnaryCallSettings updateApiSettings;
private final OperationCallSettings
updateApiOperationSettings;
private final UnaryCallSettings deleteApiSettings;
private final OperationCallSettings
deleteApiOperationSettings;
private final PagedCallSettings<
ListApiConfigsRequest, ListApiConfigsResponse, ListApiConfigsPagedResponse>
listApiConfigsSettings;
private final UnaryCallSettings getApiConfigSettings;
private final UnaryCallSettings createApiConfigSettings;
private final OperationCallSettings
createApiConfigOperationSettings;
private final UnaryCallSettings updateApiConfigSettings;
private final OperationCallSettings
updateApiConfigOperationSettings;
private final UnaryCallSettings deleteApiConfigSettings;
private final OperationCallSettings
deleteApiConfigOperationSettings;
private static final PagedListDescriptor
LIST_GATEWAYS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListGatewaysRequest injectToken(ListGatewaysRequest payload, String token) {
return ListGatewaysRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListGatewaysRequest injectPageSize(ListGatewaysRequest payload, int pageSize) {
return ListGatewaysRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListGatewaysRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListGatewaysResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListGatewaysResponse payload) {
return payload.getGatewaysList();
}
};
private static final PagedListDescriptor
LIST_APIS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListApisRequest injectToken(ListApisRequest payload, String token) {
return ListApisRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListApisRequest injectPageSize(ListApisRequest payload, int pageSize) {
return ListApisRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListApisRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListApisResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListApisResponse payload) {
return payload.getApisList();
}
};
private static final PagedListDescriptor
LIST_API_CONFIGS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListApiConfigsRequest injectToken(ListApiConfigsRequest payload, String token) {
return ListApiConfigsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListApiConfigsRequest injectPageSize(
ListApiConfigsRequest payload, int pageSize) {
return ListApiConfigsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListApiConfigsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListApiConfigsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListApiConfigsResponse payload) {
return payload.getApiConfigsList();
}
};
private static final PagedListResponseFactory<
ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse>
LIST_GATEWAYS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListGatewaysRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_GATEWAYS_PAGE_STR_DESC, request, context);
return ListGatewaysPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListApisRequest, ListApisResponse, ListApisPagedResponse>
LIST_APIS_PAGE_STR_FACT =
new PagedListResponseFactory() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListApisRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_APIS_PAGE_STR_DESC, request, context);
return ListApisPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListApiConfigsRequest, ListApiConfigsResponse, ListApiConfigsPagedResponse>
LIST_API_CONFIGS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListApiConfigsRequest, ListApiConfigsResponse, ListApiConfigsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListApiConfigsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_API_CONFIGS_PAGE_STR_DESC, request, context);
return ListApiConfigsPagedResponse.createAsync(pageContext, futureResponse);
}
};
/** Returns the object with the settings used for calls to listGateways. */
public PagedCallSettings
listGatewaysSettings() {
return listGatewaysSettings;
}
/** Returns the object with the settings used for calls to getGateway. */
public UnaryCallSettings getGatewaySettings() {
return getGatewaySettings;
}
/** Returns the object with the settings used for calls to createGateway. */
public UnaryCallSettings createGatewaySettings() {
return createGatewaySettings;
}
/** Returns the object with the settings used for calls to createGateway. */
public OperationCallSettings
createGatewayOperationSettings() {
return createGatewayOperationSettings;
}
/** Returns the object with the settings used for calls to updateGateway. */
public UnaryCallSettings updateGatewaySettings() {
return updateGatewaySettings;
}
/** Returns the object with the settings used for calls to updateGateway. */
public OperationCallSettings
updateGatewayOperationSettings() {
return updateGatewayOperationSettings;
}
/** Returns the object with the settings used for calls to deleteGateway. */
public UnaryCallSettings deleteGatewaySettings() {
return deleteGatewaySettings;
}
/** Returns the object with the settings used for calls to deleteGateway. */
public OperationCallSettings
deleteGatewayOperationSettings() {
return deleteGatewayOperationSettings;
}
/** Returns the object with the settings used for calls to listApis. */
public PagedCallSettings
listApisSettings() {
return listApisSettings;
}
/** Returns the object with the settings used for calls to getApi. */
public UnaryCallSettings getApiSettings() {
return getApiSettings;
}
/** Returns the object with the settings used for calls to createApi. */
public UnaryCallSettings createApiSettings() {
return createApiSettings;
}
/** Returns the object with the settings used for calls to createApi. */
public OperationCallSettings
createApiOperationSettings() {
return createApiOperationSettings;
}
/** Returns the object with the settings used for calls to updateApi. */
public UnaryCallSettings updateApiSettings() {
return updateApiSettings;
}
/** Returns the object with the settings used for calls to updateApi. */
public OperationCallSettings
updateApiOperationSettings() {
return updateApiOperationSettings;
}
/** Returns the object with the settings used for calls to deleteApi. */
public UnaryCallSettings deleteApiSettings() {
return deleteApiSettings;
}
/** Returns the object with the settings used for calls to deleteApi. */
public OperationCallSettings
deleteApiOperationSettings() {
return deleteApiOperationSettings;
}
/** Returns the object with the settings used for calls to listApiConfigs. */
public PagedCallSettings<
ListApiConfigsRequest, ListApiConfigsResponse, ListApiConfigsPagedResponse>
listApiConfigsSettings() {
return listApiConfigsSettings;
}
/** Returns the object with the settings used for calls to getApiConfig. */
public UnaryCallSettings getApiConfigSettings() {
return getApiConfigSettings;
}
/** Returns the object with the settings used for calls to createApiConfig. */
public UnaryCallSettings createApiConfigSettings() {
return createApiConfigSettings;
}
/** Returns the object with the settings used for calls to createApiConfig. */
public OperationCallSettings
createApiConfigOperationSettings() {
return createApiConfigOperationSettings;
}
/** Returns the object with the settings used for calls to updateApiConfig. */
public UnaryCallSettings updateApiConfigSettings() {
return updateApiConfigSettings;
}
/** Returns the object with the settings used for calls to updateApiConfig. */
public OperationCallSettings
updateApiConfigOperationSettings() {
return updateApiConfigOperationSettings;
}
/** Returns the object with the settings used for calls to deleteApiConfig. */
public UnaryCallSettings deleteApiConfigSettings() {
return deleteApiConfigSettings;
}
/** Returns the object with the settings used for calls to deleteApiConfig. */
public OperationCallSettings
deleteApiConfigOperationSettings() {
return deleteApiConfigOperationSettings;
}
public ApiGatewayServiceStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcApiGatewayServiceStub.create(this);
}
if (getTransportChannelProvider()
.getTransportName()
.equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
return HttpJsonApiGatewayServiceStub.create(this);
}
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}
/** Returns the default service name. */
@Override
public String getServiceName() {
return "apigateway";
}
/** 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 "apigateway.googleapis.com:443";
}
/** Returns the default mTLS service endpoint. */
public static String getDefaultMtlsEndpoint() {
return "apigateway.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 gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
/** Returns a builder for the default REST ChannelProvider for this service. */
@BetaApi
public static InstantiatingHttpJsonChannelProvider.Builder
defaultHttpJsonTransportProviderBuilder() {
return InstantiatingHttpJsonChannelProvider.newBuilder();
}
public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}
public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(ApiGatewayServiceStubSettings.class))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(ApiGatewayServiceStubSettings.class))
.setTransportToken(
GaxHttpJsonProperties.getHttpJsonTokenName(),
GaxHttpJsonProperties.getHttpJsonVersion());
}
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return ApiGatewayServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
}
/** 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 ApiGatewayServiceStubSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
listGatewaysSettings = settingsBuilder.listGatewaysSettings().build();
getGatewaySettings = settingsBuilder.getGatewaySettings().build();
createGatewaySettings = settingsBuilder.createGatewaySettings().build();
createGatewayOperationSettings = settingsBuilder.createGatewayOperationSettings().build();
updateGatewaySettings = settingsBuilder.updateGatewaySettings().build();
updateGatewayOperationSettings = settingsBuilder.updateGatewayOperationSettings().build();
deleteGatewaySettings = settingsBuilder.deleteGatewaySettings().build();
deleteGatewayOperationSettings = settingsBuilder.deleteGatewayOperationSettings().build();
listApisSettings = settingsBuilder.listApisSettings().build();
getApiSettings = settingsBuilder.getApiSettings().build();
createApiSettings = settingsBuilder.createApiSettings().build();
createApiOperationSettings = settingsBuilder.createApiOperationSettings().build();
updateApiSettings = settingsBuilder.updateApiSettings().build();
updateApiOperationSettings = settingsBuilder.updateApiOperationSettings().build();
deleteApiSettings = settingsBuilder.deleteApiSettings().build();
deleteApiOperationSettings = settingsBuilder.deleteApiOperationSettings().build();
listApiConfigsSettings = settingsBuilder.listApiConfigsSettings().build();
getApiConfigSettings = settingsBuilder.getApiConfigSettings().build();
createApiConfigSettings = settingsBuilder.createApiConfigSettings().build();
createApiConfigOperationSettings = settingsBuilder.createApiConfigOperationSettings().build();
updateApiConfigSettings = settingsBuilder.updateApiConfigSettings().build();
updateApiConfigOperationSettings = settingsBuilder.updateApiConfigOperationSettings().build();
deleteApiConfigSettings = settingsBuilder.deleteApiConfigSettings().build();
deleteApiConfigOperationSettings = settingsBuilder.deleteApiConfigOperationSettings().build();
}
/** Builder for ApiGatewayServiceStubSettings. */
public static class Builder extends StubSettings.Builder {
private final ImmutableList> unaryMethodSettingsBuilders;
private final PagedCallSettings.Builder<
ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse>
listGatewaysSettings;
private final UnaryCallSettings.Builder getGatewaySettings;
private final UnaryCallSettings.Builder createGatewaySettings;
private final OperationCallSettings.Builder
createGatewayOperationSettings;
private final UnaryCallSettings.Builder updateGatewaySettings;
private final OperationCallSettings.Builder
updateGatewayOperationSettings;
private final UnaryCallSettings.Builder deleteGatewaySettings;
private final OperationCallSettings.Builder
deleteGatewayOperationSettings;
private final PagedCallSettings.Builder<
ListApisRequest, ListApisResponse, ListApisPagedResponse>
listApisSettings;
private final UnaryCallSettings.Builder getApiSettings;
private final UnaryCallSettings.Builder createApiSettings;
private final OperationCallSettings.Builder
createApiOperationSettings;
private final UnaryCallSettings.Builder updateApiSettings;
private final OperationCallSettings.Builder
updateApiOperationSettings;
private final UnaryCallSettings.Builder deleteApiSettings;
private final OperationCallSettings.Builder
deleteApiOperationSettings;
private final PagedCallSettings.Builder<
ListApiConfigsRequest, ListApiConfigsResponse, ListApiConfigsPagedResponse>
listApiConfigsSettings;
private final UnaryCallSettings.Builder getApiConfigSettings;
private final UnaryCallSettings.Builder
createApiConfigSettings;
private final OperationCallSettings.Builder<
CreateApiConfigRequest, ApiConfig, OperationMetadata>
createApiConfigOperationSettings;
private final UnaryCallSettings.Builder
updateApiConfigSettings;
private final OperationCallSettings.Builder<
UpdateApiConfigRequest, ApiConfig, OperationMetadata>
updateApiConfigOperationSettings;
private final UnaryCallSettings.Builder
deleteApiConfigSettings;
private final OperationCallSettings.Builder
deleteApiConfigOperationSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
static {
ImmutableMap.Builder> definitions =
ImmutableMap.builder();
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
definitions.put(
"retry_policy_0_codes",
ImmutableSet.copyOf(
Lists.newArrayList(
StatusCode.Code.UNKNOWN, 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().setRpcTimeoutMultiplier(1.0).build();
definitions.put("no_retry_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(1000L))
.setRetryDelayMultiplier(2.0)
.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);
listGatewaysSettings = PagedCallSettings.newBuilder(LIST_GATEWAYS_PAGE_STR_FACT);
getGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createGatewayOperationSettings = OperationCallSettings.newBuilder();
updateGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateGatewayOperationSettings = OperationCallSettings.newBuilder();
deleteGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteGatewayOperationSettings = OperationCallSettings.newBuilder();
listApisSettings = PagedCallSettings.newBuilder(LIST_APIS_PAGE_STR_FACT);
getApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createApiOperationSettings = OperationCallSettings.newBuilder();
updateApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateApiOperationSettings = OperationCallSettings.newBuilder();
deleteApiSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteApiOperationSettings = OperationCallSettings.newBuilder();
listApiConfigsSettings = PagedCallSettings.newBuilder(LIST_API_CONFIGS_PAGE_STR_FACT);
getApiConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createApiConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createApiConfigOperationSettings = OperationCallSettings.newBuilder();
updateApiConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateApiConfigOperationSettings = OperationCallSettings.newBuilder();
deleteApiConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteApiConfigOperationSettings = OperationCallSettings.newBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
listGatewaysSettings,
getGatewaySettings,
createGatewaySettings,
updateGatewaySettings,
deleteGatewaySettings,
listApisSettings,
getApiSettings,
createApiSettings,
updateApiSettings,
deleteApiSettings,
listApiConfigsSettings,
getApiConfigSettings,
createApiConfigSettings,
updateApiConfigSettings,
deleteApiConfigSettings);
initDefaults(this);
}
protected Builder(ApiGatewayServiceStubSettings settings) {
super(settings);
listGatewaysSettings = settings.listGatewaysSettings.toBuilder();
getGatewaySettings = settings.getGatewaySettings.toBuilder();
createGatewaySettings = settings.createGatewaySettings.toBuilder();
createGatewayOperationSettings = settings.createGatewayOperationSettings.toBuilder();
updateGatewaySettings = settings.updateGatewaySettings.toBuilder();
updateGatewayOperationSettings = settings.updateGatewayOperationSettings.toBuilder();
deleteGatewaySettings = settings.deleteGatewaySettings.toBuilder();
deleteGatewayOperationSettings = settings.deleteGatewayOperationSettings.toBuilder();
listApisSettings = settings.listApisSettings.toBuilder();
getApiSettings = settings.getApiSettings.toBuilder();
createApiSettings = settings.createApiSettings.toBuilder();
createApiOperationSettings = settings.createApiOperationSettings.toBuilder();
updateApiSettings = settings.updateApiSettings.toBuilder();
updateApiOperationSettings = settings.updateApiOperationSettings.toBuilder();
deleteApiSettings = settings.deleteApiSettings.toBuilder();
deleteApiOperationSettings = settings.deleteApiOperationSettings.toBuilder();
listApiConfigsSettings = settings.listApiConfigsSettings.toBuilder();
getApiConfigSettings = settings.getApiConfigSettings.toBuilder();
createApiConfigSettings = settings.createApiConfigSettings.toBuilder();
createApiConfigOperationSettings = settings.createApiConfigOperationSettings.toBuilder();
updateApiConfigSettings = settings.updateApiConfigSettings.toBuilder();
updateApiConfigOperationSettings = settings.updateApiConfigOperationSettings.toBuilder();
deleteApiConfigSettings = settings.deleteApiConfigSettings.toBuilder();
deleteApiConfigOperationSettings = settings.deleteApiConfigOperationSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
listGatewaysSettings,
getGatewaySettings,
createGatewaySettings,
updateGatewaySettings,
deleteGatewaySettings,
listApisSettings,
getApiSettings,
createApiSettings,
updateApiSettings,
deleteApiSettings,
listApiConfigsSettings,
getApiConfigSettings,
createApiConfigSettings,
updateApiConfigSettings,
deleteApiConfigSettings);
}
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 createHttpJsonDefault() {
Builder builder = new Builder(((ClientContext) null));
builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);
return initDefaults(builder);
}
private static Builder initDefaults(Builder builder) {
builder
.listGatewaysSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.getGatewaySettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.createGatewaySettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.updateGatewaySettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.deleteGatewaySettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.listApisSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.getApiSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.createApiSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.updateApiSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.deleteApiSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.listApiConfigsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.getApiConfigSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.createApiConfigSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.updateApiConfigSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.deleteApiConfigSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.createGatewayOperationSettings()
.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(Gateway.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
.updateGatewayOperationSettings()
.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(Gateway.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
.deleteGatewayOperationSettings()
.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(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
.createApiOperationSettings()
.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(Api.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
.updateApiOperationSettings()
.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(Api.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
.deleteApiOperationSettings()
.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(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
.createApiConfigOperationSettings()
.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(ApiConfig.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
.updateApiConfigOperationSettings()
.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(ApiConfig.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
.deleteApiConfigOperationSettings()
.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(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()));
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 listGateways. */
public PagedCallSettings.Builder<
ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse>
listGatewaysSettings() {
return listGatewaysSettings;
}
/** Returns the builder for the settings used for calls to getGateway. */
public UnaryCallSettings.Builder getGatewaySettings() {
return getGatewaySettings;
}
/** Returns the builder for the settings used for calls to createGateway. */
public UnaryCallSettings.Builder createGatewaySettings() {
return createGatewaySettings;
}
/** Returns the builder for the settings used for calls to createGateway. */
public OperationCallSettings.Builder
createGatewayOperationSettings() {
return createGatewayOperationSettings;
}
/** Returns the builder for the settings used for calls to updateGateway. */
public UnaryCallSettings.Builder updateGatewaySettings() {
return updateGatewaySettings;
}
/** Returns the builder for the settings used for calls to updateGateway. */
public OperationCallSettings.Builder
updateGatewayOperationSettings() {
return updateGatewayOperationSettings;
}
/** Returns the builder for the settings used for calls to deleteGateway. */
public UnaryCallSettings.Builder deleteGatewaySettings() {
return deleteGatewaySettings;
}
/** Returns the builder for the settings used for calls to deleteGateway. */
public OperationCallSettings.Builder
deleteGatewayOperationSettings() {
return deleteGatewayOperationSettings;
}
/** Returns the builder for the settings used for calls to listApis. */
public PagedCallSettings.Builder
listApisSettings() {
return listApisSettings;
}
/** Returns the builder for the settings used for calls to getApi. */
public UnaryCallSettings.Builder getApiSettings() {
return getApiSettings;
}
/** Returns the builder for the settings used for calls to createApi. */
public UnaryCallSettings.Builder createApiSettings() {
return createApiSettings;
}
/** Returns the builder for the settings used for calls to createApi. */
public OperationCallSettings.Builder
createApiOperationSettings() {
return createApiOperationSettings;
}
/** Returns the builder for the settings used for calls to updateApi. */
public UnaryCallSettings.Builder updateApiSettings() {
return updateApiSettings;
}
/** Returns the builder for the settings used for calls to updateApi. */
public OperationCallSettings.Builder
updateApiOperationSettings() {
return updateApiOperationSettings;
}
/** Returns the builder for the settings used for calls to deleteApi. */
public UnaryCallSettings.Builder deleteApiSettings() {
return deleteApiSettings;
}
/** Returns the builder for the settings used for calls to deleteApi. */
public OperationCallSettings.Builder
deleteApiOperationSettings() {
return deleteApiOperationSettings;
}
/** Returns the builder for the settings used for calls to listApiConfigs. */
public PagedCallSettings.Builder<
ListApiConfigsRequest, ListApiConfigsResponse, ListApiConfigsPagedResponse>
listApiConfigsSettings() {
return listApiConfigsSettings;
}
/** Returns the builder for the settings used for calls to getApiConfig. */
public UnaryCallSettings.Builder getApiConfigSettings() {
return getApiConfigSettings;
}
/** Returns the builder for the settings used for calls to createApiConfig. */
public UnaryCallSettings.Builder createApiConfigSettings() {
return createApiConfigSettings;
}
/** Returns the builder for the settings used for calls to createApiConfig. */
public OperationCallSettings.Builder
createApiConfigOperationSettings() {
return createApiConfigOperationSettings;
}
/** Returns the builder for the settings used for calls to updateApiConfig. */
public UnaryCallSettings.Builder updateApiConfigSettings() {
return updateApiConfigSettings;
}
/** Returns the builder for the settings used for calls to updateApiConfig. */
public OperationCallSettings.Builder
updateApiConfigOperationSettings() {
return updateApiConfigOperationSettings;
}
/** Returns the builder for the settings used for calls to deleteApiConfig. */
public UnaryCallSettings.Builder deleteApiConfigSettings() {
return deleteApiConfigSettings;
}
/** Returns the builder for the settings used for calls to deleteApiConfig. */
public OperationCallSettings.Builder
deleteApiConfigOperationSettings() {
return deleteApiConfigOperationSettings;
}
@Override
public ApiGatewayServiceStubSettings build() throws IOException {
return new ApiGatewayServiceStubSettings(this);
}
}
}