This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@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
+ * try (SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create()) {
+ * SqlBackupRunsDeleteRequest request =
+ * SqlBackupRunsDeleteRequest.newBuilder()
+ * .setId(3355)
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlBackupRunsServiceClient.delete(request);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the SqlBackupRunsServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
Delete |
+ * Deletes the backup taken by a backup run. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
Get |
+ * Retrieves a resource containing information about a backup run. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
Insert |
+ * Creates a new backup run on demand. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
List |
+ * Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of SqlBackupRunsServiceSettings + * to create(). For example: + * + *
To customize credentials: + * + *
{@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
+ * SqlBackupRunsServiceSettings sqlBackupRunsServiceSettings =
+ * SqlBackupRunsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create(sqlBackupRunsServiceSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@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
+ * SqlBackupRunsServiceSettings sqlBackupRunsServiceSettings =
+ * SqlBackupRunsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create(sqlBackupRunsServiceSettings);
+ * }
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@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
+ * SqlBackupRunsServiceSettings sqlBackupRunsServiceSettings =
+ * SqlBackupRunsServiceSettings.newHttpJsonBuilder().build();
+ * SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create(sqlBackupRunsServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class SqlBackupRunsServiceClient implements BackgroundResource { + private final @Nullable SqlBackupRunsServiceSettings settings; + private final SqlBackupRunsServiceStub stub; + + /** Constructs an instance of SqlBackupRunsServiceClient with default settings. */ + public static final SqlBackupRunsServiceClient create() throws IOException { + return create(SqlBackupRunsServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of SqlBackupRunsServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final SqlBackupRunsServiceClient create(SqlBackupRunsServiceSettings settings) + throws IOException { + return new SqlBackupRunsServiceClient(settings); + } + + /** + * Constructs an instance of SqlBackupRunsServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(SqlBackupRunsServiceSettings). + */ + public static final SqlBackupRunsServiceClient create(SqlBackupRunsServiceStub stub) { + return new SqlBackupRunsServiceClient(stub); + } + + /** + * Constructs an instance of SqlBackupRunsServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected SqlBackupRunsServiceClient(SqlBackupRunsServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((SqlBackupRunsServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected SqlBackupRunsServiceClient(SqlBackupRunsServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final @Nullable SqlBackupRunsServiceSettings getSettings() { + return settings; + } + + public SqlBackupRunsServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the backup taken by a backup run. + * + *
Sample code: + * + *
{@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
+ * try (SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create()) {
+ * SqlBackupRunsDeleteRequest request =
+ * SqlBackupRunsDeleteRequest.newBuilder()
+ * .setId(3355)
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlBackupRunsServiceClient.delete(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation delete(SqlBackupRunsDeleteRequest request) {
+ return deleteCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the backup taken by a backup run.
+ *
+ * Sample code: + * + *
{@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
+ * try (SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create()) {
+ * SqlBackupRunsDeleteRequest request =
+ * SqlBackupRunsDeleteRequest.newBuilder()
+ * .setId(3355)
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture future = sqlBackupRunsServiceClient.deleteCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@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
+ * try (SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create()) {
+ * SqlBackupRunsGetRequest request =
+ * SqlBackupRunsGetRequest.newBuilder()
+ * .setId(3355)
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * BackupRun response = sqlBackupRunsServiceClient.get(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final BackupRun get(SqlBackupRunsGetRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a resource containing information about a backup run.
+ *
+ * Sample code: + * + *
{@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
+ * try (SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create()) {
+ * SqlBackupRunsGetRequest request =
+ * SqlBackupRunsGetRequest.newBuilder()
+ * .setId(3355)
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture future = sqlBackupRunsServiceClient.getCallable().futureCall(request);
+ * // Do something.
+ * BackupRun response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@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
+ * try (SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create()) {
+ * SqlBackupRunsInsertRequest request =
+ * SqlBackupRunsInsertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(BackupRun.newBuilder().build())
+ * .build();
+ * Operation response = sqlBackupRunsServiceClient.insert(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation insert(SqlBackupRunsInsertRequest request) {
+ return insertCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new backup run on demand.
+ *
+ * Sample code: + * + *
{@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
+ * try (SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create()) {
+ * SqlBackupRunsInsertRequest request =
+ * SqlBackupRunsInsertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(BackupRun.newBuilder().build())
+ * .build();
+ * ApiFuture future = sqlBackupRunsServiceClient.insertCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@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
+ * try (SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create()) {
+ * SqlBackupRunsListRequest request =
+ * SqlBackupRunsListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setMaxResults(1128457243)
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .build();
+ * BackupRunsListResponse response = sqlBackupRunsServiceClient.list(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final BackupRunsListResponse list(SqlBackupRunsListRequest request) {
+ return listCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all backup runs associated with the project or a given instance and configuration in the
+ * reverse chronological order of the backup initiation time.
+ *
+ * Sample code: + * + *
{@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
+ * try (SqlBackupRunsServiceClient sqlBackupRunsServiceClient =
+ * SqlBackupRunsServiceClient.create()) {
+ * SqlBackupRunsListRequest request =
+ * SqlBackupRunsListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setMaxResults(1128457243)
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture future =
+ * sqlBackupRunsServiceClient.listCallable().futureCall(request);
+ * // Do something.
+ * BackupRunsListResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
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 delete: + * + *
{@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
+ * SqlBackupRunsServiceSettings.Builder sqlBackupRunsServiceSettingsBuilder =
+ * SqlBackupRunsServiceSettings.newBuilder();
+ * sqlBackupRunsServiceSettingsBuilder
+ * .deleteSettings()
+ * .setRetrySettings(
+ * sqlBackupRunsServiceSettingsBuilder
+ * .deleteSettings()
+ * .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());
+ * SqlBackupRunsServiceSettings sqlBackupRunsServiceSettings =
+ * sqlBackupRunsServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlBackupRunsServiceSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction Note: close() needs to be called on the SqlBackupsServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * CreateBackup Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand backups. Request object method variants only take one parameter, a request object, which must be constructed before the call. createBackup(CreateBackupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createBackup(ProjectName parent, Backup backup)
+ * createBackup(String parent, Backup backup)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createBackupCallable()
+ * GetBackup Retrieves a resource containing information about a backup. Request object method variants only take one parameter, a request object, which must be constructed before the call. getBackup(GetBackupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getBackup(BackupName name)
+ * getBackup(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getBackupCallable()
+ * ListBackups Lists all backups associated with the project. Request object method variants only take one parameter, a request object, which must be constructed before the call. listBackups(ListBackupsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listBackups(ProjectName parent)
+ * listBackups(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listBackupsPagedCallable()
+ * listBackupsCallable()
+ * UpdateBackup Updates the retention period and description of the backup. You can use this API to update final backups only. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateBackup(UpdateBackupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. updateBackup(Backup backup, FieldMask updateMask)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateBackupCallable()
+ * DeleteBackup Deletes the backup. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteBackup(DeleteBackupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteBackup(BackupName name)
+ * deleteBackup(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteBackupCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of SqlBackupsServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlBackupsServiceClient implements BackgroundResource {
+ private final @Nullable SqlBackupsServiceSettings settings;
+ private final SqlBackupsServiceStub stub;
+
+ /** Constructs an instance of SqlBackupsServiceClient with default settings. */
+ public static final SqlBackupsServiceClient create() throws IOException {
+ return create(SqlBackupsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SqlBackupsServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final SqlBackupsServiceClient create(SqlBackupsServiceSettings settings)
+ throws IOException {
+ return new SqlBackupsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SqlBackupsServiceClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(SqlBackupsServiceSettings).
+ */
+ public static final SqlBackupsServiceClient create(SqlBackupsServiceStub stub) {
+ return new SqlBackupsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SqlBackupsServiceClient, using the given settings. This is protected
+ * so that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected SqlBackupsServiceClient(SqlBackupsServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SqlBackupsServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SqlBackupsServiceClient(SqlBackupsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable SqlBackupsServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SqlBackupsServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand
+ * backups.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 createBackup:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the SqlConnectServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * GetConnectSettings Retrieves connect settings about a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. getConnectSettings(GetConnectSettingsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getConnectSettingsCallable()
+ * ResolveConnectSettings Retrieves connect settings about a Cloud SQL instance using the instance DNS name. Request object method variants only take one parameter, a request object, which must be constructed before the call. resolveConnectSettings(ResolveConnectSettingsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. resolveConnectSettingsCallable()
+ * GenerateEphemeralCert Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database. Request object method variants only take one parameter, a request object, which must be constructed before the call. generateEphemeralCert(GenerateEphemeralCertRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. generateEphemeralCertCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of SqlConnectServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlConnectServiceClient implements BackgroundResource {
+ private final @Nullable SqlConnectServiceSettings settings;
+ private final SqlConnectServiceStub stub;
+
+ /** Constructs an instance of SqlConnectServiceClient with default settings. */
+ public static final SqlConnectServiceClient create() throws IOException {
+ return create(SqlConnectServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SqlConnectServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final SqlConnectServiceClient create(SqlConnectServiceSettings settings)
+ throws IOException {
+ return new SqlConnectServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SqlConnectServiceClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(SqlConnectServiceSettings).
+ */
+ public static final SqlConnectServiceClient create(SqlConnectServiceStub stub) {
+ return new SqlConnectServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SqlConnectServiceClient, using the given settings. This is protected
+ * so that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected SqlConnectServiceClient(SqlConnectServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SqlConnectServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SqlConnectServiceClient(SqlConnectServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable SqlConnectServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SqlConnectServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves connect settings about a Cloud SQL instance.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 getConnectSettings:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the SqlDatabasesServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * Delete Deletes a database from a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. delete(SqlDatabasesDeleteRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteCallable()
+ * Get Retrieves a resource containing information about a database inside a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(SqlDatabasesGetRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * Insert Inserts a resource containing information about a database inside a Cloud SQL instance.
+ * **Note:** You can't modify the default character set and collation. Request object method variants only take one parameter, a request object, which must be constructed before the call. insert(SqlDatabasesInsertRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. insertCallable()
+ * List Lists databases in the specified Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(SqlDatabasesListRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listCallable()
+ * Patch Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics. Request object method variants only take one parameter, a request object, which must be constructed before the call. patch(SqlDatabasesUpdateRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. patchCallable()
+ * Update Updates a resource containing information about a database inside a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. update(SqlDatabasesUpdateRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of SqlDatabasesServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlDatabasesServiceClient implements BackgroundResource {
+ private final @Nullable SqlDatabasesServiceSettings settings;
+ private final SqlDatabasesServiceStub stub;
+
+ /** Constructs an instance of SqlDatabasesServiceClient with default settings. */
+ public static final SqlDatabasesServiceClient create() throws IOException {
+ return create(SqlDatabasesServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SqlDatabasesServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final SqlDatabasesServiceClient create(SqlDatabasesServiceSettings settings)
+ throws IOException {
+ return new SqlDatabasesServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SqlDatabasesServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(SqlDatabasesServiceSettings).
+ */
+ public static final SqlDatabasesServiceClient create(SqlDatabasesServiceStub stub) {
+ return new SqlDatabasesServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SqlDatabasesServiceClient, using the given settings. This is
+ * protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected SqlDatabasesServiceClient(SqlDatabasesServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SqlDatabasesServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SqlDatabasesServiceClient(SqlDatabasesServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable SqlDatabasesServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SqlDatabasesServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a database from a Cloud SQL instance.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * **Note:** You can't modify the default character set and collation.
+ *
+ * Sample code:
+ *
+ * **Note:** You can't modify the default character set and collation.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 delete:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the SqlFlagsServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * List Lists all available database flags for Cloud SQL instances. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(SqlFlagsListRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of SqlFlagsServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlFlagsServiceClient implements BackgroundResource {
+ private final @Nullable SqlFlagsServiceSettings settings;
+ private final SqlFlagsServiceStub stub;
+
+ /** Constructs an instance of SqlFlagsServiceClient with default settings. */
+ public static final SqlFlagsServiceClient create() throws IOException {
+ return create(SqlFlagsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SqlFlagsServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final SqlFlagsServiceClient create(SqlFlagsServiceSettings settings)
+ throws IOException {
+ return new SqlFlagsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SqlFlagsServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(SqlFlagsServiceSettings).
+ */
+ public static final SqlFlagsServiceClient create(SqlFlagsServiceStub stub) {
+ return new SqlFlagsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SqlFlagsServiceClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected SqlFlagsServiceClient(SqlFlagsServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SqlFlagsServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SqlFlagsServiceClient(SqlFlagsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable SqlFlagsServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SqlFlagsServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all available database flags for Cloud SQL instances.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 list:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction Note: close() needs to be called on the SqlInstancesServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * AddServerCa Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. For instances that have enabled Certificate Authority Service (CAS) based server CA, use AddServerCertificate to add a new server certificate. Request object method variants only take one parameter, a request object, which must be constructed before the call. addServerCa(SqlInstancesAddServerCaRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. addServerCaCallable()
+ * AddServerCertificate Add a new trusted server certificate version for the specified instance using Certificate Authority Service (CAS) server CA. Required to prepare for a certificate rotation. If a server certificate version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one certificate version waiting to be rotated in. For instances not using CAS server CA, use AddServerCa instead. Request object method variants only take one parameter, a request object, which must be constructed before the call. addServerCertificate(SqlInstancesAddServerCertificateRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. addServerCertificateCallable()
+ * AddEntraIdCertificate Adds a new Entra ID certificate for the specified instance. If an Entra ID certificate was previously added but never used in a certificate rotation, this operation replaces that version. Request object method variants only take one parameter, a request object, which must be constructed before the call. addEntraIdCertificate(SqlInstancesAddEntraIdCertificateRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. addEntraIdCertificateCallable()
+ * Clone Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. Request object method variants only take one parameter, a request object, which must be constructed before the call. clone(SqlInstancesCloneRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. cloneCallable()
+ * Delete Deletes a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. delete(SqlInstancesDeleteRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteCallable()
+ * DemoteMaster Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. Request object method variants only take one parameter, a request object, which must be constructed before the call. demoteMaster(SqlInstancesDemoteMasterRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. demoteMasterCallable()
+ * Demote Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server. Request object method variants only take one parameter, a request object, which must be constructed before the call. demote(SqlInstancesDemoteRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. demoteCallable()
+ * Export Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. Request object method variants only take one parameter, a request object, which must be constructed before the call. export(SqlInstancesExportRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. exportCallable()
+ * Failover Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the [Overview of high availability](https://cloud.google.com/sql/docs/mysql/high-availability) page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. failover(SqlInstancesFailoverRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. failoverCallable()
+ * Reencrypt Reencrypt CMEK instance with latest key version. Request object method variants only take one parameter, a request object, which must be constructed before the call. reencrypt(SqlInstancesReencryptRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. reencryptCallable()
+ * Get Retrieves a resource containing information about a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(SqlInstancesGetRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * Import Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. Request object method variants only take one parameter, a request object, which must be constructed before the call. import_(SqlInstancesImportRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. import_Callable()
+ * Insert Creates a new Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. insert(SqlInstancesInsertRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. insertCallable()
+ * List Lists instances under a given project. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(SqlInstancesListRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listCallable()
+ * ListServerCas Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out. Request object method variants only take one parameter, a request object, which must be constructed before the call. listServerCas(SqlInstancesListServerCasRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listServerCasCallable()
+ * ListServerCertificates Lists all versions of server certificates and certificate authorities (CAs) for the specified instance. There can be up to three sets of certs listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out. For instances not using Certificate Authority Service (CAS) server CA, use ListServerCas instead. Request object method variants only take one parameter, a request object, which must be constructed before the call. listServerCertificates(SqlInstancesListServerCertificatesRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listServerCertificatesCallable()
+ * ListEntraIdCertificates Lists all versions of EntraID certificates for the specified instance. There can be up to three sets of certificates listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out. Request object method variants only take one parameter, a request object, which must be constructed before the call. listEntraIdCertificates(SqlInstancesListEntraIdCertificatesRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listEntraIdCertificatesCallable()
+ * Patch Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics. Request object method variants only take one parameter, a request object, which must be constructed before the call. patch(SqlInstancesPatchRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. patchCallable()
+ * PromoteReplica Promotes the read replica instance to be an independent Cloud SQL primary instance. Using this operation might cause your instance to restart. Request object method variants only take one parameter, a request object, which must be constructed before the call. promoteReplica(SqlInstancesPromoteReplicaRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. promoteReplicaCallable()
+ * Switchover Switches over from the primary instance to the DR replica instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. switchover(SqlInstancesSwitchoverRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. switchoverCallable()
+ * ResetSslConfig Deletes all client certificates and generates a new server SSL certificate for the instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. resetSslConfig(SqlInstancesResetSslConfigRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. resetSslConfigCallable()
+ * Restart Restarts a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. restart(SqlInstancesRestartRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. restartCallable()
+ * RestoreBackup Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. Request object method variants only take one parameter, a request object, which must be constructed before the call. restoreBackup(SqlInstancesRestoreBackupRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. restoreBackupCallable()
+ * RotateServerCa Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. For instances that have enabled Certificate Authority Service (CAS) based server CA, use RotateServerCertificate to rotate the server certificate. Request object method variants only take one parameter, a request object, which must be constructed before the call. rotateServerCa(SqlInstancesRotateServerCaRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. rotateServerCaCallable()
+ * RotateServerCertificate Rotates the server certificate version to one previously added with the addServerCertificate method. For instances not using Certificate Authority Service (CAS) server CA, use RotateServerCa instead. Request object method variants only take one parameter, a request object, which must be constructed before the call. rotateServerCertificate(SqlInstancesRotateServerCertificateRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. rotateServerCertificateCallable()
+ * RotateEntraIdCertificate Rotates the server certificate version to one previously added with the addEntraIdCertificate method. Request object method variants only take one parameter, a request object, which must be constructed before the call. rotateEntraIdCertificate(SqlInstancesRotateEntraIdCertificateRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. rotateEntraIdCertificateCallable()
+ * StartReplica Starts the replication in the read replica instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. startReplica(SqlInstancesStartReplicaRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. startReplicaCallable()
+ * StopReplica Stops the replication in the read replica instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. stopReplica(SqlInstancesStopReplicaRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. stopReplicaCallable()
+ * TruncateLog Truncate MySQL general and slow query log tables MySQL only. Request object method variants only take one parameter, a request object, which must be constructed before the call. truncateLog(SqlInstancesTruncateLogRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. truncateLogCallable()
+ * Update Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. Request object method variants only take one parameter, a request object, which must be constructed before the call. update(SqlInstancesUpdateRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateCallable()
+ * CreateEphemeral Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database. Request object method variants only take one parameter, a request object, which must be constructed before the call. createEphemeral(SqlInstancesCreateEphemeralCertRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createEphemeralCallable()
+ * RescheduleMaintenance Reschedules the maintenance on the given instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. rescheduleMaintenance(SqlInstancesRescheduleMaintenanceRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. rescheduleMaintenanceCallable()
+ * VerifyExternalSyncSettings Verify External primary instance external sync settings. Request object method variants only take one parameter, a request object, which must be constructed before the call. verifyExternalSyncSettings(SqlInstancesVerifyExternalSyncSettingsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. verifyExternalSyncSettingsCallable()
+ * StartExternalSync Start External primary instance migration. Request object method variants only take one parameter, a request object, which must be constructed before the call. startExternalSync(SqlInstancesStartExternalSyncRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. startExternalSyncCallable()
+ * PerformDiskShrink Perform Disk Shrink on primary instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. performDiskShrink(SqlInstancesPerformDiskShrinkRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. performDiskShrinkCallable()
+ * GetDiskShrinkConfig Get Disk Shrink Config for a given instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. getDiskShrinkConfig(SqlInstancesGetDiskShrinkConfigRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getDiskShrinkConfigCallable()
+ * ResetReplicaSize Reset Replica Size to primary instance disk size. Request object method variants only take one parameter, a request object, which must be constructed before the call. resetReplicaSize(SqlInstancesResetReplicaSizeRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. resetReplicaSizeCallable()
+ * GetLatestRecoveryTime Get Latest Recovery Time for a given instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLatestRecoveryTime(SqlInstancesGetLatestRecoveryTimeRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLatestRecoveryTimeCallable()
+ * ExecuteSql Execute SQL statements. Request object method variants only take one parameter, a request object, which must be constructed before the call. executeSql(SqlInstancesExecuteSqlRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. executeSqlCallable()
+ * AcquireSsrsLease Acquire a lease for the setup of SQL Server Reporting Services (SSRS). Request object method variants only take one parameter, a request object, which must be constructed before the call. acquireSsrsLease(SqlInstancesAcquireSsrsLeaseRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. acquireSsrsLeaseCallable()
+ * ReleaseSsrsLease Release a lease for the setup of SQL Server Reporting Services (SSRS). Request object method variants only take one parameter, a request object, which must be constructed before the call. releaseSsrsLease(SqlInstancesReleaseSsrsLeaseRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. releaseSsrsLeaseCallable()
+ * PreCheckMajorVersionUpgrade Execute MVU Pre-checks Request object method variants only take one parameter, a request object, which must be constructed before the call. preCheckMajorVersionUpgrade(SqlInstancesPreCheckMajorVersionUpgradeRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. preCheckMajorVersionUpgradeCallable()
+ * PointInTimeRestore Point in time restore for an instance managed by Google Cloud Backup and Disaster Recovery. Request object method variants only take one parameter, a request object, which must be constructed before the call. pointInTimeRestore(SqlInstancesPointInTimeRestoreRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. pointInTimeRestoreCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of SqlInstancesServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlInstancesServiceClient implements BackgroundResource {
+ private final @Nullable SqlInstancesServiceSettings settings;
+ private final SqlInstancesServiceStub stub;
+
+ /** Constructs an instance of SqlInstancesServiceClient with default settings. */
+ public static final SqlInstancesServiceClient create() throws IOException {
+ return create(SqlInstancesServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SqlInstancesServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final SqlInstancesServiceClient create(SqlInstancesServiceSettings settings)
+ throws IOException {
+ return new SqlInstancesServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SqlInstancesServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(SqlInstancesServiceSettings).
+ */
+ public static final SqlInstancesServiceClient create(SqlInstancesServiceStub stub) {
+ return new SqlInstancesServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SqlInstancesServiceClient, using the given settings. This is
+ * protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected SqlInstancesServiceClient(SqlInstancesServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SqlInstancesServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SqlInstancesServiceClient(SqlInstancesServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable SqlInstancesServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SqlInstancesServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to
+ * prepare for a certificate rotation. If a CA version was previously added but never used in a
+ * certificate rotation, this operation replaces that version. There cannot be more than one CA
+ * version waiting to be rotated in. For instances that have enabled Certificate Authority Service
+ * (CAS) based server CA, use AddServerCertificate to add a new server certificate.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 addServerCa:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the SqlOperationsServiceClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * Get Retrieves an instance operation that has been performed on an instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(SqlOperationsGetRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * List Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(SqlOperationsListRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listCallable()
+ * Cancel Cancels an instance operation that has been performed on an instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. cancel(SqlOperationsCancelRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. cancelCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of SqlOperationsServiceSettings
+ * to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlOperationsServiceClient implements BackgroundResource {
+ private final @Nullable SqlOperationsServiceSettings settings;
+ private final SqlOperationsServiceStub stub;
+
+ /** Constructs an instance of SqlOperationsServiceClient with default settings. */
+ public static final SqlOperationsServiceClient create() throws IOException {
+ return create(SqlOperationsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SqlOperationsServiceClient, using the given settings. The channels
+ * are created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final SqlOperationsServiceClient create(SqlOperationsServiceSettings settings)
+ throws IOException {
+ return new SqlOperationsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SqlOperationsServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(SqlOperationsServiceSettings).
+ */
+ public static final SqlOperationsServiceClient create(SqlOperationsServiceStub stub) {
+ return new SqlOperationsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SqlOperationsServiceClient, using the given settings. This is
+ * protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected SqlOperationsServiceClient(SqlOperationsServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SqlOperationsServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SqlOperationsServiceClient(SqlOperationsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable SqlOperationsServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SqlOperationsServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves an instance operation that has been performed on an instance.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 get:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the SqlSslCertsServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * Delete Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted. Request object method variants only take one parameter, a request object, which must be constructed before the call. delete(SqlSslCertsDeleteRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteCallable()
+ * Get Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(SqlSslCertsGetRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * Insert Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted. Request object method variants only take one parameter, a request object, which must be constructed before the call. insert(SqlSslCertsInsertRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. insertCallable()
+ * List Lists all of the current SSL certificates for the instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(SqlSslCertsListRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of SqlSslCertsServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlSslCertsServiceClient implements BackgroundResource {
+ private final @Nullable SqlSslCertsServiceSettings settings;
+ private final SqlSslCertsServiceStub stub;
+
+ /** Constructs an instance of SqlSslCertsServiceClient with default settings. */
+ public static final SqlSslCertsServiceClient create() throws IOException {
+ return create(SqlSslCertsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SqlSslCertsServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final SqlSslCertsServiceClient create(SqlSslCertsServiceSettings settings)
+ throws IOException {
+ return new SqlSslCertsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SqlSslCertsServiceClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(SqlSslCertsServiceSettings).
+ */
+ public static final SqlSslCertsServiceClient create(SqlSslCertsServiceStub stub) {
+ return new SqlSslCertsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SqlSslCertsServiceClient, using the given settings. This is protected
+ * so that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected SqlSslCertsServiceClient(SqlSslCertsServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SqlSslCertsServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SqlSslCertsServiceClient(SqlSslCertsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable SqlSslCertsServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SqlSslCertsServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the SSL certificate. For First Generation instances, the certificate remains valid
+ * until the instance is restarted.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 delete:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the SqlTiersServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * List Lists all available machine types (tiers) for Cloud SQL, for example, `db-custom-1-3840`. For more information, see https://cloud.google.com/sql/pricing. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(SqlTiersListRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of SqlTiersServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlTiersServiceClient implements BackgroundResource {
+ private final @Nullable SqlTiersServiceSettings settings;
+ private final SqlTiersServiceStub stub;
+
+ /** Constructs an instance of SqlTiersServiceClient with default settings. */
+ public static final SqlTiersServiceClient create() throws IOException {
+ return create(SqlTiersServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SqlTiersServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final SqlTiersServiceClient create(SqlTiersServiceSettings settings)
+ throws IOException {
+ return new SqlTiersServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SqlTiersServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(SqlTiersServiceSettings).
+ */
+ public static final SqlTiersServiceClient create(SqlTiersServiceStub stub) {
+ return new SqlTiersServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SqlTiersServiceClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected SqlTiersServiceClient(SqlTiersServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SqlTiersServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SqlTiersServiceClient(SqlTiersServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable SqlTiersServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SqlTiersServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all available machine types (tiers) for Cloud SQL, for example, `db-custom-1-3840`. For
+ * more information, see https://cloud.google.com/sql/pricing.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 list:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the SqlUsersServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * Delete Deletes a user from a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. delete(SqlUsersDeleteRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteCallable()
+ * Get Retrieves a resource containing information about a user. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(SqlUsersGetRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * Insert Creates a new user in a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. insert(SqlUsersInsertRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. insertCallable()
+ * List Lists users in the specified Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(SqlUsersListRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listCallable()
+ * Update Updates an existing user in a Cloud SQL instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. update(SqlUsersUpdateRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of SqlUsersServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlUsersServiceClient implements BackgroundResource {
+ private final @Nullable SqlUsersServiceSettings settings;
+ private final SqlUsersServiceStub stub;
+
+ /** Constructs an instance of SqlUsersServiceClient with default settings. */
+ public static final SqlUsersServiceClient create() throws IOException {
+ return create(SqlUsersServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SqlUsersServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final SqlUsersServiceClient create(SqlUsersServiceSettings settings)
+ throws IOException {
+ return new SqlUsersServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SqlUsersServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(SqlUsersServiceSettings).
+ */
+ public static final SqlUsersServiceClient create(SqlUsersServiceStub stub) {
+ return new SqlUsersServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SqlUsersServiceClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected SqlUsersServiceClient(SqlUsersServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SqlUsersServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SqlUsersServiceClient(SqlUsersServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable SqlUsersServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SqlUsersServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user from a Cloud SQL instance.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 delete:
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Backup backup = Backup.newBuilder().build();
+ * Operation response = sqlBackupsServiceClient.createBackup(parent, backup);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SqlBackupsServiceSettings sqlBackupsServiceSettings =
+ * SqlBackupsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlBackupsServiceClient sqlBackupsServiceClient =
+ * SqlBackupsServiceClient.create(sqlBackupsServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlBackupsServiceSettings sqlBackupsServiceSettings =
+ * SqlBackupsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlBackupsServiceClient sqlBackupsServiceClient =
+ * SqlBackupsServiceClient.create(sqlBackupsServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlBackupsServiceSettings sqlBackupsServiceSettings =
+ * SqlBackupsServiceSettings.newHttpJsonBuilder().build();
+ * SqlBackupsServiceClient sqlBackupsServiceClient =
+ * SqlBackupsServiceClient.create(sqlBackupsServiceSettings);
+ * }
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Backup backup = Backup.newBuilder().build();
+ * Operation response = sqlBackupsServiceClient.createBackup(parent, backup);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this backup is created. Format:
+ * projects/{project}
+ * @param backup Required. The Backup to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation createBackup(@Nullable ProjectName parent, Backup backup) {
+ CreateBackupRequest request =
+ CreateBackupRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setBackup(backup)
+ .build();
+ return createBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand
+ * backups.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * Backup backup = Backup.newBuilder().build();
+ * Operation response = sqlBackupsServiceClient.createBackup(parent, backup);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this backup is created. Format:
+ * projects/{project}
+ * @param backup Required. The Backup to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation createBackup(String parent, Backup backup) {
+ CreateBackupRequest request =
+ CreateBackupRequest.newBuilder().setParent(parent).setBackup(backup).build();
+ return createBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand
+ * backups.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setBackup(Backup.newBuilder().build())
+ * .build();
+ * Operation response = sqlBackupsServiceClient.createBackup(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation createBackup(CreateBackupRequest request) {
+ return createBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand
+ * backups.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setBackup(Backup.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * BackupName name = BackupName.of("[PROJECT]", "[BACKUP]");
+ * Backup response = sqlBackupsServiceClient.getBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the backup to retrieve. Format:
+ * projects/{project}/backups/{backup}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup getBackup(@Nullable BackupName name) {
+ GetBackupRequest request =
+ GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a resource containing information about a backup.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[BACKUP]").toString();
+ * Backup response = sqlBackupsServiceClient.getBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the backup to retrieve. Format:
+ * projects/{project}/backups/{backup}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup getBackup(String name) {
+ GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build();
+ return getBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a resource containing information about a backup.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[BACKUP]").toString())
+ * .build();
+ * Backup response = sqlBackupsServiceClient.getBackup(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup getBackup(GetBackupRequest request) {
+ return getBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a resource containing information about a backup.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[BACKUP]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (Backup element : sqlBackupsServiceClient.listBackups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent that owns this collection of backups. Format:
+ * projects/{project}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsPagedResponse listBackups(@Nullable ProjectName parent) {
+ ListBackupsRequest request =
+ ListBackupsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listBackups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all backups associated with the project.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * for (Backup element : sqlBackupsServiceClient.listBackups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent that owns this collection of backups. Format:
+ * projects/{project}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsPagedResponse listBackups(String parent) {
+ ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build();
+ return listBackups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all backups associated with the project.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Backup element : sqlBackupsServiceClient.listBackups(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
+ return listBackupsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all backups associated with the project.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListBackupsResponse response = sqlBackupsServiceClient.listBackupsCallable().call(request);
+ * for (Backup element : response.getBackupsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * Backup backup = Backup.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Operation response = sqlBackupsServiceClient.updateBackup(backup, updateMask);
+ * }
+ * }
+ *
+ * @param backup Required. The backup to update. The backup’s `name` field is used to identify the
+ * backup to update. Format: projects/{project}/backups/{backup}
+ * @param updateMask The list of fields that you can update. You can update only the description
+ * and retention period of the final backup.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation updateBackup(Backup backup, FieldMask updateMask) {
+ UpdateBackupRequest request =
+ UpdateBackupRequest.newBuilder().setBackup(backup).setUpdateMask(updateMask).build();
+ return updateBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the retention period and description of the backup. You can use this API to update
+ * final backups only.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * UpdateBackupRequest request =
+ * UpdateBackupRequest.newBuilder()
+ * .setBackup(Backup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Operation response = sqlBackupsServiceClient.updateBackup(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation updateBackup(UpdateBackupRequest request) {
+ return updateBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the retention period and description of the backup. You can use this API to update
+ * final backups only.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * UpdateBackupRequest request =
+ * UpdateBackupRequest.newBuilder()
+ * .setBackup(Backup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * BackupName name = BackupName.of("[PROJECT]", "[BACKUP]");
+ * Operation response = sqlBackupsServiceClient.deleteBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the backup to delete. Format:
+ * projects/{project}/backups/{backup}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation deleteBackup(@Nullable BackupName name) {
+ DeleteBackupRequest request =
+ DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the backup.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[BACKUP]").toString();
+ * Operation response = sqlBackupsServiceClient.deleteBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the backup to delete. Format:
+ * projects/{project}/backups/{backup}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation deleteBackup(String name) {
+ DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build();
+ return deleteBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the backup.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[BACKUP]").toString())
+ * .build();
+ * Operation response = sqlBackupsServiceClient.deleteBackup(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation deleteBackup(DeleteBackupRequest request) {
+ return deleteBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the backup.
+ *
+ * {@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
+ * try (SqlBackupsServiceClient sqlBackupsServiceClient = SqlBackupsServiceClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[BACKUP]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * SqlBackupsServiceSettings.Builder sqlBackupsServiceSettingsBuilder =
+ * SqlBackupsServiceSettings.newBuilder();
+ * sqlBackupsServiceSettingsBuilder
+ * .createBackupSettings()
+ * .setRetrySettings(
+ * sqlBackupsServiceSettingsBuilder
+ * .createBackupSettings()
+ * .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());
+ * SqlBackupsServiceSettings sqlBackupsServiceSettings = sqlBackupsServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlBackupsServiceSettings extends ClientSettings{@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
+ * try (SqlConnectServiceClient sqlConnectServiceClient = SqlConnectServiceClient.create()) {
+ * GetConnectSettingsRequest request =
+ * GetConnectSettingsRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setReadTime(Timestamp.newBuilder().build())
+ * .build();
+ * ConnectSettings response = sqlConnectServiceClient.getConnectSettings(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SqlConnectServiceSettings sqlConnectServiceSettings =
+ * SqlConnectServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlConnectServiceClient sqlConnectServiceClient =
+ * SqlConnectServiceClient.create(sqlConnectServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlConnectServiceSettings sqlConnectServiceSettings =
+ * SqlConnectServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlConnectServiceClient sqlConnectServiceClient =
+ * SqlConnectServiceClient.create(sqlConnectServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlConnectServiceSettings sqlConnectServiceSettings =
+ * SqlConnectServiceSettings.newHttpJsonBuilder().build();
+ * SqlConnectServiceClient sqlConnectServiceClient =
+ * SqlConnectServiceClient.create(sqlConnectServiceSettings);
+ * }
+ *
+ * {@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
+ * try (SqlConnectServiceClient sqlConnectServiceClient = SqlConnectServiceClient.create()) {
+ * GetConnectSettingsRequest request =
+ * GetConnectSettingsRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setReadTime(Timestamp.newBuilder().build())
+ * .build();
+ * ConnectSettings response = sqlConnectServiceClient.getConnectSettings(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ConnectSettings getConnectSettings(GetConnectSettingsRequest request) {
+ return getConnectSettingsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves connect settings about a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlConnectServiceClient sqlConnectServiceClient = SqlConnectServiceClient.create()) {
+ * GetConnectSettingsRequest request =
+ * GetConnectSettingsRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setReadTime(Timestamp.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlConnectServiceClient sqlConnectServiceClient = SqlConnectServiceClient.create()) {
+ * ResolveConnectSettingsRequest request =
+ * ResolveConnectSettingsRequest.newBuilder()
+ * .setDnsName("dnsName1813886804")
+ * .setLocation("location1901043637")
+ * .build();
+ * ConnectSettings response = sqlConnectServiceClient.resolveConnectSettings(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ConnectSettings resolveConnectSettings(ResolveConnectSettingsRequest request) {
+ return resolveConnectSettingsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves connect settings about a Cloud SQL instance using the instance DNS name.
+ *
+ * {@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
+ * try (SqlConnectServiceClient sqlConnectServiceClient = SqlConnectServiceClient.create()) {
+ * ResolveConnectSettingsRequest request =
+ * ResolveConnectSettingsRequest.newBuilder()
+ * .setDnsName("dnsName1813886804")
+ * .setLocation("location1901043637")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlConnectServiceClient sqlConnectServiceClient = SqlConnectServiceClient.create()) {
+ * GenerateEphemeralCertRequest request =
+ * GenerateEphemeralCertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setPublicKey("publicKey1446899510")
+ * .setAccessToken("accessToken-1042689291")
+ * .setReadTime(Timestamp.newBuilder().build())
+ * .setValidDuration(Duration.newBuilder().build())
+ * .build();
+ * GenerateEphemeralCertResponse response =
+ * sqlConnectServiceClient.generateEphemeralCert(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateEphemeralCertResponse generateEphemeralCert(
+ GenerateEphemeralCertRequest request) {
+ return generateEphemeralCertCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates a short-lived X509 certificate containing the provided public key and signed by a
+ * private key specific to the target instance. Users may use the certificate to authenticate as
+ * themselves when connecting to the database.
+ *
+ * {@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
+ * try (SqlConnectServiceClient sqlConnectServiceClient = SqlConnectServiceClient.create()) {
+ * GenerateEphemeralCertRequest request =
+ * GenerateEphemeralCertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setPublicKey("publicKey1446899510")
+ * .setAccessToken("accessToken-1042689291")
+ * .setReadTime(Timestamp.newBuilder().build())
+ * .setValidDuration(Duration.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * SqlConnectServiceSettings.Builder sqlConnectServiceSettingsBuilder =
+ * SqlConnectServiceSettings.newBuilder();
+ * sqlConnectServiceSettingsBuilder
+ * .getConnectSettingsSettings()
+ * .setRetrySettings(
+ * sqlConnectServiceSettingsBuilder
+ * .getConnectSettingsSettings()
+ * .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());
+ * SqlConnectServiceSettings sqlConnectServiceSettings = sqlConnectServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlConnectServiceSettings extends ClientSettings{@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesDeleteRequest request =
+ * SqlDatabasesDeleteRequest.newBuilder()
+ * .setDatabase("database1789464955")
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlDatabasesServiceClient.delete(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SqlDatabasesServiceSettings sqlDatabasesServiceSettings =
+ * SqlDatabasesServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlDatabasesServiceClient sqlDatabasesServiceClient =
+ * SqlDatabasesServiceClient.create(sqlDatabasesServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlDatabasesServiceSettings sqlDatabasesServiceSettings =
+ * SqlDatabasesServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlDatabasesServiceClient sqlDatabasesServiceClient =
+ * SqlDatabasesServiceClient.create(sqlDatabasesServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlDatabasesServiceSettings sqlDatabasesServiceSettings =
+ * SqlDatabasesServiceSettings.newHttpJsonBuilder().build();
+ * SqlDatabasesServiceClient sqlDatabasesServiceClient =
+ * SqlDatabasesServiceClient.create(sqlDatabasesServiceSettings);
+ * }
+ *
+ * {@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesDeleteRequest request =
+ * SqlDatabasesDeleteRequest.newBuilder()
+ * .setDatabase("database1789464955")
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlDatabasesServiceClient.delete(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation delete(SqlDatabasesDeleteRequest request) {
+ return deleteCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a database from a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesDeleteRequest request =
+ * SqlDatabasesDeleteRequest.newBuilder()
+ * .setDatabase("database1789464955")
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesGetRequest request =
+ * SqlDatabasesGetRequest.newBuilder()
+ * .setDatabase("database1789464955")
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Database response = sqlDatabasesServiceClient.get(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Database get(SqlDatabasesGetRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a resource containing information about a database inside a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesGetRequest request =
+ * SqlDatabasesGetRequest.newBuilder()
+ * .setDatabase("database1789464955")
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesInsertRequest request =
+ * SqlDatabasesInsertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(Database.newBuilder().build())
+ * .build();
+ * Operation response = sqlDatabasesServiceClient.insert(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation insert(SqlDatabasesInsertRequest request) {
+ return insertCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Inserts a resource containing information about a database inside a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesInsertRequest request =
+ * SqlDatabasesInsertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(Database.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesListRequest request =
+ * SqlDatabasesListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * DatabasesListResponse response = sqlDatabasesServiceClient.list(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DatabasesListResponse list(SqlDatabasesListRequest request) {
+ return listCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists databases in the specified Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesListRequest request =
+ * SqlDatabasesListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesUpdateRequest request =
+ * SqlDatabasesUpdateRequest.newBuilder()
+ * .setDatabase("database1789464955")
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(Database.newBuilder().build())
+ * .build();
+ * Operation response = sqlDatabasesServiceClient.patch(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation patch(SqlDatabasesUpdateRequest request) {
+ return patchCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Partially updates a resource containing information about a database inside a Cloud SQL
+ * instance. This method supports patch semantics.
+ *
+ * {@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesUpdateRequest request =
+ * SqlDatabasesUpdateRequest.newBuilder()
+ * .setDatabase("database1789464955")
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(Database.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesUpdateRequest request =
+ * SqlDatabasesUpdateRequest.newBuilder()
+ * .setDatabase("database1789464955")
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(Database.newBuilder().build())
+ * .build();
+ * Operation response = sqlDatabasesServiceClient.update(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation update(SqlDatabasesUpdateRequest request) {
+ return updateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a resource containing information about a database inside a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlDatabasesServiceClient sqlDatabasesServiceClient = SqlDatabasesServiceClient.create()) {
+ * SqlDatabasesUpdateRequest request =
+ * SqlDatabasesUpdateRequest.newBuilder()
+ * .setDatabase("database1789464955")
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(Database.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * SqlDatabasesServiceSettings.Builder sqlDatabasesServiceSettingsBuilder =
+ * SqlDatabasesServiceSettings.newBuilder();
+ * sqlDatabasesServiceSettingsBuilder
+ * .deleteSettings()
+ * .setRetrySettings(
+ * sqlDatabasesServiceSettingsBuilder
+ * .deleteSettings()
+ * .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());
+ * SqlDatabasesServiceSettings sqlDatabasesServiceSettings =
+ * sqlDatabasesServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlDatabasesServiceSettings extends ClientSettings{@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
+ * try (SqlFlagsServiceClient sqlFlagsServiceClient = SqlFlagsServiceClient.create()) {
+ * SqlFlagsListRequest request =
+ * SqlFlagsListRequest.newBuilder()
+ * .setDatabaseVersion("databaseVersion1250955997")
+ * .setFlagScope(SqlFlagScope.forNumber(0))
+ * .build();
+ * FlagsListResponse response = sqlFlagsServiceClient.list(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SqlFlagsServiceSettings sqlFlagsServiceSettings =
+ * SqlFlagsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlFlagsServiceClient sqlFlagsServiceClient =
+ * SqlFlagsServiceClient.create(sqlFlagsServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlFlagsServiceSettings sqlFlagsServiceSettings =
+ * SqlFlagsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlFlagsServiceClient sqlFlagsServiceClient =
+ * SqlFlagsServiceClient.create(sqlFlagsServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlFlagsServiceSettings sqlFlagsServiceSettings =
+ * SqlFlagsServiceSettings.newHttpJsonBuilder().build();
+ * SqlFlagsServiceClient sqlFlagsServiceClient =
+ * SqlFlagsServiceClient.create(sqlFlagsServiceSettings);
+ * }
+ *
+ * {@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
+ * try (SqlFlagsServiceClient sqlFlagsServiceClient = SqlFlagsServiceClient.create()) {
+ * SqlFlagsListRequest request =
+ * SqlFlagsListRequest.newBuilder()
+ * .setDatabaseVersion("databaseVersion1250955997")
+ * .setFlagScope(SqlFlagScope.forNumber(0))
+ * .build();
+ * FlagsListResponse response = sqlFlagsServiceClient.list(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final FlagsListResponse list(SqlFlagsListRequest request) {
+ return listCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all available database flags for Cloud SQL instances.
+ *
+ * {@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
+ * try (SqlFlagsServiceClient sqlFlagsServiceClient = SqlFlagsServiceClient.create()) {
+ * SqlFlagsListRequest request =
+ * SqlFlagsListRequest.newBuilder()
+ * .setDatabaseVersion("databaseVersion1250955997")
+ * .setFlagScope(SqlFlagScope.forNumber(0))
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * SqlFlagsServiceSettings.Builder sqlFlagsServiceSettingsBuilder =
+ * SqlFlagsServiceSettings.newBuilder();
+ * sqlFlagsServiceSettingsBuilder
+ * .listSettings()
+ * .setRetrySettings(
+ * sqlFlagsServiceSettingsBuilder
+ * .listSettings()
+ * .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());
+ * SqlFlagsServiceSettings sqlFlagsServiceSettings = sqlFlagsServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlFlagsServiceSettings extends ClientSettings{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesAddServerCaRequest request =
+ * SqlInstancesAddServerCaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.addServerCa(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SqlInstancesServiceSettings sqlInstancesServiceSettings =
+ * SqlInstancesServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlInstancesServiceClient sqlInstancesServiceClient =
+ * SqlInstancesServiceClient.create(sqlInstancesServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlInstancesServiceSettings sqlInstancesServiceSettings =
+ * SqlInstancesServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlInstancesServiceClient sqlInstancesServiceClient =
+ * SqlInstancesServiceClient.create(sqlInstancesServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlInstancesServiceSettings sqlInstancesServiceSettings =
+ * SqlInstancesServiceSettings.newHttpJsonBuilder().build();
+ * SqlInstancesServiceClient sqlInstancesServiceClient =
+ * SqlInstancesServiceClient.create(sqlInstancesServiceSettings);
+ * }
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesAddServerCaRequest request =
+ * SqlInstancesAddServerCaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.addServerCa(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation addServerCa(SqlInstancesAddServerCaRequest request) {
+ return addServerCaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to
+ * prepare for a certificate rotation. If a CA version was previously added but never used in a
+ * certificate rotation, this operation replaces that version. There cannot be more than one CA
+ * version waiting to be rotated in. For instances that have enabled Certificate Authority Service
+ * (CAS) based server CA, use AddServerCertificate to add a new server certificate.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesAddServerCaRequest request =
+ * SqlInstancesAddServerCaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesAddServerCertificateRequest request =
+ * SqlInstancesAddServerCertificateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.addServerCertificate(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation addServerCertificate(SqlInstancesAddServerCertificateRequest request) {
+ return addServerCertificateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Add a new trusted server certificate version for the specified instance using Certificate
+ * Authority Service (CAS) server CA. Required to prepare for a certificate rotation. If a server
+ * certificate version was previously added but never used in a certificate rotation, this
+ * operation replaces that version. There cannot be more than one certificate version waiting to
+ * be rotated in. For instances not using CAS server CA, use AddServerCa instead.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesAddServerCertificateRequest request =
+ * SqlInstancesAddServerCertificateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesAddEntraIdCertificateRequest request =
+ * SqlInstancesAddEntraIdCertificateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.addEntraIdCertificate(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation addEntraIdCertificate(SqlInstancesAddEntraIdCertificateRequest request) {
+ return addEntraIdCertificateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds a new Entra ID certificate for the specified instance. If an Entra ID certificate was
+ * previously added but never used in a certificate rotation, this operation replaces that
+ * version.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesAddEntraIdCertificateRequest request =
+ * SqlInstancesAddEntraIdCertificateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesCloneRequest request =
+ * SqlInstancesCloneRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesCloneRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.clone(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation clone(SqlInstancesCloneRequest request) {
+ return cloneCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a Cloud SQL instance as a clone of the source instance. Using this operation might
+ * cause your instance to restart.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesCloneRequest request =
+ * SqlInstancesCloneRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesCloneRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesDeleteRequest request =
+ * SqlInstancesDeleteRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setEnableFinalBackup(true)
+ * .setFinalBackupDescription("finalBackupDescription-293551612")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.delete(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation delete(SqlInstancesDeleteRequest request) {
+ return deleteCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesDeleteRequest request =
+ * SqlInstancesDeleteRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setEnableFinalBackup(true)
+ * .setFinalBackupDescription("finalBackupDescription-293551612")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesDemoteMasterRequest request =
+ * SqlInstancesDemoteMasterRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesDemoteMasterRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.demoteMaster(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation demoteMaster(SqlInstancesDemoteMasterRequest request) {
+ return demoteMasterCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Demotes the stand-alone instance to be a Cloud SQL read replica for an external database
+ * server.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesDemoteMasterRequest request =
+ * SqlInstancesDemoteMasterRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesDemoteMasterRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesDemoteRequest request =
+ * SqlInstancesDemoteRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesDemoteRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.demote(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation demote(SqlInstancesDemoteRequest request) {
+ return demoteCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Demotes an existing standalone instance to be a Cloud SQL read replica for an external database
+ * server.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesDemoteRequest request =
+ * SqlInstancesDemoteRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesDemoteRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesExportRequest request =
+ * SqlInstancesExportRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesExportRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.export(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation export(SqlInstancesExportRequest request) {
+ return exportCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesExportRequest request =
+ * SqlInstancesExportRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesExportRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesFailoverRequest request =
+ * SqlInstancesFailoverRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesFailoverRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.failover(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation failover(SqlInstancesFailoverRequest request) {
+ return failoverCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Initiates a manual failover of a high availability (HA) primary instance to a standby instance,
+ * which becomes the primary instance. Users are then rerouted to the new primary. For more
+ * information, see the [Overview of high
+ * availability](https://cloud.google.com/sql/docs/mysql/high-availability) page in the Cloud SQL
+ * documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its
+ * failover replica instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesFailoverRequest request =
+ * SqlInstancesFailoverRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesFailoverRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesReencryptRequest request =
+ * SqlInstancesReencryptRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesReencryptRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.reencrypt(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation reencrypt(SqlInstancesReencryptRequest request) {
+ return reencryptCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Reencrypt CMEK instance with latest key version.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesReencryptRequest request =
+ * SqlInstancesReencryptRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesReencryptRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesGetRequest request =
+ * SqlInstancesGetRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * DatabaseInstance response = sqlInstancesServiceClient.get(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DatabaseInstance get(SqlInstancesGetRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a resource containing information about a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesGetRequest request =
+ * SqlInstancesGetRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesImportRequest request =
+ * SqlInstancesImportRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesImportRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.import_(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation import_(SqlInstancesImportRequest request) {
+ return import_Callable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesImportRequest request =
+ * SqlInstancesImportRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesImportRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesInsertRequest request =
+ * SqlInstancesInsertRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setBody(DatabaseInstance.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.insert(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation insert(SqlInstancesInsertRequest request) {
+ return insertCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesInsertRequest request =
+ * SqlInstancesInsertRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setBody(DatabaseInstance.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesListRequest request =
+ * SqlInstancesListRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .build();
+ * InstancesListResponse response = sqlInstancesServiceClient.list(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InstancesListResponse list(SqlInstancesListRequest request) {
+ return listCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists instances under a given project.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesListRequest request =
+ * SqlInstancesListRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesListServerCasRequest request =
+ * SqlInstancesListServerCasRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * InstancesListServerCasResponse response = sqlInstancesServiceClient.listServerCas(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InstancesListServerCasResponse listServerCas(
+ SqlInstancesListServerCasRequest request) {
+ return listServerCasCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be
+ * up to three CAs listed: the CA that was used to sign the certificate that is currently in use,
+ * a CA that has been added but not yet used to sign a certificate, and a CA used to sign a
+ * certificate that has previously rotated out.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesListServerCasRequest request =
+ * SqlInstancesListServerCasRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesListServerCertificatesRequest request =
+ * SqlInstancesListServerCertificatesRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * InstancesListServerCertificatesResponse response =
+ * sqlInstancesServiceClient.listServerCertificates(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InstancesListServerCertificatesResponse listServerCertificates(
+ SqlInstancesListServerCertificatesRequest request) {
+ return listServerCertificatesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all versions of server certificates and certificate authorities (CAs) for the specified
+ * instance. There can be up to three sets of certs listed: the certificate that is currently in
+ * use, a future that has been added but not yet used to sign a certificate, and a certificate
+ * that has been rotated out. For instances not using Certificate Authority Service (CAS) server
+ * CA, use ListServerCas instead.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesListServerCertificatesRequest request =
+ * SqlInstancesListServerCertificatesRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ SqlInstancesListServerCertificatesRequest, InstancesListServerCertificatesResponse>
+ listServerCertificatesCallable() {
+ return stub.listServerCertificatesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all versions of EntraID certificates for the specified instance. There can be up to three
+ * sets of certificates listed: the certificate that is currently in use, a future that has been
+ * added but not yet used to sign a certificate, and a certificate that has been rotated out.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesListEntraIdCertificatesRequest request =
+ * SqlInstancesListEntraIdCertificatesRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * InstancesListEntraIdCertificatesResponse response =
+ * sqlInstancesServiceClient.listEntraIdCertificates(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InstancesListEntraIdCertificatesResponse listEntraIdCertificates(
+ SqlInstancesListEntraIdCertificatesRequest request) {
+ return listEntraIdCertificatesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all versions of EntraID certificates for the specified instance. There can be up to three
+ * sets of certificates listed: the certificate that is currently in use, a future that has been
+ * added but not yet used to sign a certificate, and a certificate that has been rotated out.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesListEntraIdCertificatesRequest request =
+ * SqlInstancesListEntraIdCertificatesRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ SqlInstancesListEntraIdCertificatesRequest, InstancesListEntraIdCertificatesResponse>
+ listEntraIdCertificatesCallable() {
+ return stub.listEntraIdCertificatesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Partially updates settings of a Cloud SQL instance by merging the request with the current
+ * configuration. This method supports patch semantics.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPatchRequest request =
+ * SqlInstancesPatchRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setReconcilePscNetworking(true)
+ * .setReconcilePscNetworkingForce(true)
+ * .setBody(DatabaseInstance.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.patch(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation patch(SqlInstancesPatchRequest request) {
+ return patchCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Partially updates settings of a Cloud SQL instance by merging the request with the current
+ * configuration. This method supports patch semantics.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPatchRequest request =
+ * SqlInstancesPatchRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setReconcilePscNetworking(true)
+ * .setReconcilePscNetworkingForce(true)
+ * .setBody(DatabaseInstance.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPromoteReplicaRequest request =
+ * SqlInstancesPromoteReplicaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setFailover(true)
+ * .build();
+ * Operation response = sqlInstancesServiceClient.promoteReplica(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation promoteReplica(SqlInstancesPromoteReplicaRequest request) {
+ return promoteReplicaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Promotes the read replica instance to be an independent Cloud SQL primary instance. Using this
+ * operation might cause your instance to restart.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPromoteReplicaRequest request =
+ * SqlInstancesPromoteReplicaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setFailover(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesSwitchoverRequest request =
+ * SqlInstancesSwitchoverRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setDbTimeout(Duration.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.switchover(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation switchover(SqlInstancesSwitchoverRequest request) {
+ return switchoverCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Switches over from the primary instance to the DR replica instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesSwitchoverRequest request =
+ * SqlInstancesSwitchoverRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setDbTimeout(Duration.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesResetSslConfigRequest request =
+ * SqlInstancesResetSslConfigRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.resetSslConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation resetSslConfig(SqlInstancesResetSslConfigRequest request) {
+ return resetSslConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes all client certificates and generates a new server SSL certificate for the instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesResetSslConfigRequest request =
+ * SqlInstancesResetSslConfigRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRestartRequest request =
+ * SqlInstancesRestartRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.restart(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation restart(SqlInstancesRestartRequest request) {
+ return restartCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Restarts a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRestartRequest request =
+ * SqlInstancesRestartRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRestoreBackupRequest request =
+ * SqlInstancesRestoreBackupRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesRestoreBackupRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.restoreBackup(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation restoreBackup(SqlInstancesRestoreBackupRequest request) {
+ return restoreBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to
+ * restart.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRestoreBackupRequest request =
+ * SqlInstancesRestoreBackupRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesRestoreBackupRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRotateServerCaRequest request =
+ * SqlInstancesRotateServerCaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesRotateServerCaRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.rotateServerCa(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation rotateServerCa(SqlInstancesRotateServerCaRequest request) {
+ return rotateServerCaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Rotates the server certificate to one signed by the Certificate Authority (CA) version
+ * previously added with the addServerCA method. For instances that have enabled Certificate
+ * Authority Service (CAS) based server CA, use RotateServerCertificate to rotate the server
+ * certificate.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRotateServerCaRequest request =
+ * SqlInstancesRotateServerCaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesRotateServerCaRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRotateServerCertificateRequest request =
+ * SqlInstancesRotateServerCertificateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesRotateServerCertificateRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.rotateServerCertificate(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation rotateServerCertificate(
+ SqlInstancesRotateServerCertificateRequest request) {
+ return rotateServerCertificateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Rotates the server certificate version to one previously added with the addServerCertificate
+ * method. For instances not using Certificate Authority Service (CAS) server CA, use
+ * RotateServerCa instead.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRotateServerCertificateRequest request =
+ * SqlInstancesRotateServerCertificateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesRotateServerCertificateRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRotateEntraIdCertificateRequest request =
+ * SqlInstancesRotateEntraIdCertificateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesRotateEntraIdCertificateRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.rotateEntraIdCertificate(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation rotateEntraIdCertificate(
+ SqlInstancesRotateEntraIdCertificateRequest request) {
+ return rotateEntraIdCertificateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Rotates the server certificate version to one previously added with the addEntraIdCertificate
+ * method.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRotateEntraIdCertificateRequest request =
+ * SqlInstancesRotateEntraIdCertificateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesRotateEntraIdCertificateRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesStartReplicaRequest request =
+ * SqlInstancesStartReplicaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.startReplica(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation startReplica(SqlInstancesStartReplicaRequest request) {
+ return startReplicaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Starts the replication in the read replica instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesStartReplicaRequest request =
+ * SqlInstancesStartReplicaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesStopReplicaRequest request =
+ * SqlInstancesStopReplicaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.stopReplica(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation stopReplica(SqlInstancesStopReplicaRequest request) {
+ return stopReplicaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Stops the replication in the read replica instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesStopReplicaRequest request =
+ * SqlInstancesStopReplicaRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesTruncateLogRequest request =
+ * SqlInstancesTruncateLogRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesTruncateLogRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.truncateLog(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation truncateLog(SqlInstancesTruncateLogRequest request) {
+ return truncateLogCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Truncate MySQL general and slow query log tables MySQL only.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesTruncateLogRequest request =
+ * SqlInstancesTruncateLogRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesTruncateLogRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesUpdateRequest request =
+ * SqlInstancesUpdateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(DatabaseInstance.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.update(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation update(SqlInstancesUpdateRequest request) {
+ return updateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates settings of a Cloud SQL instance. Using this operation might cause your instance to
+ * restart.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesUpdateRequest request =
+ * SqlInstancesUpdateRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(DatabaseInstance.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesCreateEphemeralCertRequest request =
+ * SqlInstancesCreateEphemeralCertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(SslCertsCreateEphemeralRequest.newBuilder().build())
+ * .build();
+ * SslCert response = sqlInstancesServiceClient.createEphemeral(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SslCert createEphemeral(SqlInstancesCreateEphemeralCertRequest request) {
+ return createEphemeralCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates a short-lived X509 certificate containing the provided public key and signed by a
+ * private key specific to the target instance. Users may use the certificate to authenticate as
+ * themselves when connecting to the database.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesCreateEphemeralCertRequest request =
+ * SqlInstancesCreateEphemeralCertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(SslCertsCreateEphemeralRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRescheduleMaintenanceRequest request =
+ * SqlInstancesRescheduleMaintenanceRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(SqlInstancesRescheduleMaintenanceRequestBody.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.rescheduleMaintenance(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation rescheduleMaintenance(SqlInstancesRescheduleMaintenanceRequest request) {
+ return rescheduleMaintenanceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Reschedules the maintenance on the given instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesRescheduleMaintenanceRequest request =
+ * SqlInstancesRescheduleMaintenanceRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(SqlInstancesRescheduleMaintenanceRequestBody.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesVerifyExternalSyncSettingsRequest request =
+ * SqlInstancesVerifyExternalSyncSettingsRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setVerifyConnectionOnly(true)
+ * .setVerifyReplicationOnly(true)
+ * .setSyncParallelLevel(ExternalSyncParallelLevel.forNumber(0))
+ * .addAllSelectedObjects(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SqlInstancesVerifyExternalSyncSettingsResponse verifyExternalSyncSettings(
+ SqlInstancesVerifyExternalSyncSettingsRequest request) {
+ return verifyExternalSyncSettingsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Verify External primary instance external sync settings.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesVerifyExternalSyncSettingsRequest request =
+ * SqlInstancesVerifyExternalSyncSettingsRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setVerifyConnectionOnly(true)
+ * .setVerifyReplicationOnly(true)
+ * .setSyncParallelLevel(ExternalSyncParallelLevel.forNumber(0))
+ * .addAllSelectedObjects(new ArrayList
+ */
+ public final UnaryCallable<
+ SqlInstancesVerifyExternalSyncSettingsRequest,
+ SqlInstancesVerifyExternalSyncSettingsResponse>
+ verifyExternalSyncSettingsCallable() {
+ return stub.verifyExternalSyncSettingsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Start External primary instance migration.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesStartExternalSyncRequest request =
+ * SqlInstancesStartExternalSyncRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setSkipVerification(true)
+ * .setSyncParallelLevel(ExternalSyncParallelLevel.forNumber(0))
+ * .setReplicaOverwriteEnabled(true)
+ * .build();
+ * Operation response = sqlInstancesServiceClient.startExternalSync(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation startExternalSync(SqlInstancesStartExternalSyncRequest request) {
+ return startExternalSyncCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Start External primary instance migration.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesStartExternalSyncRequest request =
+ * SqlInstancesStartExternalSyncRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setSkipVerification(true)
+ * .setSyncParallelLevel(ExternalSyncParallelLevel.forNumber(0))
+ * .setReplicaOverwriteEnabled(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPerformDiskShrinkRequest request =
+ * SqlInstancesPerformDiskShrinkRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(PerformDiskShrinkContext.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.performDiskShrink(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation performDiskShrink(SqlInstancesPerformDiskShrinkRequest request) {
+ return performDiskShrinkCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform Disk Shrink on primary instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPerformDiskShrinkRequest request =
+ * SqlInstancesPerformDiskShrinkRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(PerformDiskShrinkContext.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesGetDiskShrinkConfigRequest request =
+ * SqlInstancesGetDiskShrinkConfigRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * SqlInstancesGetDiskShrinkConfigResponse response =
+ * sqlInstancesServiceClient.getDiskShrinkConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SqlInstancesGetDiskShrinkConfigResponse getDiskShrinkConfig(
+ SqlInstancesGetDiskShrinkConfigRequest request) {
+ return getDiskShrinkConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get Disk Shrink Config for a given instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesGetDiskShrinkConfigRequest request =
+ * SqlInstancesGetDiskShrinkConfigRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ SqlInstancesGetDiskShrinkConfigRequest, SqlInstancesGetDiskShrinkConfigResponse>
+ getDiskShrinkConfigCallable() {
+ return stub.getDiskShrinkConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Reset Replica Size to primary instance disk size.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesResetReplicaSizeRequest request =
+ * SqlInstancesResetReplicaSizeRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlInstancesServiceClient.resetReplicaSize(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation resetReplicaSize(SqlInstancesResetReplicaSizeRequest request) {
+ return resetReplicaSizeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Reset Replica Size to primary instance disk size.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesResetReplicaSizeRequest request =
+ * SqlInstancesResetReplicaSizeRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesGetLatestRecoveryTimeRequest request =
+ * SqlInstancesGetLatestRecoveryTimeRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setSourceInstanceDeletionTime(Timestamp.newBuilder().build())
+ * .build();
+ * SqlInstancesGetLatestRecoveryTimeResponse response =
+ * sqlInstancesServiceClient.getLatestRecoveryTime(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SqlInstancesGetLatestRecoveryTimeResponse getLatestRecoveryTime(
+ SqlInstancesGetLatestRecoveryTimeRequest request) {
+ return getLatestRecoveryTimeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get Latest Recovery Time for a given instance.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesGetLatestRecoveryTimeRequest request =
+ * SqlInstancesGetLatestRecoveryTimeRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setSourceInstanceDeletionTime(Timestamp.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ SqlInstancesGetLatestRecoveryTimeRequest, SqlInstancesGetLatestRecoveryTimeResponse>
+ getLatestRecoveryTimeCallable() {
+ return stub.getLatestRecoveryTimeCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Execute SQL statements.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesExecuteSqlRequest request =
+ * SqlInstancesExecuteSqlRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(ExecuteSqlPayload.newBuilder().build())
+ * .build();
+ * SqlInstancesExecuteSqlResponse response = sqlInstancesServiceClient.executeSql(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SqlInstancesExecuteSqlResponse executeSql(SqlInstancesExecuteSqlRequest request) {
+ return executeSqlCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Execute SQL statements.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesExecuteSqlRequest request =
+ * SqlInstancesExecuteSqlRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(ExecuteSqlPayload.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesAcquireSsrsLeaseRequest request =
+ * SqlInstancesAcquireSsrsLeaseRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesAcquireSsrsLeaseRequest.newBuilder().build())
+ * .build();
+ * SqlInstancesAcquireSsrsLeaseResponse response =
+ * sqlInstancesServiceClient.acquireSsrsLease(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SqlInstancesAcquireSsrsLeaseResponse acquireSsrsLease(
+ SqlInstancesAcquireSsrsLeaseRequest request) {
+ return acquireSsrsLeaseCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesAcquireSsrsLeaseRequest request =
+ * SqlInstancesAcquireSsrsLeaseRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesAcquireSsrsLeaseRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ SqlInstancesAcquireSsrsLeaseRequest, SqlInstancesAcquireSsrsLeaseResponse>
+ acquireSsrsLeaseCallable() {
+ return stub.acquireSsrsLeaseCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Release a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesReleaseSsrsLeaseRequest request =
+ * SqlInstancesReleaseSsrsLeaseRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * SqlInstancesReleaseSsrsLeaseResponse response =
+ * sqlInstancesServiceClient.releaseSsrsLease(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SqlInstancesReleaseSsrsLeaseResponse releaseSsrsLease(
+ SqlInstancesReleaseSsrsLeaseRequest request) {
+ return releaseSsrsLeaseCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Release a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesReleaseSsrsLeaseRequest request =
+ * SqlInstancesReleaseSsrsLeaseRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ SqlInstancesReleaseSsrsLeaseRequest, SqlInstancesReleaseSsrsLeaseResponse>
+ releaseSsrsLeaseCallable() {
+ return stub.releaseSsrsLeaseCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Execute MVU Pre-checks
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPreCheckMajorVersionUpgradeRequest request =
+ * SqlInstancesPreCheckMajorVersionUpgradeRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesPreCheckMajorVersionUpgradeRequest.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.preCheckMajorVersionUpgrade(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation preCheckMajorVersionUpgrade(
+ SqlInstancesPreCheckMajorVersionUpgradeRequest request) {
+ return preCheckMajorVersionUpgradeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Execute MVU Pre-checks
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPreCheckMajorVersionUpgradeRequest request =
+ * SqlInstancesPreCheckMajorVersionUpgradeRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(InstancesPreCheckMajorVersionUpgradeRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPointInTimeRestoreRequest request =
+ * SqlInstancesPointInTimeRestoreRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setContext(PointInTimeRestoreContext.newBuilder().build())
+ * .build();
+ * Operation response = sqlInstancesServiceClient.pointInTimeRestore(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation pointInTimeRestore(SqlInstancesPointInTimeRestoreRequest request) {
+ return pointInTimeRestoreCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Point in time restore for an instance managed by Google Cloud Backup and Disaster Recovery.
+ *
+ * {@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
+ * try (SqlInstancesServiceClient sqlInstancesServiceClient = SqlInstancesServiceClient.create()) {
+ * SqlInstancesPointInTimeRestoreRequest request =
+ * SqlInstancesPointInTimeRestoreRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setContext(PointInTimeRestoreContext.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * SqlInstancesServiceSettings.Builder sqlInstancesServiceSettingsBuilder =
+ * SqlInstancesServiceSettings.newBuilder();
+ * sqlInstancesServiceSettingsBuilder
+ * .addServerCaSettings()
+ * .setRetrySettings(
+ * sqlInstancesServiceSettingsBuilder
+ * .addServerCaSettings()
+ * .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());
+ * SqlInstancesServiceSettings sqlInstancesServiceSettings =
+ * sqlInstancesServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlInstancesServiceSettings extends ClientSettings{@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
+ * try (SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create()) {
+ * SqlOperationsGetRequest request =
+ * SqlOperationsGetRequest.newBuilder()
+ * .setOperation("operation1662702951")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlOperationsServiceClient.get(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SqlOperationsServiceSettings sqlOperationsServiceSettings =
+ * SqlOperationsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create(sqlOperationsServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlOperationsServiceSettings sqlOperationsServiceSettings =
+ * SqlOperationsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create(sqlOperationsServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlOperationsServiceSettings sqlOperationsServiceSettings =
+ * SqlOperationsServiceSettings.newHttpJsonBuilder().build();
+ * SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create(sqlOperationsServiceSettings);
+ * }
+ *
+ * {@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
+ * try (SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create()) {
+ * SqlOperationsGetRequest request =
+ * SqlOperationsGetRequest.newBuilder()
+ * .setOperation("operation1662702951")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlOperationsServiceClient.get(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation get(SqlOperationsGetRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves an instance operation that has been performed on an instance.
+ *
+ * {@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
+ * try (SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create()) {
+ * SqlOperationsGetRequest request =
+ * SqlOperationsGetRequest.newBuilder()
+ * .setOperation("operation1662702951")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create()) {
+ * SqlOperationsListRequest request =
+ * SqlOperationsListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setMaxResults(1128457243)
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .build();
+ * OperationsListResponse response = sqlOperationsServiceClient.list(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationsListResponse list(SqlOperationsListRequest request) {
+ return listCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all instance operations that have been performed on the given Cloud SQL instance in the
+ * reverse chronological order of the start time.
+ *
+ * {@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
+ * try (SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create()) {
+ * SqlOperationsListRequest request =
+ * SqlOperationsListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setMaxResults(1128457243)
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create()) {
+ * SqlOperationsCancelRequest request =
+ * SqlOperationsCancelRequest.newBuilder()
+ * .setOperation("operation1662702951")
+ * .setProject("project-309310695")
+ * .build();
+ * sqlOperationsServiceClient.cancel(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void cancel(SqlOperationsCancelRequest request) {
+ cancelCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels an instance operation that has been performed on an instance.
+ *
+ * {@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
+ * try (SqlOperationsServiceClient sqlOperationsServiceClient =
+ * SqlOperationsServiceClient.create()) {
+ * SqlOperationsCancelRequest request =
+ * SqlOperationsCancelRequest.newBuilder()
+ * .setOperation("operation1662702951")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * SqlOperationsServiceSettings.Builder sqlOperationsServiceSettingsBuilder =
+ * SqlOperationsServiceSettings.newBuilder();
+ * sqlOperationsServiceSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * sqlOperationsServiceSettingsBuilder
+ * .getSettings()
+ * .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());
+ * SqlOperationsServiceSettings sqlOperationsServiceSettings =
+ * sqlOperationsServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlOperationsServiceSettings extends ClientSettings{@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
+ * try (SqlSslCertsServiceClient sqlSslCertsServiceClient = SqlSslCertsServiceClient.create()) {
+ * SqlSslCertsDeleteRequest request =
+ * SqlSslCertsDeleteRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setSha1Fingerprint("sha1Fingerprint163009183")
+ * .build();
+ * Operation response = sqlSslCertsServiceClient.delete(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SqlSslCertsServiceSettings sqlSslCertsServiceSettings =
+ * SqlSslCertsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlSslCertsServiceClient sqlSslCertsServiceClient =
+ * SqlSslCertsServiceClient.create(sqlSslCertsServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlSslCertsServiceSettings sqlSslCertsServiceSettings =
+ * SqlSslCertsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlSslCertsServiceClient sqlSslCertsServiceClient =
+ * SqlSslCertsServiceClient.create(sqlSslCertsServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlSslCertsServiceSettings sqlSslCertsServiceSettings =
+ * SqlSslCertsServiceSettings.newHttpJsonBuilder().build();
+ * SqlSslCertsServiceClient sqlSslCertsServiceClient =
+ * SqlSslCertsServiceClient.create(sqlSslCertsServiceSettings);
+ * }
+ *
+ * {@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
+ * try (SqlSslCertsServiceClient sqlSslCertsServiceClient = SqlSslCertsServiceClient.create()) {
+ * SqlSslCertsDeleteRequest request =
+ * SqlSslCertsDeleteRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setSha1Fingerprint("sha1Fingerprint163009183")
+ * .build();
+ * Operation response = sqlSslCertsServiceClient.delete(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation delete(SqlSslCertsDeleteRequest request) {
+ return deleteCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the SSL certificate. For First Generation instances, the certificate remains valid
+ * until the instance is restarted.
+ *
+ * {@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
+ * try (SqlSslCertsServiceClient sqlSslCertsServiceClient = SqlSslCertsServiceClient.create()) {
+ * SqlSslCertsDeleteRequest request =
+ * SqlSslCertsDeleteRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setSha1Fingerprint("sha1Fingerprint163009183")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlSslCertsServiceClient sqlSslCertsServiceClient = SqlSslCertsServiceClient.create()) {
+ * SqlSslCertsGetRequest request =
+ * SqlSslCertsGetRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setSha1Fingerprint("sha1Fingerprint163009183")
+ * .build();
+ * SslCert response = sqlSslCertsServiceClient.get(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SslCert get(SqlSslCertsGetRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a particular SSL certificate. Does not include the private key (required for usage).
+ * The private key must be saved from the response to initial creation.
+ *
+ * {@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
+ * try (SqlSslCertsServiceClient sqlSslCertsServiceClient = SqlSslCertsServiceClient.create()) {
+ * SqlSslCertsGetRequest request =
+ * SqlSslCertsGetRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setSha1Fingerprint("sha1Fingerprint163009183")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlSslCertsServiceClient sqlSslCertsServiceClient = SqlSslCertsServiceClient.create()) {
+ * SqlSslCertsInsertRequest request =
+ * SqlSslCertsInsertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(SslCertsInsertRequest.newBuilder().build())
+ * .build();
+ * SslCertsInsertResponse response = sqlSslCertsServiceClient.insert(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SslCertsInsertResponse insert(SqlSslCertsInsertRequest request) {
+ return insertCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an SSL certificate and returns it along with the private key and server certificate
+ * authority. The new certificate will not be usable until the instance is restarted.
+ *
+ * {@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
+ * try (SqlSslCertsServiceClient sqlSslCertsServiceClient = SqlSslCertsServiceClient.create()) {
+ * SqlSslCertsInsertRequest request =
+ * SqlSslCertsInsertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(SslCertsInsertRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlSslCertsServiceClient sqlSslCertsServiceClient = SqlSslCertsServiceClient.create()) {
+ * SqlSslCertsListRequest request =
+ * SqlSslCertsListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * SslCertsListResponse response = sqlSslCertsServiceClient.list(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SslCertsListResponse list(SqlSslCertsListRequest request) {
+ return listCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all of the current SSL certificates for the instance.
+ *
+ * {@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
+ * try (SqlSslCertsServiceClient sqlSslCertsServiceClient = SqlSslCertsServiceClient.create()) {
+ * SqlSslCertsListRequest request =
+ * SqlSslCertsListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * SqlSslCertsServiceSettings.Builder sqlSslCertsServiceSettingsBuilder =
+ * SqlSslCertsServiceSettings.newBuilder();
+ * sqlSslCertsServiceSettingsBuilder
+ * .deleteSettings()
+ * .setRetrySettings(
+ * sqlSslCertsServiceSettingsBuilder
+ * .deleteSettings()
+ * .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());
+ * SqlSslCertsServiceSettings sqlSslCertsServiceSettings =
+ * sqlSslCertsServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlSslCertsServiceSettings extends ClientSettings{@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
+ * try (SqlTiersServiceClient sqlTiersServiceClient = SqlTiersServiceClient.create()) {
+ * SqlTiersListRequest request =
+ * SqlTiersListRequest.newBuilder().setProject("project-309310695").build();
+ * TiersListResponse response = sqlTiersServiceClient.list(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SqlTiersServiceSettings sqlTiersServiceSettings =
+ * SqlTiersServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlTiersServiceClient sqlTiersServiceClient =
+ * SqlTiersServiceClient.create(sqlTiersServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlTiersServiceSettings sqlTiersServiceSettings =
+ * SqlTiersServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlTiersServiceClient sqlTiersServiceClient =
+ * SqlTiersServiceClient.create(sqlTiersServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlTiersServiceSettings sqlTiersServiceSettings =
+ * SqlTiersServiceSettings.newHttpJsonBuilder().build();
+ * SqlTiersServiceClient sqlTiersServiceClient =
+ * SqlTiersServiceClient.create(sqlTiersServiceSettings);
+ * }
+ *
+ * {@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
+ * try (SqlTiersServiceClient sqlTiersServiceClient = SqlTiersServiceClient.create()) {
+ * SqlTiersListRequest request =
+ * SqlTiersListRequest.newBuilder().setProject("project-309310695").build();
+ * TiersListResponse response = sqlTiersServiceClient.list(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TiersListResponse list(SqlTiersListRequest request) {
+ return listCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all available machine types (tiers) for Cloud SQL, for example, `db-custom-1-3840`. For
+ * more information, see https://cloud.google.com/sql/pricing.
+ *
+ * {@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
+ * try (SqlTiersServiceClient sqlTiersServiceClient = SqlTiersServiceClient.create()) {
+ * SqlTiersListRequest request =
+ * SqlTiersListRequest.newBuilder().setProject("project-309310695").build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * SqlTiersServiceSettings.Builder sqlTiersServiceSettingsBuilder =
+ * SqlTiersServiceSettings.newBuilder();
+ * sqlTiersServiceSettingsBuilder
+ * .listSettings()
+ * .setRetrySettings(
+ * sqlTiersServiceSettingsBuilder
+ * .listSettings()
+ * .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());
+ * SqlTiersServiceSettings sqlTiersServiceSettings = sqlTiersServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlTiersServiceSettings extends ClientSettings{@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersDeleteRequest request =
+ * SqlUsersDeleteRequest.newBuilder()
+ * .setHost("host3208616")
+ * .setInstance("instance555127957")
+ * .setName("name3373707")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlUsersServiceClient.delete(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SqlUsersServiceSettings sqlUsersServiceSettings =
+ * SqlUsersServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SqlUsersServiceClient sqlUsersServiceClient =
+ * SqlUsersServiceClient.create(sqlUsersServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlUsersServiceSettings sqlUsersServiceSettings =
+ * SqlUsersServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SqlUsersServiceClient sqlUsersServiceClient =
+ * SqlUsersServiceClient.create(sqlUsersServiceSettings);
+ * }
+ *
+ * {@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
+ * SqlUsersServiceSettings sqlUsersServiceSettings =
+ * SqlUsersServiceSettings.newHttpJsonBuilder().build();
+ * SqlUsersServiceClient sqlUsersServiceClient =
+ * SqlUsersServiceClient.create(sqlUsersServiceSettings);
+ * }
+ *
+ * {@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersDeleteRequest request =
+ * SqlUsersDeleteRequest.newBuilder()
+ * .setHost("host3208616")
+ * .setInstance("instance555127957")
+ * .setName("name3373707")
+ * .setProject("project-309310695")
+ * .build();
+ * Operation response = sqlUsersServiceClient.delete(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation delete(SqlUsersDeleteRequest request) {
+ return deleteCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user from a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersDeleteRequest request =
+ * SqlUsersDeleteRequest.newBuilder()
+ * .setHost("host3208616")
+ * .setInstance("instance555127957")
+ * .setName("name3373707")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersGetRequest request =
+ * SqlUsersGetRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setName("name3373707")
+ * .setProject("project-309310695")
+ * .setHost("host3208616")
+ * .build();
+ * User response = sqlUsersServiceClient.get(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final User get(SqlUsersGetRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a resource containing information about a user.
+ *
+ * {@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersGetRequest request =
+ * SqlUsersGetRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setName("name3373707")
+ * .setProject("project-309310695")
+ * .setHost("host3208616")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersInsertRequest request =
+ * SqlUsersInsertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(User.newBuilder().build())
+ * .build();
+ * Operation response = sqlUsersServiceClient.insert(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation insert(SqlUsersInsertRequest request) {
+ return insertCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new user in a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersInsertRequest request =
+ * SqlUsersInsertRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .setBody(User.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersListRequest request =
+ * SqlUsersListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * UsersListResponse response = sqlUsersServiceClient.list(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UsersListResponse list(SqlUsersListRequest request) {
+ return listCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists users in the specified Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersListRequest request =
+ * SqlUsersListRequest.newBuilder()
+ * .setInstance("instance555127957")
+ * .setProject("project-309310695")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersUpdateRequest request =
+ * SqlUsersUpdateRequest.newBuilder()
+ * .setHost("host3208616")
+ * .setInstance("instance555127957")
+ * .setName("name3373707")
+ * .setProject("project-309310695")
+ * .addAllDatabaseRoles(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operation update(SqlUsersUpdateRequest request) {
+ return updateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an existing user in a Cloud SQL instance.
+ *
+ * {@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
+ * try (SqlUsersServiceClient sqlUsersServiceClient = SqlUsersServiceClient.create()) {
+ * SqlUsersUpdateRequest request =
+ * SqlUsersUpdateRequest.newBuilder()
+ * .setHost("host3208616")
+ * .setInstance("instance555127957")
+ * .setName("name3373707")
+ * .setProject("project-309310695")
+ * .addAllDatabaseRoles(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * SqlUsersServiceSettings.Builder sqlUsersServiceSettingsBuilder =
+ * SqlUsersServiceSettings.newBuilder();
+ * sqlUsersServiceSettingsBuilder
+ * .deleteSettings()
+ * .setRetrySettings(
+ * sqlUsersServiceSettingsBuilder
+ * .deleteSettings()
+ * .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());
+ * SqlUsersServiceSettings sqlUsersServiceSettings = sqlUsersServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SqlUsersServiceSettings extends ClientSettings