Class FirestoreAdminSettings (3.30.6)

public class FirestoreAdminSettings extends ClientSettings<FirestoreAdminSettings>

Settings class to configure an instance of FirestoreAdminClient.

The default instance has everything set to sensible defaults:

  • The default service address (firestore.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 getIndex:


 // 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
 FirestoreAdminSettings.Builder firestoreAdminSettingsBuilder =
     FirestoreAdminSettings.newBuilder();
 firestoreAdminSettingsBuilder
     .getIndexSettings()
     .setRetrySettings(
         firestoreAdminSettingsBuilder
             .getIndexSettings()
             .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());
 FirestoreAdminSettings firestoreAdminSettings = firestoreAdminSettingsBuilder.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 createIndex:


 // 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
 FirestoreAdminSettings.Builder firestoreAdminSettingsBuilder =
     FirestoreAdminSettings.newBuilder();
 TimedRetryAlgorithm timedRetryAlgorithm =
     OperationalTimedPollAlgorithm.create(
         RetrySettings.newBuilder()
             .setInitialRetryDelayDuration(Duration.ofMillis(500))
             .setRetryDelayMultiplier(1.5)
             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
             .setTotalTimeoutDuration(Duration.ofHours(24))
             .build());
 firestoreAdminSettingsBuilder
     .createClusterOperationSettings()
     .setPollingAlgorithm(timedRetryAlgorithm)
     .build();
 

Inheritance

java.lang.Object > ClientSettings > FirestoreAdminSettings

Static Methods

create(FirestoreAdminStubSettings stub)

public static final FirestoreAdminSettings create(FirestoreAdminStubSettings stub)
Parameter
Name Description
stub FirestoreAdminStubSettings
Returns
Type Description
FirestoreAdminSettings
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

defaultGrpcTransportProviderBuilder()

public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()

Returns a builder for the default gRPC ChannelProvider for this service.

Returns
Type Description
Builder

defaultHttpJsonTransportProviderBuilder()

public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()

Returns a builder for the default REST 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 FirestoreAdminSettings.Builder newBuilder()

Returns a new gRPC builder for this class.

Returns
Type Description
FirestoreAdminSettings.Builder

newBuilder(ClientContext clientContext)

public static FirestoreAdminSettings.Builder newBuilder(ClientContext clientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description
FirestoreAdminSettings.Builder

newHttpJsonBuilder()

public static FirestoreAdminSettings.Builder newHttpJsonBuilder()

Returns a new REST builder for this class.

Returns
Type Description
FirestoreAdminSettings.Builder

Constructors

FirestoreAdminSettings(FirestoreAdminSettings.Builder settingsBuilder)

protected FirestoreAdminSettings(FirestoreAdminSettings.Builder settingsBuilder)
Parameter
Name Description
settingsBuilder FirestoreAdminSettings.Builder

Methods

bulkDeleteDocumentsOperationSettings()

public OperationCallSettings<BulkDeleteDocumentsRequest,BulkDeleteDocumentsResponse,BulkDeleteDocumentsMetadata> bulkDeleteDocumentsOperationSettings()

Returns the object with the settings used for calls to bulkDeleteDocuments.

bulkDeleteDocumentsSettings()

public UnaryCallSettings<BulkDeleteDocumentsRequest,Operation> bulkDeleteDocumentsSettings()

Returns the object with the settings used for calls to bulkDeleteDocuments.

createBackupScheduleSettings()

public UnaryCallSettings<CreateBackupScheduleRequest,BackupSchedule> createBackupScheduleSettings()

Returns the object with the settings used for calls to createBackupSchedule.

createDatabaseOperationSettings()

public OperationCallSettings<CreateDatabaseRequest,Database,CreateDatabaseMetadata> createDatabaseOperationSettings()

Returns the object with the settings used for calls to createDatabase.

createDatabaseSettings()

public UnaryCallSettings<CreateDatabaseRequest,Operation> createDatabaseSettings()

Returns the object with the settings used for calls to createDatabase.

createIndexOperationSettings()

public OperationCallSettings<CreateIndexRequest,Index,IndexOperationMetadata> createIndexOperationSettings()

Returns the object with the settings used for calls to createIndex.

createIndexSettings()

public UnaryCallSettings<CreateIndexRequest,Operation> createIndexSettings()

Returns the object with the settings used for calls to createIndex.

Returns
Type Description
UnaryCallSettings<CreateIndexRequest,Operation>

deleteBackupScheduleSettings()

public UnaryCallSettings<DeleteBackupScheduleRequest,Empty> deleteBackupScheduleSettings()

Returns the object with the settings used for calls to deleteBackupSchedule.

deleteBackupSettings()

public UnaryCallSettings<DeleteBackupRequest,Empty> deleteBackupSettings()

Returns the object with the settings used for calls to deleteBackup.

Returns
Type Description
UnaryCallSettings<DeleteBackupRequest,Empty>

deleteDatabaseOperationSettings()

public OperationCallSettings<DeleteDatabaseRequest,Database,DeleteDatabaseMetadata> deleteDatabaseOperationSettings()

Returns the object with the settings used for calls to deleteDatabase.

deleteDatabaseSettings()

public UnaryCallSettings<DeleteDatabaseRequest,Operation> deleteDatabaseSettings()

Returns the object with the settings used for calls to deleteDatabase.

deleteIndexSettings()

public UnaryCallSettings<DeleteIndexRequest,Empty> deleteIndexSettings()

Returns the object with the settings used for calls to deleteIndex.

Returns
Type Description
UnaryCallSettings<DeleteIndexRequest,Empty>

exportDocumentsOperationSettings()

public OperationCallSettings<ExportDocumentsRequest,ExportDocumentsResponse,ExportDocumentsMetadata> exportDocumentsOperationSettings()

Returns the object with the settings used for calls to exportDocuments.

exportDocumentsSettings()

public UnaryCallSettings<ExportDocumentsRequest,Operation> exportDocumentsSettings()

Returns the object with the settings used for calls to exportDocuments.

getBackupScheduleSettings()

public UnaryCallSettings<GetBackupScheduleRequest,BackupSchedule> getBackupScheduleSettings()

Returns the object with the settings used for calls to getBackupSchedule.

getBackupSettings()

public UnaryCallSettings<GetBackupRequest,Backup> getBackupSettings()

Returns the object with the settings used for calls to getBackup.

Returns
Type Description
UnaryCallSettings<GetBackupRequest,Backup>

getDatabaseSettings()

public UnaryCallSettings<GetDatabaseRequest,Database> getDatabaseSettings()

Returns the object with the settings used for calls to getDatabase.

Returns
Type Description
UnaryCallSettings<GetDatabaseRequest,Database>

getFieldSettings()

public UnaryCallSettings<GetFieldRequest,Field> getFieldSettings()

Returns the object with the settings used for calls to getField.

Returns
Type Description
UnaryCallSettings<GetFieldRequest,Field>

getIndexSettings()

public UnaryCallSettings<GetIndexRequest,Index> getIndexSettings()

Returns the object with the settings used for calls to getIndex.

Returns
Type Description
UnaryCallSettings<GetIndexRequest,Index>

importDocumentsOperationSettings()

public OperationCallSettings<ImportDocumentsRequest,Empty,ImportDocumentsMetadata> importDocumentsOperationSettings()

Returns the object with the settings used for calls to importDocuments.

importDocumentsSettings()

public UnaryCallSettings<ImportDocumentsRequest,Operation> importDocumentsSettings()

Returns the object with the settings used for calls to importDocuments.

listBackupSchedulesSettings()

public UnaryCallSettings<ListBackupSchedulesRequest,ListBackupSchedulesResponse> listBackupSchedulesSettings()

Returns the object with the settings used for calls to listBackupSchedules.

listBackupsSettings()

public UnaryCallSettings<ListBackupsRequest,ListBackupsResponse> listBackupsSettings()

Returns the object with the settings used for calls to listBackups.

listDatabasesSettings()

public UnaryCallSettings<ListDatabasesRequest,ListDatabasesResponse> listDatabasesSettings()

Returns the object with the settings used for calls to listDatabases.

listFieldsSettings()

public PagedCallSettings<ListFieldsRequest,ListFieldsResponse,FirestoreAdminClient.ListFieldsPagedResponse> listFieldsSettings()

Returns the object with the settings used for calls to listFields.

listIndexesSettings()

public PagedCallSettings<ListIndexesRequest,ListIndexesResponse,FirestoreAdminClient.ListIndexesPagedResponse> listIndexesSettings()

Returns the object with the settings used for calls to listIndexes.

restoreDatabaseOperationSettings()

public OperationCallSettings<RestoreDatabaseRequest,Database,RestoreDatabaseMetadata> restoreDatabaseOperationSettings()

Returns the object with the settings used for calls to restoreDatabase.

restoreDatabaseSettings()

public UnaryCallSettings<RestoreDatabaseRequest,Operation> restoreDatabaseSettings()

Returns the object with the settings used for calls to restoreDatabase.

toBuilder()

public FirestoreAdminSettings.Builder toBuilder()

Returns a builder containing all the values of this settings class.

Returns
Type Description
FirestoreAdminSettings.Builder
Overrides

updateBackupScheduleSettings()

public UnaryCallSettings<UpdateBackupScheduleRequest,BackupSchedule> updateBackupScheduleSettings()

Returns the object with the settings used for calls to updateBackupSchedule.

updateDatabaseOperationSettings()

public OperationCallSettings<UpdateDatabaseRequest,Database,UpdateDatabaseMetadata> updateDatabaseOperationSettings()

Returns the object with the settings used for calls to updateDatabase.

updateDatabaseSettings()

public UnaryCallSettings<UpdateDatabaseRequest,Operation> updateDatabaseSettings()

Returns the object with the settings used for calls to updateDatabase.

updateFieldOperationSettings()

public OperationCallSettings<UpdateFieldRequest,Field,FieldOperationMetadata> updateFieldOperationSettings()

Returns the object with the settings used for calls to updateField.

updateFieldSettings()

public UnaryCallSettings<UpdateFieldRequest,Operation> updateFieldSettings()

Returns the object with the settings used for calls to updateField.

Returns
Type Description
UnaryCallSettings<UpdateFieldRequest,Operation>