public class CloudFtpSettings extends ClientSettings<CloudFtpSettings>Settings class to configure an instance of CloudFtpClient.
The default instance has everything set to sensible defaults:
- The default service address (ftp.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 of getServer:
// 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
CloudFtpSettings.Builder cloudFtpSettingsBuilder = CloudFtpSettings.newBuilder();
cloudFtpSettingsBuilder
.getServerSettings()
.setRetrySettings(
cloudFtpSettingsBuilder
.getServerSettings()
.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());
CloudFtpSettings cloudFtpSettings = cloudFtpSettingsBuilder.build();
Please refer to the Client Side Retry Guide 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 createServer:
// 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
CloudFtpSettings.Builder cloudFtpSettingsBuilder = CloudFtpSettings.newBuilder();
TimedRetryAlgorithm timedRetryAlgorithm =
OperationalTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(500))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelayDuration(Duration.ofMillis(5000))
.setTotalTimeoutDuration(Duration.ofHours(24))
.build());
cloudFtpSettingsBuilder
.createClusterOperationSettings()
.setPollingAlgorithm(timedRetryAlgorithm)
.build();
Static Methods
create(CloudFtpStubSettings stub)
public static final CloudFtpSettings create(CloudFtpStubSettings stub)| Parameter | |
|---|---|
| Name | Description |
stub |
CloudFtpStubSettings |
| Returns | |
|---|---|
| Type | Description |
CloudFtpSettings |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
defaultApiClientHeaderProviderBuilder()
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()| Returns | |
|---|---|
| Type | Description |
Builder |
|
defaultCredentialsProviderBuilder()
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()Returns a builder for the default credentials for this service.
| Returns | |
|---|---|
| Type | Description |
Builder |
|
defaultExecutorProviderBuilder()
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()Returns a builder for the default ExecutorProvider for this service.
| Returns | |
|---|---|
| Type | Description |
Builder |
|
defaultHttpJsonTransportProviderBuilder()
public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()Returns a builder for the default ChannelProvider for this service.
| Returns | |
|---|---|
| Type | Description |
Builder |
|
defaultTransportChannelProvider()
public static TransportChannelProvider defaultTransportChannelProvider()| Returns | |
|---|---|
| Type | Description |
TransportChannelProvider |
|
getDefaultEndpoint()
public static String getDefaultEndpoint()Returns the default service endpoint.
| Returns | |
|---|---|
| Type | Description |
String |
|
getDefaultServiceScopes()
public static List<String> getDefaultServiceScopes()Returns the default service scopes.
| Returns | |
|---|---|
| Type | Description |
List<String> |
|
newBuilder()
public static CloudFtpSettings.Builder newBuilder()Returns a new builder for this class.
| Returns | |
|---|---|
| Type | Description |
CloudFtpSettings.Builder |
|
newBuilder(@Nullable ClientContext clientContext)
public static CloudFtpSettings.Builder newBuilder(@Nullable ClientContext clientContext)Returns a new builder for this class.
| Parameter | |
|---|---|
| Name | Description |
clientContext |
@org.jspecify.annotations.Nullable com.google.api.gax.rpc.ClientContext |
| Returns | |
|---|---|
| Type | Description |
CloudFtpSettings.Builder |
|
Constructors
CloudFtpSettings(CloudFtpSettings.Builder settingsBuilder)
protected CloudFtpSettings(CloudFtpSettings.Builder settingsBuilder)| Parameter | |
|---|---|
| Name | Description |
settingsBuilder |
CloudFtpSettings.Builder |
Methods
createServerOperationSettings()
public OperationCallSettings<CreateServerRequest,Server,OperationMetadata> createServerOperationSettings()Returns the object with the settings used for calls to createServer.
| Returns | |
|---|---|
| Type | Description |
OperationCallSettings<CreateServerRequest,Server,OperationMetadata> |
|
createServerSettings()
public UnaryCallSettings<CreateServerRequest,Operation> createServerSettings()Returns the object with the settings used for calls to createServer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<CreateServerRequest,Operation> |
|
createUserOperationSettings()
public OperationCallSettings<CreateUserRequest,User,OperationMetadata> createUserOperationSettings()Returns the object with the settings used for calls to createUser.
| Returns | |
|---|---|
| Type | Description |
OperationCallSettings<CreateUserRequest,User,OperationMetadata> |
|
createUserSettings()
public UnaryCallSettings<CreateUserRequest,Operation> createUserSettings()Returns the object with the settings used for calls to createUser.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<CreateUserRequest,Operation> |
|
deleteServerOperationSettings()
public OperationCallSettings<DeleteServerRequest,Empty,OperationMetadata> deleteServerOperationSettings()Returns the object with the settings used for calls to deleteServer.
| Returns | |
|---|---|
| Type | Description |
OperationCallSettings<DeleteServerRequest,Empty,OperationMetadata> |
|
deleteServerSettings()
public UnaryCallSettings<DeleteServerRequest,Operation> deleteServerSettings()Returns the object with the settings used for calls to deleteServer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<DeleteServerRequest,Operation> |
|
deleteUserOperationSettings()
public OperationCallSettings<DeleteUserRequest,Empty,OperationMetadata> deleteUserOperationSettings()Returns the object with the settings used for calls to deleteUser.
| Returns | |
|---|---|
| Type | Description |
OperationCallSettings<DeleteUserRequest,Empty,OperationMetadata> |
|
deleteUserSettings()
public UnaryCallSettings<DeleteUserRequest,Operation> deleteUserSettings()Returns the object with the settings used for calls to deleteUser.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<DeleteUserRequest,Operation> |
|
getLocationSettings()
public UnaryCallSettings<GetLocationRequest,Location> getLocationSettings()Returns the object with the settings used for calls to getLocation.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
|
getServerSettings()
public UnaryCallSettings<GetServerRequest,Server> getServerSettings()Returns the object with the settings used for calls to getServer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<GetServerRequest,Server> |
|
getUserSettings()
public UnaryCallSettings<GetUserRequest,User> getUserSettings()Returns the object with the settings used for calls to getUser.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<GetUserRequest,User> |
|
listLocationsSettings()
public PagedCallSettings<ListLocationsRequest,ListLocationsResponse,CloudFtpClient.ListLocationsPagedResponse> listLocationsSettings()Returns the object with the settings used for calls to listLocations.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse,ListLocationsPagedResponse> |
|
listServersSettings()
public PagedCallSettings<ListServersRequest,ListServersResponse,CloudFtpClient.ListServersPagedResponse> listServersSettings()Returns the object with the settings used for calls to listServers.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<ListServersRequest,ListServersResponse,ListServersPagedResponse> |
|
listUsersSettings()
public PagedCallSettings<ListUsersRequest,ListUsersResponse,CloudFtpClient.ListUsersPagedResponse> listUsersSettings()Returns the object with the settings used for calls to listUsers.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<ListUsersRequest,ListUsersResponse,ListUsersPagedResponse> |
|
startServerOperationSettings()
public OperationCallSettings<StartServerRequest,Server,OperationMetadata> startServerOperationSettings()Returns the object with the settings used for calls to startServer.
| Returns | |
|---|---|
| Type | Description |
OperationCallSettings<StartServerRequest,Server,OperationMetadata> |
|
startServerSettings()
public UnaryCallSettings<StartServerRequest,Operation> startServerSettings()Returns the object with the settings used for calls to startServer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<StartServerRequest,Operation> |
|
stopServerOperationSettings()
public OperationCallSettings<StopServerRequest,Server,OperationMetadata> stopServerOperationSettings()Returns the object with the settings used for calls to stopServer.
| Returns | |
|---|---|
| Type | Description |
OperationCallSettings<StopServerRequest,Server,OperationMetadata> |
|
stopServerSettings()
public UnaryCallSettings<StopServerRequest,Operation> stopServerSettings()Returns the object with the settings used for calls to stopServer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<StopServerRequest,Operation> |
|
toBuilder()
public CloudFtpSettings.Builder toBuilder()Returns a builder containing all the values of this settings class.
| Returns | |
|---|---|
| Type | Description |
CloudFtpSettings.Builder |
|
updateServerOperationSettings()
public OperationCallSettings<UpdateServerRequest,Server,OperationMetadata> updateServerOperationSettings()Returns the object with the settings used for calls to updateServer.
| Returns | |
|---|---|
| Type | Description |
OperationCallSettings<UpdateServerRequest,Server,OperationMetadata> |
|
updateServerSettings()
public UnaryCallSettings<UpdateServerRequest,Operation> updateServerSettings()Returns the object with the settings used for calls to updateServer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<UpdateServerRequest,Operation> |
|
updateUserOperationSettings()
public OperationCallSettings<UpdateUserRequest,User,OperationMetadata> updateUserOperationSettings()Returns the object with the settings used for calls to updateUser.
| Returns | |
|---|---|
| Type | Description |
OperationCallSettings<UpdateUserRequest,User,OperationMetadata> |
|
updateUserSettings()
public UnaryCallSettings<UpdateUserRequest,Operation> updateUserSettings()Returns the object with the settings used for calls to updateUser.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<UpdateUserRequest,Operation> |
|