Search in sources :

Example 1 with ServiceObjectiveName

use of com.microsoft.azure.management.sql.ServiceObjectiveName in project azure-sdk-for-java by Azure.

the class SqlDatabaseImpl method createChildResourceAsync.

@Override
protected Observable<SqlDatabase> createChildResourceAsync() {
    final SqlDatabaseImpl self = this;
    if (this.elasticPoolCreatableKey != null) {
        SqlElasticPool sqlElasticPool = (SqlElasticPool) this.createdResource(this.elasticPoolCreatableKey);
        withExistingElasticPool(sqlElasticPool);
    }
    if (this.inner().elasticPoolName() != null && !this.inner().elasticPoolName().isEmpty()) {
        this.inner().withEdition(new DatabaseEditions(""));
        this.inner().withRequestedServiceObjectiveName(new ServiceObjectiveName(""));
        this.inner().withRequestedServiceObjectiveId(null);
    }
    return this.manager().inner().databases().createOrUpdateAsync(this.resourceGroupName(), this.sqlServerName(), this.name(), this.inner()).map(new Func1<DatabaseInner, SqlDatabase>() {

        @Override
        public SqlDatabase call(DatabaseInner databaseInner) {
            setInner(databaseInner);
            self.elasticPoolCreatableKey = null;
            return self;
        }
    });
}
Also used : ServiceObjectiveName(com.microsoft.azure.management.sql.ServiceObjectiveName) SqlDatabase(com.microsoft.azure.management.sql.SqlDatabase) SqlElasticPool(com.microsoft.azure.management.sql.SqlElasticPool) DatabaseEditions(com.microsoft.azure.management.sql.DatabaseEditions)

Aggregations

DatabaseEditions (com.microsoft.azure.management.sql.DatabaseEditions)1 ServiceObjectiveName (com.microsoft.azure.management.sql.ServiceObjectiveName)1 SqlDatabase (com.microsoft.azure.management.sql.SqlDatabase)1 SqlElasticPool (com.microsoft.azure.management.sql.SqlElasticPool)1