public final GetDatabaseDdlResponse getDatabaseDdl(DatabaseName database) {

    GetDatabaseDdlRequest request =
        GetDatabaseDdlRequest.newBuilder()
            .setDatabase(database == null ? null : database.toString())
            .build();
    return getDatabaseDdl(request);
  }
public final GetDatabaseDdlResponse getDatabaseDdl ( DatabaseName database ) { GetDatabaseDdlRequest request = GetDatabaseDdlRequest . newBuilder ( ) . setDatabase ( database == null ? null : database . toString ( ) ) . build ( ) ; return getDatabaseDdl ( request ) ; }
Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This
method does not show pending schema updates, those may be queried using the
[Operations][google.longrunning.Operations] API.

<p>Sample code:

<pre><code>
try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]");
GetDatabaseDdlResponse response = databaseAdminClient.getDatabaseDdl(database);
}
</code></pre>

@param database Required. The database whose schema we wish to get.
@throws com.google.api.gax.rpc.ApiException if the remote call fails