com.google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessmentSettings Maven / Gradle / Ivy
Show all versions of google-cloud-rapidmigrationassessment 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.rapidmigrationassessment.v1;
import static com.google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessmentClient.ListCollectorsPagedResponse;
import static com.google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessmentClient.ListLocationsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.rapidmigrationassessment.v1.stub.RapidMigrationAssessmentStubSettings;
import com.google.longrunning.Operation;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Settings class to configure an instance of {@link RapidMigrationAssessmentClient}.
*
* The default instance has everything set to sensible defaults:
*
*
* - The default service address (rapidmigrationassessment.googleapis.com) and default port
* (443) are used.
*
- Credentials are acquired automatically through Application Default Credentials.
*
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
*
For example, to set the total timeout of getAnnotation to 30 seconds:
*
*
{@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
* RapidMigrationAssessmentSettings.Builder rapidMigrationAssessmentSettingsBuilder =
* RapidMigrationAssessmentSettings.newBuilder();
* rapidMigrationAssessmentSettingsBuilder
* .getAnnotationSettings()
* .setRetrySettings(
* rapidMigrationAssessmentSettingsBuilder
* .getAnnotationSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* RapidMigrationAssessmentSettings rapidMigrationAssessmentSettings =
* rapidMigrationAssessmentSettingsBuilder.build();
* }
*/
@Generated("by gapic-generator-java")
public class RapidMigrationAssessmentSettings
extends ClientSettings {
/** Returns the object with the settings used for calls to createCollector. */
public UnaryCallSettings createCollectorSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).createCollectorSettings();
}
/** Returns the object with the settings used for calls to createCollector. */
public OperationCallSettings
createCollectorOperationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings())
.createCollectorOperationSettings();
}
/** Returns the object with the settings used for calls to createAnnotation. */
public UnaryCallSettings createAnnotationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).createAnnotationSettings();
}
/** Returns the object with the settings used for calls to createAnnotation. */
public OperationCallSettings
createAnnotationOperationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings())
.createAnnotationOperationSettings();
}
/** Returns the object with the settings used for calls to getAnnotation. */
public UnaryCallSettings getAnnotationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).getAnnotationSettings();
}
/** Returns the object with the settings used for calls to listCollectors. */
public PagedCallSettings<
ListCollectorsRequest, ListCollectorsResponse, ListCollectorsPagedResponse>
listCollectorsSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).listCollectorsSettings();
}
/** Returns the object with the settings used for calls to getCollector. */
public UnaryCallSettings getCollectorSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).getCollectorSettings();
}
/** Returns the object with the settings used for calls to updateCollector. */
public UnaryCallSettings updateCollectorSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).updateCollectorSettings();
}
/** Returns the object with the settings used for calls to updateCollector. */
public OperationCallSettings
updateCollectorOperationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings())
.updateCollectorOperationSettings();
}
/** Returns the object with the settings used for calls to deleteCollector. */
public UnaryCallSettings deleteCollectorSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).deleteCollectorSettings();
}
/** Returns the object with the settings used for calls to deleteCollector. */
public OperationCallSettings
deleteCollectorOperationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings())
.deleteCollectorOperationSettings();
}
/** Returns the object with the settings used for calls to resumeCollector. */
public UnaryCallSettings resumeCollectorSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).resumeCollectorSettings();
}
/** Returns the object with the settings used for calls to resumeCollector. */
public OperationCallSettings
resumeCollectorOperationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings())
.resumeCollectorOperationSettings();
}
/** Returns the object with the settings used for calls to registerCollector. */
public UnaryCallSettings registerCollectorSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).registerCollectorSettings();
}
/** Returns the object with the settings used for calls to registerCollector. */
public OperationCallSettings
registerCollectorOperationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings())
.registerCollectorOperationSettings();
}
/** Returns the object with the settings used for calls to pauseCollector. */
public UnaryCallSettings pauseCollectorSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).pauseCollectorSettings();
}
/** Returns the object with the settings used for calls to pauseCollector. */
public OperationCallSettings
pauseCollectorOperationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings())
.pauseCollectorOperationSettings();
}
/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings
listLocationsSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).listLocationsSettings();
}
/** Returns the object with the settings used for calls to getLocation. */
public UnaryCallSettings getLocationSettings() {
return ((RapidMigrationAssessmentStubSettings) getStubSettings()).getLocationSettings();
}
public static final RapidMigrationAssessmentSettings create(
RapidMigrationAssessmentStubSettings stub) throws IOException {
return new RapidMigrationAssessmentSettings.Builder(stub.toBuilder()).build();
}
/** Returns a builder for the default ExecutorProvider for this service. */
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
return RapidMigrationAssessmentStubSettings.defaultExecutorProviderBuilder();
}
/** Returns the default service endpoint. */
public static String getDefaultEndpoint() {
return RapidMigrationAssessmentStubSettings.getDefaultEndpoint();
}
/** Returns the default service scopes. */
public static List getDefaultServiceScopes() {
return RapidMigrationAssessmentStubSettings.getDefaultServiceScopes();
}
/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return RapidMigrationAssessmentStubSettings.defaultCredentialsProviderBuilder();
}
/** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return RapidMigrationAssessmentStubSettings.defaultGrpcTransportProviderBuilder();
}
/** Returns a builder for the default REST ChannelProvider for this service. */
@BetaApi
public static InstantiatingHttpJsonChannelProvider.Builder
defaultHttpJsonTransportProviderBuilder() {
return RapidMigrationAssessmentStubSettings.defaultHttpJsonTransportProviderBuilder();
}
public static TransportChannelProvider defaultTransportChannelProvider() {
return RapidMigrationAssessmentStubSettings.defaultTransportChannelProvider();
}
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return RapidMigrationAssessmentStubSettings.defaultApiClientHeaderProviderBuilder();
}
/** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
/** Returns a new REST builder for this class. */
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
}
/** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
protected RapidMigrationAssessmentSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
}
/** Builder for RapidMigrationAssessmentSettings. */
public static class Builder
extends ClientSettings.Builder {
protected Builder() throws IOException {
this(((ClientContext) null));
}
protected Builder(ClientContext clientContext) {
super(RapidMigrationAssessmentStubSettings.newBuilder(clientContext));
}
protected Builder(RapidMigrationAssessmentSettings settings) {
super(settings.getStubSettings().toBuilder());
}
protected Builder(RapidMigrationAssessmentStubSettings.Builder stubSettings) {
super(stubSettings);
}
private static Builder createDefault() {
return new Builder(RapidMigrationAssessmentStubSettings.newBuilder());
}
private static Builder createHttpJsonDefault() {
return new Builder(RapidMigrationAssessmentStubSettings.newHttpJsonBuilder());
}
public RapidMigrationAssessmentStubSettings.Builder getStubSettingsBuilder() {
return ((RapidMigrationAssessmentStubSettings.Builder) getStubSettings());
}
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
}
/** Returns the builder for the settings used for calls to createCollector. */
public UnaryCallSettings.Builder createCollectorSettings() {
return getStubSettingsBuilder().createCollectorSettings();
}
/** Returns the builder for the settings used for calls to createCollector. */
public OperationCallSettings.Builder
createCollectorOperationSettings() {
return getStubSettingsBuilder().createCollectorOperationSettings();
}
/** Returns the builder for the settings used for calls to createAnnotation. */
public UnaryCallSettings.Builder
createAnnotationSettings() {
return getStubSettingsBuilder().createAnnotationSettings();
}
/** Returns the builder for the settings used for calls to createAnnotation. */
public OperationCallSettings.Builder
createAnnotationOperationSettings() {
return getStubSettingsBuilder().createAnnotationOperationSettings();
}
/** Returns the builder for the settings used for calls to getAnnotation. */
public UnaryCallSettings.Builder getAnnotationSettings() {
return getStubSettingsBuilder().getAnnotationSettings();
}
/** Returns the builder for the settings used for calls to listCollectors. */
public PagedCallSettings.Builder<
ListCollectorsRequest, ListCollectorsResponse, ListCollectorsPagedResponse>
listCollectorsSettings() {
return getStubSettingsBuilder().listCollectorsSettings();
}
/** Returns the builder for the settings used for calls to getCollector. */
public UnaryCallSettings.Builder getCollectorSettings() {
return getStubSettingsBuilder().getCollectorSettings();
}
/** Returns the builder for the settings used for calls to updateCollector. */
public UnaryCallSettings.Builder updateCollectorSettings() {
return getStubSettingsBuilder().updateCollectorSettings();
}
/** Returns the builder for the settings used for calls to updateCollector. */
public OperationCallSettings.Builder
updateCollectorOperationSettings() {
return getStubSettingsBuilder().updateCollectorOperationSettings();
}
/** Returns the builder for the settings used for calls to deleteCollector. */
public UnaryCallSettings.Builder deleteCollectorSettings() {
return getStubSettingsBuilder().deleteCollectorSettings();
}
/** Returns the builder for the settings used for calls to deleteCollector. */
public OperationCallSettings.Builder
deleteCollectorOperationSettings() {
return getStubSettingsBuilder().deleteCollectorOperationSettings();
}
/** Returns the builder for the settings used for calls to resumeCollector. */
public UnaryCallSettings.Builder resumeCollectorSettings() {
return getStubSettingsBuilder().resumeCollectorSettings();
}
/** Returns the builder for the settings used for calls to resumeCollector. */
public OperationCallSettings.Builder
resumeCollectorOperationSettings() {
return getStubSettingsBuilder().resumeCollectorOperationSettings();
}
/** Returns the builder for the settings used for calls to registerCollector. */
public UnaryCallSettings.Builder
registerCollectorSettings() {
return getStubSettingsBuilder().registerCollectorSettings();
}
/** Returns the builder for the settings used for calls to registerCollector. */
public OperationCallSettings.Builder
registerCollectorOperationSettings() {
return getStubSettingsBuilder().registerCollectorOperationSettings();
}
/** Returns the builder for the settings used for calls to pauseCollector. */
public UnaryCallSettings.Builder pauseCollectorSettings() {
return getStubSettingsBuilder().pauseCollectorSettings();
}
/** Returns the builder for the settings used for calls to pauseCollector. */
public OperationCallSettings.Builder
pauseCollectorOperationSettings() {
return getStubSettingsBuilder().pauseCollectorOperationSettings();
}
/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
return getStubSettingsBuilder().listLocationsSettings();
}
/** Returns the builder for the settings used for calls to getLocation. */
public UnaryCallSettings.Builder getLocationSettings() {
return getStubSettingsBuilder().getLocationSettings();
}
@Override
public RapidMigrationAssessmentSettings build() throws IOException {
return new RapidMigrationAssessmentSettings(this);
}
}
}