com.google.cloud.datastream.v1.stub.DatastreamStubSettings Maven / Gradle / Ivy
Show all versions of google-cloud-datastream 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.datastream.v1.stub;
import static com.google.cloud.datastream.v1.DatastreamClient.FetchStaticIpsPagedResponse;
import static com.google.cloud.datastream.v1.DatastreamClient.ListConnectionProfilesPagedResponse;
import static com.google.cloud.datastream.v1.DatastreamClient.ListLocationsPagedResponse;
import static com.google.cloud.datastream.v1.DatastreamClient.ListPrivateConnectionsPagedResponse;
import static com.google.cloud.datastream.v1.DatastreamClient.ListRoutesPagedResponse;
import static com.google.cloud.datastream.v1.DatastreamClient.ListStreamObjectsPagedResponse;
import static com.google.cloud.datastream.v1.DatastreamClient.ListStreamsPagedResponse;
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.datastream.v1.ConnectionProfile;
import com.google.cloud.datastream.v1.CreateConnectionProfileRequest;
import com.google.cloud.datastream.v1.CreatePrivateConnectionRequest;
import com.google.cloud.datastream.v1.CreateRouteRequest;
import com.google.cloud.datastream.v1.CreateStreamRequest;
import com.google.cloud.datastream.v1.DeleteConnectionProfileRequest;
import com.google.cloud.datastream.v1.DeletePrivateConnectionRequest;
import com.google.cloud.datastream.v1.DeleteRouteRequest;
import com.google.cloud.datastream.v1.DeleteStreamRequest;
import com.google.cloud.datastream.v1.DiscoverConnectionProfileRequest;
import com.google.cloud.datastream.v1.DiscoverConnectionProfileResponse;
import com.google.cloud.datastream.v1.FetchStaticIpsRequest;
import com.google.cloud.datastream.v1.FetchStaticIpsResponse;
import com.google.cloud.datastream.v1.GetConnectionProfileRequest;
import com.google.cloud.datastream.v1.GetPrivateConnectionRequest;
import com.google.cloud.datastream.v1.GetRouteRequest;
import com.google.cloud.datastream.v1.GetStreamObjectRequest;
import com.google.cloud.datastream.v1.GetStreamRequest;
import com.google.cloud.datastream.v1.ListConnectionProfilesRequest;
import com.google.cloud.datastream.v1.ListConnectionProfilesResponse;
import com.google.cloud.datastream.v1.ListPrivateConnectionsRequest;
import com.google.cloud.datastream.v1.ListPrivateConnectionsResponse;
import com.google.cloud.datastream.v1.ListRoutesRequest;
import com.google.cloud.datastream.v1.ListRoutesResponse;
import com.google.cloud.datastream.v1.ListStreamObjectsRequest;
import com.google.cloud.datastream.v1.ListStreamObjectsResponse;
import com.google.cloud.datastream.v1.ListStreamsRequest;
import com.google.cloud.datastream.v1.ListStreamsResponse;
import com.google.cloud.datastream.v1.LookupStreamObjectRequest;
import com.google.cloud.datastream.v1.OperationMetadata;
import com.google.cloud.datastream.v1.PrivateConnection;
import com.google.cloud.datastream.v1.Route;
import com.google.cloud.datastream.v1.RunStreamRequest;
import com.google.cloud.datastream.v1.StartBackfillJobRequest;
import com.google.cloud.datastream.v1.StartBackfillJobResponse;
import com.google.cloud.datastream.v1.StopBackfillJobRequest;
import com.google.cloud.datastream.v1.StopBackfillJobResponse;
import com.google.cloud.datastream.v1.Stream;
import com.google.cloud.datastream.v1.StreamObject;
import com.google.cloud.datastream.v1.UpdateConnectionProfileRequest;
import com.google.cloud.datastream.v1.UpdateStreamRequest;
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.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 DatastreamStub}.
*
* The default instance has everything set to sensible defaults:
*
*
* - The default service address (datastream.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 getConnectionProfile:
*
*
{@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
* DatastreamStubSettings.Builder datastreamSettingsBuilder = DatastreamStubSettings.newBuilder();
* datastreamSettingsBuilder
* .getConnectionProfileSettings()
* .setRetrySettings(
* datastreamSettingsBuilder
* .getConnectionProfileSettings()
* .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());
* DatastreamStubSettings datastreamSettings = datastreamSettingsBuilder.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 createConnectionProfile:
*
*
{@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
* DatastreamStubSettings.Builder datastreamSettingsBuilder = DatastreamStubSettings.newBuilder();
* TimedRetryAlgorithm timedRetryAlgorithm =
* OperationalTimedPollAlgorithm.create(
* RetrySettings.newBuilder()
* .setInitialRetryDelayDuration(Duration.ofMillis(500))
* .setRetryDelayMultiplier(1.5)
* .setMaxRetryDelayDuration(Duration.ofMillis(5000))
* .setTotalTimeoutDuration(Duration.ofHours(24))
* .build());
* datastreamSettingsBuilder
* .createClusterOperationSettings()
* .setPollingAlgorithm(timedRetryAlgorithm)
* .build();
* }
*/
@Generated("by gapic-generator-java")
public class DatastreamStubSettings 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<
ListConnectionProfilesRequest,
ListConnectionProfilesResponse,
ListConnectionProfilesPagedResponse>
listConnectionProfilesSettings;
private final UnaryCallSettings
getConnectionProfileSettings;
private final UnaryCallSettings
createConnectionProfileSettings;
private final OperationCallSettings<
CreateConnectionProfileRequest, ConnectionProfile, OperationMetadata>
createConnectionProfileOperationSettings;
private final UnaryCallSettings
updateConnectionProfileSettings;
private final OperationCallSettings<
UpdateConnectionProfileRequest, ConnectionProfile, OperationMetadata>
updateConnectionProfileOperationSettings;
private final UnaryCallSettings
deleteConnectionProfileSettings;
private final OperationCallSettings
deleteConnectionProfileOperationSettings;
private final UnaryCallSettings<
DiscoverConnectionProfileRequest, DiscoverConnectionProfileResponse>
discoverConnectionProfileSettings;
private final PagedCallSettings
listStreamsSettings;
private final UnaryCallSettings getStreamSettings;
private final UnaryCallSettings createStreamSettings;
private final OperationCallSettings
createStreamOperationSettings;
private final UnaryCallSettings updateStreamSettings;
private final OperationCallSettings
updateStreamOperationSettings;
private final UnaryCallSettings deleteStreamSettings;
private final OperationCallSettings
deleteStreamOperationSettings;
private final UnaryCallSettings runStreamSettings;
private final OperationCallSettings
runStreamOperationSettings;
private final UnaryCallSettings getStreamObjectSettings;
private final UnaryCallSettings
lookupStreamObjectSettings;
private final PagedCallSettings<
ListStreamObjectsRequest, ListStreamObjectsResponse, ListStreamObjectsPagedResponse>
listStreamObjectsSettings;
private final UnaryCallSettings
startBackfillJobSettings;
private final UnaryCallSettings
stopBackfillJobSettings;
private final PagedCallSettings<
FetchStaticIpsRequest, FetchStaticIpsResponse, FetchStaticIpsPagedResponse>
fetchStaticIpsSettings;
private final UnaryCallSettings
createPrivateConnectionSettings;
private final OperationCallSettings<
CreatePrivateConnectionRequest, PrivateConnection, OperationMetadata>
createPrivateConnectionOperationSettings;
private final UnaryCallSettings
getPrivateConnectionSettings;
private final PagedCallSettings<
ListPrivateConnectionsRequest,
ListPrivateConnectionsResponse,
ListPrivateConnectionsPagedResponse>
listPrivateConnectionsSettings;
private final UnaryCallSettings
deletePrivateConnectionSettings;
private final OperationCallSettings
deletePrivateConnectionOperationSettings;
private final UnaryCallSettings createRouteSettings;
private final OperationCallSettings
createRouteOperationSettings;
private final UnaryCallSettings getRouteSettings;
private final PagedCallSettings
listRoutesSettings;
private final UnaryCallSettings deleteRouteSettings;
private final OperationCallSettings
deleteRouteOperationSettings;
private final PagedCallSettings<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
private final UnaryCallSettings getLocationSettings;
private static final PagedListDescriptor<
ListConnectionProfilesRequest, ListConnectionProfilesResponse, ConnectionProfile>
LIST_CONNECTION_PROFILES_PAGE_STR_DESC =
new PagedListDescriptor<
ListConnectionProfilesRequest, ListConnectionProfilesResponse, ConnectionProfile>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListConnectionProfilesRequest injectToken(
ListConnectionProfilesRequest payload, String token) {
return ListConnectionProfilesRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListConnectionProfilesRequest injectPageSize(
ListConnectionProfilesRequest payload, int pageSize) {
return ListConnectionProfilesRequest.newBuilder(payload)
.setPageSize(pageSize)
.build();
}
@Override
public Integer extractPageSize(ListConnectionProfilesRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListConnectionProfilesResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(
ListConnectionProfilesResponse payload) {
return payload.getConnectionProfilesList();
}
};
private static final PagedListDescriptor
LIST_STREAMS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListStreamsRequest injectToken(ListStreamsRequest payload, String token) {
return ListStreamsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListStreamsRequest injectPageSize(ListStreamsRequest payload, int pageSize) {
return ListStreamsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListStreamsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListStreamsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListStreamsResponse payload) {
return payload.getStreamsList();
}
};
private static final PagedListDescriptor<
ListStreamObjectsRequest, ListStreamObjectsResponse, StreamObject>
LIST_STREAM_OBJECTS_PAGE_STR_DESC =
new PagedListDescriptor<
ListStreamObjectsRequest, ListStreamObjectsResponse, StreamObject>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListStreamObjectsRequest injectToken(
ListStreamObjectsRequest payload, String token) {
return ListStreamObjectsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListStreamObjectsRequest injectPageSize(
ListStreamObjectsRequest payload, int pageSize) {
return ListStreamObjectsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListStreamObjectsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListStreamObjectsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListStreamObjectsResponse payload) {
return payload.getStreamObjectsList();
}
};
private static final PagedListDescriptor
FETCH_STATIC_IPS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public FetchStaticIpsRequest injectToken(FetchStaticIpsRequest payload, String token) {
return FetchStaticIpsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public FetchStaticIpsRequest injectPageSize(
FetchStaticIpsRequest payload, int pageSize) {
return FetchStaticIpsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(FetchStaticIpsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(FetchStaticIpsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(FetchStaticIpsResponse payload) {
return payload.getStaticIpsList();
}
};
private static final PagedListDescriptor<
ListPrivateConnectionsRequest, ListPrivateConnectionsResponse, PrivateConnection>
LIST_PRIVATE_CONNECTIONS_PAGE_STR_DESC =
new PagedListDescriptor<
ListPrivateConnectionsRequest, ListPrivateConnectionsResponse, PrivateConnection>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListPrivateConnectionsRequest injectToken(
ListPrivateConnectionsRequest payload, String token) {
return ListPrivateConnectionsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListPrivateConnectionsRequest injectPageSize(
ListPrivateConnectionsRequest payload, int pageSize) {
return ListPrivateConnectionsRequest.newBuilder(payload)
.setPageSize(pageSize)
.build();
}
@Override
public Integer extractPageSize(ListPrivateConnectionsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListPrivateConnectionsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(
ListPrivateConnectionsResponse payload) {
return payload.getPrivateConnectionsList();
}
};
private static final PagedListDescriptor
LIST_ROUTES_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListRoutesRequest injectToken(ListRoutesRequest payload, String token) {
return ListRoutesRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListRoutesRequest injectPageSize(ListRoutesRequest payload, int pageSize) {
return ListRoutesRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListRoutesRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListRoutesResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListRoutesResponse payload) {
return payload.getRoutesList();
}
};
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<
ListConnectionProfilesRequest,
ListConnectionProfilesResponse,
ListConnectionProfilesPagedResponse>
LIST_CONNECTION_PROFILES_PAGE_STR_FACT =
new PagedListResponseFactory<
ListConnectionProfilesRequest,
ListConnectionProfilesResponse,
ListConnectionProfilesPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable
callable,
ListConnectionProfilesRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext<
ListConnectionProfilesRequest,
ListConnectionProfilesResponse,
ConnectionProfile>
pageContext =
PageContext.create(
callable, LIST_CONNECTION_PROFILES_PAGE_STR_DESC, request, context);
return ListConnectionProfilesPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListStreamsRequest, ListStreamsResponse, ListStreamsPagedResponse>
LIST_STREAMS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListStreamsRequest, ListStreamsResponse, ListStreamsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListStreamsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_STREAMS_PAGE_STR_DESC, request, context);
return ListStreamsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListStreamObjectsRequest, ListStreamObjectsResponse, ListStreamObjectsPagedResponse>
LIST_STREAM_OBJECTS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListStreamObjectsRequest,
ListStreamObjectsResponse,
ListStreamObjectsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListStreamObjectsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext
pageContext =
PageContext.create(
callable, LIST_STREAM_OBJECTS_PAGE_STR_DESC, request, context);
return ListStreamObjectsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
FetchStaticIpsRequest, FetchStaticIpsResponse, FetchStaticIpsPagedResponse>
FETCH_STATIC_IPS_PAGE_STR_FACT =
new PagedListResponseFactory<
FetchStaticIpsRequest, FetchStaticIpsResponse, FetchStaticIpsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
FetchStaticIpsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, FETCH_STATIC_IPS_PAGE_STR_DESC, request, context);
return FetchStaticIpsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListPrivateConnectionsRequest,
ListPrivateConnectionsResponse,
ListPrivateConnectionsPagedResponse>
LIST_PRIVATE_CONNECTIONS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListPrivateConnectionsRequest,
ListPrivateConnectionsResponse,
ListPrivateConnectionsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable
callable,
ListPrivateConnectionsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext<
ListPrivateConnectionsRequest,
ListPrivateConnectionsResponse,
PrivateConnection>
pageContext =
PageContext.create(
callable, LIST_PRIVATE_CONNECTIONS_PAGE_STR_DESC, request, context);
return ListPrivateConnectionsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse>
LIST_ROUTES_PAGE_STR_FACT =
new PagedListResponseFactory<
ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListRoutesRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_ROUTES_PAGE_STR_DESC, request, context);
return ListRoutesPagedResponse.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 listConnectionProfiles. */
public PagedCallSettings<
ListConnectionProfilesRequest,
ListConnectionProfilesResponse,
ListConnectionProfilesPagedResponse>
listConnectionProfilesSettings() {
return listConnectionProfilesSettings;
}
/** Returns the object with the settings used for calls to getConnectionProfile. */
public UnaryCallSettings
getConnectionProfileSettings() {
return getConnectionProfileSettings;
}
/** Returns the object with the settings used for calls to createConnectionProfile. */
public UnaryCallSettings
createConnectionProfileSettings() {
return createConnectionProfileSettings;
}
/** Returns the object with the settings used for calls to createConnectionProfile. */
public OperationCallSettings
createConnectionProfileOperationSettings() {
return createConnectionProfileOperationSettings;
}
/** Returns the object with the settings used for calls to updateConnectionProfile. */
public UnaryCallSettings
updateConnectionProfileSettings() {
return updateConnectionProfileSettings;
}
/** Returns the object with the settings used for calls to updateConnectionProfile. */
public OperationCallSettings
updateConnectionProfileOperationSettings() {
return updateConnectionProfileOperationSettings;
}
/** Returns the object with the settings used for calls to deleteConnectionProfile. */
public UnaryCallSettings
deleteConnectionProfileSettings() {
return deleteConnectionProfileSettings;
}
/** Returns the object with the settings used for calls to deleteConnectionProfile. */
public OperationCallSettings
deleteConnectionProfileOperationSettings() {
return deleteConnectionProfileOperationSettings;
}
/** Returns the object with the settings used for calls to discoverConnectionProfile. */
public UnaryCallSettings
discoverConnectionProfileSettings() {
return discoverConnectionProfileSettings;
}
/** Returns the object with the settings used for calls to listStreams. */
public PagedCallSettings
listStreamsSettings() {
return listStreamsSettings;
}
/** Returns the object with the settings used for calls to getStream. */
public UnaryCallSettings getStreamSettings() {
return getStreamSettings;
}
/** Returns the object with the settings used for calls to createStream. */
public UnaryCallSettings createStreamSettings() {
return createStreamSettings;
}
/** Returns the object with the settings used for calls to createStream. */
public OperationCallSettings
createStreamOperationSettings() {
return createStreamOperationSettings;
}
/** Returns the object with the settings used for calls to updateStream. */
public UnaryCallSettings updateStreamSettings() {
return updateStreamSettings;
}
/** Returns the object with the settings used for calls to updateStream. */
public OperationCallSettings
updateStreamOperationSettings() {
return updateStreamOperationSettings;
}
/** Returns the object with the settings used for calls to deleteStream. */
public UnaryCallSettings deleteStreamSettings() {
return deleteStreamSettings;
}
/** Returns the object with the settings used for calls to deleteStream. */
public OperationCallSettings
deleteStreamOperationSettings() {
return deleteStreamOperationSettings;
}
/** Returns the object with the settings used for calls to runStream. */
public UnaryCallSettings runStreamSettings() {
return runStreamSettings;
}
/** Returns the object with the settings used for calls to runStream. */
public OperationCallSettings
runStreamOperationSettings() {
return runStreamOperationSettings;
}
/** Returns the object with the settings used for calls to getStreamObject. */
public UnaryCallSettings getStreamObjectSettings() {
return getStreamObjectSettings;
}
/** Returns the object with the settings used for calls to lookupStreamObject. */
public UnaryCallSettings lookupStreamObjectSettings() {
return lookupStreamObjectSettings;
}
/** Returns the object with the settings used for calls to listStreamObjects. */
public PagedCallSettings<
ListStreamObjectsRequest, ListStreamObjectsResponse, ListStreamObjectsPagedResponse>
listStreamObjectsSettings() {
return listStreamObjectsSettings;
}
/** Returns the object with the settings used for calls to startBackfillJob. */
public UnaryCallSettings
startBackfillJobSettings() {
return startBackfillJobSettings;
}
/** Returns the object with the settings used for calls to stopBackfillJob. */
public UnaryCallSettings
stopBackfillJobSettings() {
return stopBackfillJobSettings;
}
/** Returns the object with the settings used for calls to fetchStaticIps. */
public PagedCallSettings<
FetchStaticIpsRequest, FetchStaticIpsResponse, FetchStaticIpsPagedResponse>
fetchStaticIpsSettings() {
return fetchStaticIpsSettings;
}
/** Returns the object with the settings used for calls to createPrivateConnection. */
public UnaryCallSettings
createPrivateConnectionSettings() {
return createPrivateConnectionSettings;
}
/** Returns the object with the settings used for calls to createPrivateConnection. */
public OperationCallSettings
createPrivateConnectionOperationSettings() {
return createPrivateConnectionOperationSettings;
}
/** Returns the object with the settings used for calls to getPrivateConnection. */
public UnaryCallSettings
getPrivateConnectionSettings() {
return getPrivateConnectionSettings;
}
/** Returns the object with the settings used for calls to listPrivateConnections. */
public PagedCallSettings<
ListPrivateConnectionsRequest,
ListPrivateConnectionsResponse,
ListPrivateConnectionsPagedResponse>
listPrivateConnectionsSettings() {
return listPrivateConnectionsSettings;
}
/** Returns the object with the settings used for calls to deletePrivateConnection. */
public UnaryCallSettings
deletePrivateConnectionSettings() {
return deletePrivateConnectionSettings;
}
/** Returns the object with the settings used for calls to deletePrivateConnection. */
public OperationCallSettings
deletePrivateConnectionOperationSettings() {
return deletePrivateConnectionOperationSettings;
}
/** Returns the object with the settings used for calls to createRoute. */
public UnaryCallSettings createRouteSettings() {
return createRouteSettings;
}
/** Returns the object with the settings used for calls to createRoute. */
public OperationCallSettings
createRouteOperationSettings() {
return createRouteOperationSettings;
}
/** Returns the object with the settings used for calls to getRoute. */
public UnaryCallSettings getRouteSettings() {
return getRouteSettings;
}
/** Returns the object with the settings used for calls to listRoutes. */
public PagedCallSettings
listRoutesSettings() {
return listRoutesSettings;
}
/** Returns the object with the settings used for calls to deleteRoute. */
public UnaryCallSettings deleteRouteSettings() {
return deleteRouteSettings;
}
/** Returns the object with the settings used for calls to deleteRoute. */
public OperationCallSettings
deleteRouteOperationSettings() {
return deleteRouteOperationSettings;
}
/** 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;
}
public DatastreamStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcDatastreamStub.create(this);
}
if (getTransportChannelProvider()
.getTransportName()
.equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
return HttpJsonDatastreamStub.create(this);
}
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}
/** Returns the default service name. */
@Override
public String getServiceName() {
return "datastream";
}
/** 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 "datastream.googleapis.com:443";
}
/** Returns the default mTLS service endpoint. */
public static String getDefaultMtlsEndpoint() {
return "datastream.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(DatastreamStubSettings.class))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(DatastreamStubSettings.class))
.setTransportToken(
GaxHttpJsonProperties.getHttpJsonTokenName(),
GaxHttpJsonProperties.getHttpJsonVersion());
}
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return DatastreamStubSettings.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 DatastreamStubSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
listConnectionProfilesSettings = settingsBuilder.listConnectionProfilesSettings().build();
getConnectionProfileSettings = settingsBuilder.getConnectionProfileSettings().build();
createConnectionProfileSettings = settingsBuilder.createConnectionProfileSettings().build();
createConnectionProfileOperationSettings =
settingsBuilder.createConnectionProfileOperationSettings().build();
updateConnectionProfileSettings = settingsBuilder.updateConnectionProfileSettings().build();
updateConnectionProfileOperationSettings =
settingsBuilder.updateConnectionProfileOperationSettings().build();
deleteConnectionProfileSettings = settingsBuilder.deleteConnectionProfileSettings().build();
deleteConnectionProfileOperationSettings =
settingsBuilder.deleteConnectionProfileOperationSettings().build();
discoverConnectionProfileSettings = settingsBuilder.discoverConnectionProfileSettings().build();
listStreamsSettings = settingsBuilder.listStreamsSettings().build();
getStreamSettings = settingsBuilder.getStreamSettings().build();
createStreamSettings = settingsBuilder.createStreamSettings().build();
createStreamOperationSettings = settingsBuilder.createStreamOperationSettings().build();
updateStreamSettings = settingsBuilder.updateStreamSettings().build();
updateStreamOperationSettings = settingsBuilder.updateStreamOperationSettings().build();
deleteStreamSettings = settingsBuilder.deleteStreamSettings().build();
deleteStreamOperationSettings = settingsBuilder.deleteStreamOperationSettings().build();
runStreamSettings = settingsBuilder.runStreamSettings().build();
runStreamOperationSettings = settingsBuilder.runStreamOperationSettings().build();
getStreamObjectSettings = settingsBuilder.getStreamObjectSettings().build();
lookupStreamObjectSettings = settingsBuilder.lookupStreamObjectSettings().build();
listStreamObjectsSettings = settingsBuilder.listStreamObjectsSettings().build();
startBackfillJobSettings = settingsBuilder.startBackfillJobSettings().build();
stopBackfillJobSettings = settingsBuilder.stopBackfillJobSettings().build();
fetchStaticIpsSettings = settingsBuilder.fetchStaticIpsSettings().build();
createPrivateConnectionSettings = settingsBuilder.createPrivateConnectionSettings().build();
createPrivateConnectionOperationSettings =
settingsBuilder.createPrivateConnectionOperationSettings().build();
getPrivateConnectionSettings = settingsBuilder.getPrivateConnectionSettings().build();
listPrivateConnectionsSettings = settingsBuilder.listPrivateConnectionsSettings().build();
deletePrivateConnectionSettings = settingsBuilder.deletePrivateConnectionSettings().build();
deletePrivateConnectionOperationSettings =
settingsBuilder.deletePrivateConnectionOperationSettings().build();
createRouteSettings = settingsBuilder.createRouteSettings().build();
createRouteOperationSettings = settingsBuilder.createRouteOperationSettings().build();
getRouteSettings = settingsBuilder.getRouteSettings().build();
listRoutesSettings = settingsBuilder.listRoutesSettings().build();
deleteRouteSettings = settingsBuilder.deleteRouteSettings().build();
deleteRouteOperationSettings = settingsBuilder.deleteRouteOperationSettings().build();
listLocationsSettings = settingsBuilder.listLocationsSettings().build();
getLocationSettings = settingsBuilder.getLocationSettings().build();
}
/** Builder for DatastreamStubSettings. */
public static class Builder extends StubSettings.Builder {
private final ImmutableList> unaryMethodSettingsBuilders;
private final PagedCallSettings.Builder<
ListConnectionProfilesRequest,
ListConnectionProfilesResponse,
ListConnectionProfilesPagedResponse>
listConnectionProfilesSettings;
private final UnaryCallSettings.Builder
getConnectionProfileSettings;
private final UnaryCallSettings.Builder
createConnectionProfileSettings;
private final OperationCallSettings.Builder<
CreateConnectionProfileRequest, ConnectionProfile, OperationMetadata>
createConnectionProfileOperationSettings;
private final UnaryCallSettings.Builder
updateConnectionProfileSettings;
private final OperationCallSettings.Builder<
UpdateConnectionProfileRequest, ConnectionProfile, OperationMetadata>
updateConnectionProfileOperationSettings;
private final UnaryCallSettings.Builder
deleteConnectionProfileSettings;
private final OperationCallSettings.Builder<
DeleteConnectionProfileRequest, Empty, OperationMetadata>
deleteConnectionProfileOperationSettings;
private final UnaryCallSettings.Builder<
DiscoverConnectionProfileRequest, DiscoverConnectionProfileResponse>
discoverConnectionProfileSettings;
private final PagedCallSettings.Builder<
ListStreamsRequest, ListStreamsResponse, ListStreamsPagedResponse>
listStreamsSettings;
private final UnaryCallSettings.Builder getStreamSettings;
private final UnaryCallSettings.Builder createStreamSettings;
private final OperationCallSettings.Builder
createStreamOperationSettings;
private final UnaryCallSettings.Builder updateStreamSettings;
private final OperationCallSettings.Builder
updateStreamOperationSettings;
private final UnaryCallSettings.Builder deleteStreamSettings;
private final OperationCallSettings.Builder
deleteStreamOperationSettings;
private final UnaryCallSettings.Builder runStreamSettings;
private final OperationCallSettings.Builder
runStreamOperationSettings;
private final UnaryCallSettings.Builder
getStreamObjectSettings;
private final UnaryCallSettings.Builder
lookupStreamObjectSettings;
private final PagedCallSettings.Builder<
ListStreamObjectsRequest, ListStreamObjectsResponse, ListStreamObjectsPagedResponse>
listStreamObjectsSettings;
private final UnaryCallSettings.Builder
startBackfillJobSettings;
private final UnaryCallSettings.Builder
stopBackfillJobSettings;
private final PagedCallSettings.Builder<
FetchStaticIpsRequest, FetchStaticIpsResponse, FetchStaticIpsPagedResponse>
fetchStaticIpsSettings;
private final UnaryCallSettings.Builder
createPrivateConnectionSettings;
private final OperationCallSettings.Builder<
CreatePrivateConnectionRequest, PrivateConnection, OperationMetadata>
createPrivateConnectionOperationSettings;
private final UnaryCallSettings.Builder
getPrivateConnectionSettings;
private final PagedCallSettings.Builder<
ListPrivateConnectionsRequest,
ListPrivateConnectionsResponse,
ListPrivateConnectionsPagedResponse>
listPrivateConnectionsSettings;
private final UnaryCallSettings.Builder
deletePrivateConnectionSettings;
private final OperationCallSettings.Builder<
DeletePrivateConnectionRequest, Empty, OperationMetadata>
deletePrivateConnectionOperationSettings;
private final UnaryCallSettings.Builder createRouteSettings;
private final OperationCallSettings.Builder
createRouteOperationSettings;
private final UnaryCallSettings.Builder getRouteSettings;
private final PagedCallSettings.Builder<
ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse>
listRoutesSettings;
private final UnaryCallSettings.Builder deleteRouteSettings;
private final OperationCallSettings.Builder
deleteRouteOperationSettings;
private final PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
private final UnaryCallSettings.Builder getLocationSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
static {
ImmutableMap.Builder> definitions =
ImmutableMap.builder();
definitions.put(
"retry_policy_0_codes",
ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
definitions.put(
"no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
static {
ImmutableMap.Builder definitions = ImmutableMap.builder();
RetrySettings settings = null;
settings =
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(1000L))
.setRetryDelayMultiplier(1.3)
.setMaxRetryDelayDuration(Duration.ofMillis(10000L))
.setInitialRpcTimeoutDuration(Duration.ofMillis(60000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeoutDuration(Duration.ofMillis(60000L))
.setTotalTimeoutDuration(Duration.ofMillis(60000L))
.build();
definitions.put("retry_policy_0_params", settings);
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);
RETRY_PARAM_DEFINITIONS = definitions.build();
}
protected Builder() {
this(((ClientContext) null));
}
protected Builder(ClientContext clientContext) {
super(clientContext);
listConnectionProfilesSettings =
PagedCallSettings.newBuilder(LIST_CONNECTION_PROFILES_PAGE_STR_FACT);
getConnectionProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createConnectionProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createConnectionProfileOperationSettings = OperationCallSettings.newBuilder();
updateConnectionProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateConnectionProfileOperationSettings = OperationCallSettings.newBuilder();
deleteConnectionProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteConnectionProfileOperationSettings = OperationCallSettings.newBuilder();
discoverConnectionProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listStreamsSettings = PagedCallSettings.newBuilder(LIST_STREAMS_PAGE_STR_FACT);
getStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createStreamOperationSettings = OperationCallSettings.newBuilder();
updateStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateStreamOperationSettings = OperationCallSettings.newBuilder();
deleteStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteStreamOperationSettings = OperationCallSettings.newBuilder();
runStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
runStreamOperationSettings = OperationCallSettings.newBuilder();
getStreamObjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
lookupStreamObjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listStreamObjectsSettings = PagedCallSettings.newBuilder(LIST_STREAM_OBJECTS_PAGE_STR_FACT);
startBackfillJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
stopBackfillJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
fetchStaticIpsSettings = PagedCallSettings.newBuilder(FETCH_STATIC_IPS_PAGE_STR_FACT);
createPrivateConnectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createPrivateConnectionOperationSettings = OperationCallSettings.newBuilder();
getPrivateConnectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listPrivateConnectionsSettings =
PagedCallSettings.newBuilder(LIST_PRIVATE_CONNECTIONS_PAGE_STR_FACT);
deletePrivateConnectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deletePrivateConnectionOperationSettings = OperationCallSettings.newBuilder();
createRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createRouteOperationSettings = OperationCallSettings.newBuilder();
getRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listRoutesSettings = PagedCallSettings.newBuilder(LIST_ROUTES_PAGE_STR_FACT);
deleteRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteRouteOperationSettings = OperationCallSettings.newBuilder();
listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
listConnectionProfilesSettings,
getConnectionProfileSettings,
createConnectionProfileSettings,
updateConnectionProfileSettings,
deleteConnectionProfileSettings,
discoverConnectionProfileSettings,
listStreamsSettings,
getStreamSettings,
createStreamSettings,
updateStreamSettings,
deleteStreamSettings,
runStreamSettings,
getStreamObjectSettings,
lookupStreamObjectSettings,
listStreamObjectsSettings,
startBackfillJobSettings,
stopBackfillJobSettings,
fetchStaticIpsSettings,
createPrivateConnectionSettings,
getPrivateConnectionSettings,
listPrivateConnectionsSettings,
deletePrivateConnectionSettings,
createRouteSettings,
getRouteSettings,
listRoutesSettings,
deleteRouteSettings,
listLocationsSettings,
getLocationSettings);
initDefaults(this);
}
protected Builder(DatastreamStubSettings settings) {
super(settings);
listConnectionProfilesSettings = settings.listConnectionProfilesSettings.toBuilder();
getConnectionProfileSettings = settings.getConnectionProfileSettings.toBuilder();
createConnectionProfileSettings = settings.createConnectionProfileSettings.toBuilder();
createConnectionProfileOperationSettings =
settings.createConnectionProfileOperationSettings.toBuilder();
updateConnectionProfileSettings = settings.updateConnectionProfileSettings.toBuilder();
updateConnectionProfileOperationSettings =
settings.updateConnectionProfileOperationSettings.toBuilder();
deleteConnectionProfileSettings = settings.deleteConnectionProfileSettings.toBuilder();
deleteConnectionProfileOperationSettings =
settings.deleteConnectionProfileOperationSettings.toBuilder();
discoverConnectionProfileSettings = settings.discoverConnectionProfileSettings.toBuilder();
listStreamsSettings = settings.listStreamsSettings.toBuilder();
getStreamSettings = settings.getStreamSettings.toBuilder();
createStreamSettings = settings.createStreamSettings.toBuilder();
createStreamOperationSettings = settings.createStreamOperationSettings.toBuilder();
updateStreamSettings = settings.updateStreamSettings.toBuilder();
updateStreamOperationSettings = settings.updateStreamOperationSettings.toBuilder();
deleteStreamSettings = settings.deleteStreamSettings.toBuilder();
deleteStreamOperationSettings = settings.deleteStreamOperationSettings.toBuilder();
runStreamSettings = settings.runStreamSettings.toBuilder();
runStreamOperationSettings = settings.runStreamOperationSettings.toBuilder();
getStreamObjectSettings = settings.getStreamObjectSettings.toBuilder();
lookupStreamObjectSettings = settings.lookupStreamObjectSettings.toBuilder();
listStreamObjectsSettings = settings.listStreamObjectsSettings.toBuilder();
startBackfillJobSettings = settings.startBackfillJobSettings.toBuilder();
stopBackfillJobSettings = settings.stopBackfillJobSettings.toBuilder();
fetchStaticIpsSettings = settings.fetchStaticIpsSettings.toBuilder();
createPrivateConnectionSettings = settings.createPrivateConnectionSettings.toBuilder();
createPrivateConnectionOperationSettings =
settings.createPrivateConnectionOperationSettings.toBuilder();
getPrivateConnectionSettings = settings.getPrivateConnectionSettings.toBuilder();
listPrivateConnectionsSettings = settings.listPrivateConnectionsSettings.toBuilder();
deletePrivateConnectionSettings = settings.deletePrivateConnectionSettings.toBuilder();
deletePrivateConnectionOperationSettings =
settings.deletePrivateConnectionOperationSettings.toBuilder();
createRouteSettings = settings.createRouteSettings.toBuilder();
createRouteOperationSettings = settings.createRouteOperationSettings.toBuilder();
getRouteSettings = settings.getRouteSettings.toBuilder();
listRoutesSettings = settings.listRoutesSettings.toBuilder();
deleteRouteSettings = settings.deleteRouteSettings.toBuilder();
deleteRouteOperationSettings = settings.deleteRouteOperationSettings.toBuilder();
listLocationsSettings = settings.listLocationsSettings.toBuilder();
getLocationSettings = settings.getLocationSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
listConnectionProfilesSettings,
getConnectionProfileSettings,
createConnectionProfileSettings,
updateConnectionProfileSettings,
deleteConnectionProfileSettings,
discoverConnectionProfileSettings,
listStreamsSettings,
getStreamSettings,
createStreamSettings,
updateStreamSettings,
deleteStreamSettings,
runStreamSettings,
getStreamObjectSettings,
lookupStreamObjectSettings,
listStreamObjectsSettings,
startBackfillJobSettings,
stopBackfillJobSettings,
fetchStaticIpsSettings,
createPrivateConnectionSettings,
getPrivateConnectionSettings,
listPrivateConnectionsSettings,
deletePrivateConnectionSettings,
createRouteSettings,
getRouteSettings,
listRoutesSettings,
deleteRouteSettings,
listLocationsSettings,
getLocationSettings);
}
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
.listConnectionProfilesSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.getConnectionProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.createConnectionProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.updateConnectionProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.deleteConnectionProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.discoverConnectionProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.listStreamsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.getStreamSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.createStreamSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.updateStreamSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.deleteStreamSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.runStreamSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.getStreamObjectSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.lookupStreamObjectSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.listStreamObjectsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.startBackfillJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.stopBackfillJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.fetchStaticIpsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.createPrivateConnectionSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.getPrivateConnectionSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.listPrivateConnectionsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.deletePrivateConnectionSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.createRouteSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.getRouteSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.listRoutesSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
.deleteRouteSettings()
.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
.createConnectionProfileOperationSettings()
.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(ConnectionProfile.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
.updateConnectionProfileOperationSettings()
.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(ConnectionProfile.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
.deleteConnectionProfileOperationSettings()
.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
.createStreamOperationSettings()
.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(Stream.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
.updateStreamOperationSettings()
.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(Stream.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
.deleteStreamOperationSettings()
.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
.runStreamOperationSettings()
.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(Stream.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
.createPrivateConnectionOperationSettings()
.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(PrivateConnection.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
.deletePrivateConnectionOperationSettings()
.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
.createRouteOperationSettings()
.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(Route.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
.deleteRouteOperationSettings()
.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()));
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 listConnectionProfiles. */
public PagedCallSettings.Builder<
ListConnectionProfilesRequest,
ListConnectionProfilesResponse,
ListConnectionProfilesPagedResponse>
listConnectionProfilesSettings() {
return listConnectionProfilesSettings;
}
/** Returns the builder for the settings used for calls to getConnectionProfile. */
public UnaryCallSettings.Builder
getConnectionProfileSettings() {
return getConnectionProfileSettings;
}
/** Returns the builder for the settings used for calls to createConnectionProfile. */
public UnaryCallSettings.Builder
createConnectionProfileSettings() {
return createConnectionProfileSettings;
}
/** Returns the builder for the settings used for calls to createConnectionProfile. */
public OperationCallSettings.Builder<
CreateConnectionProfileRequest, ConnectionProfile, OperationMetadata>
createConnectionProfileOperationSettings() {
return createConnectionProfileOperationSettings;
}
/** Returns the builder for the settings used for calls to updateConnectionProfile. */
public UnaryCallSettings.Builder
updateConnectionProfileSettings() {
return updateConnectionProfileSettings;
}
/** Returns the builder for the settings used for calls to updateConnectionProfile. */
public OperationCallSettings.Builder<
UpdateConnectionProfileRequest, ConnectionProfile, OperationMetadata>
updateConnectionProfileOperationSettings() {
return updateConnectionProfileOperationSettings;
}
/** Returns the builder for the settings used for calls to deleteConnectionProfile. */
public UnaryCallSettings.Builder
deleteConnectionProfileSettings() {
return deleteConnectionProfileSettings;
}
/** Returns the builder for the settings used for calls to deleteConnectionProfile. */
public OperationCallSettings.Builder
deleteConnectionProfileOperationSettings() {
return deleteConnectionProfileOperationSettings;
}
/** Returns the builder for the settings used for calls to discoverConnectionProfile. */
public UnaryCallSettings.Builder<
DiscoverConnectionProfileRequest, DiscoverConnectionProfileResponse>
discoverConnectionProfileSettings() {
return discoverConnectionProfileSettings;
}
/** Returns the builder for the settings used for calls to listStreams. */
public PagedCallSettings.Builder<
ListStreamsRequest, ListStreamsResponse, ListStreamsPagedResponse>
listStreamsSettings() {
return listStreamsSettings;
}
/** Returns the builder for the settings used for calls to getStream. */
public UnaryCallSettings.Builder getStreamSettings() {
return getStreamSettings;
}
/** Returns the builder for the settings used for calls to createStream. */
public UnaryCallSettings.Builder createStreamSettings() {
return createStreamSettings;
}
/** Returns the builder for the settings used for calls to createStream. */
public OperationCallSettings.Builder
createStreamOperationSettings() {
return createStreamOperationSettings;
}
/** Returns the builder for the settings used for calls to updateStream. */
public UnaryCallSettings.Builder updateStreamSettings() {
return updateStreamSettings;
}
/** Returns the builder for the settings used for calls to updateStream. */
public OperationCallSettings.Builder
updateStreamOperationSettings() {
return updateStreamOperationSettings;
}
/** Returns the builder for the settings used for calls to deleteStream. */
public UnaryCallSettings.Builder deleteStreamSettings() {
return deleteStreamSettings;
}
/** Returns the builder for the settings used for calls to deleteStream. */
public OperationCallSettings.Builder
deleteStreamOperationSettings() {
return deleteStreamOperationSettings;
}
/** Returns the builder for the settings used for calls to runStream. */
public UnaryCallSettings.Builder runStreamSettings() {
return runStreamSettings;
}
/** Returns the builder for the settings used for calls to runStream. */
public OperationCallSettings.Builder
runStreamOperationSettings() {
return runStreamOperationSettings;
}
/** Returns the builder for the settings used for calls to getStreamObject. */
public UnaryCallSettings.Builder
getStreamObjectSettings() {
return getStreamObjectSettings;
}
/** Returns the builder for the settings used for calls to lookupStreamObject. */
public UnaryCallSettings.Builder
lookupStreamObjectSettings() {
return lookupStreamObjectSettings;
}
/** Returns the builder for the settings used for calls to listStreamObjects. */
public PagedCallSettings.Builder<
ListStreamObjectsRequest, ListStreamObjectsResponse, ListStreamObjectsPagedResponse>
listStreamObjectsSettings() {
return listStreamObjectsSettings;
}
/** Returns the builder for the settings used for calls to startBackfillJob. */
public UnaryCallSettings.Builder
startBackfillJobSettings() {
return startBackfillJobSettings;
}
/** Returns the builder for the settings used for calls to stopBackfillJob. */
public UnaryCallSettings.Builder
stopBackfillJobSettings() {
return stopBackfillJobSettings;
}
/** Returns the builder for the settings used for calls to fetchStaticIps. */
public PagedCallSettings.Builder<
FetchStaticIpsRequest, FetchStaticIpsResponse, FetchStaticIpsPagedResponse>
fetchStaticIpsSettings() {
return fetchStaticIpsSettings;
}
/** Returns the builder for the settings used for calls to createPrivateConnection. */
public UnaryCallSettings.Builder
createPrivateConnectionSettings() {
return createPrivateConnectionSettings;
}
/** Returns the builder for the settings used for calls to createPrivateConnection. */
public OperationCallSettings.Builder<
CreatePrivateConnectionRequest, PrivateConnection, OperationMetadata>
createPrivateConnectionOperationSettings() {
return createPrivateConnectionOperationSettings;
}
/** Returns the builder for the settings used for calls to getPrivateConnection. */
public UnaryCallSettings.Builder
getPrivateConnectionSettings() {
return getPrivateConnectionSettings;
}
/** Returns the builder for the settings used for calls to listPrivateConnections. */
public PagedCallSettings.Builder<
ListPrivateConnectionsRequest,
ListPrivateConnectionsResponse,
ListPrivateConnectionsPagedResponse>
listPrivateConnectionsSettings() {
return listPrivateConnectionsSettings;
}
/** Returns the builder for the settings used for calls to deletePrivateConnection. */
public UnaryCallSettings.Builder
deletePrivateConnectionSettings() {
return deletePrivateConnectionSettings;
}
/** Returns the builder for the settings used for calls to deletePrivateConnection. */
public OperationCallSettings.Builder
deletePrivateConnectionOperationSettings() {
return deletePrivateConnectionOperationSettings;
}
/** Returns the builder for the settings used for calls to createRoute. */
public UnaryCallSettings.Builder createRouteSettings() {
return createRouteSettings;
}
/** Returns the builder for the settings used for calls to createRoute. */
public OperationCallSettings.Builder
createRouteOperationSettings() {
return createRouteOperationSettings;
}
/** Returns the builder for the settings used for calls to getRoute. */
public UnaryCallSettings.Builder getRouteSettings() {
return getRouteSettings;
}
/** Returns the builder for the settings used for calls to listRoutes. */
public PagedCallSettings.Builder
listRoutesSettings() {
return listRoutesSettings;
}
/** Returns the builder for the settings used for calls to deleteRoute. */
public UnaryCallSettings.Builder deleteRouteSettings() {
return deleteRouteSettings;
}
/** Returns the builder for the settings used for calls to deleteRoute. */
public OperationCallSettings.Builder
deleteRouteOperationSettings() {
return deleteRouteOperationSettings;
}
/** 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;
}
@Override
public DatastreamStubSettings build() throws IOException {
return new DatastreamStubSettings(this);
}
}
}