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;
}
});
}
Aggregations