Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sql/resource-manager/v2017_10_01_preview/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
<version>0.0.3-beta</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>azure-mgmt-sql</artifactId>
<version>1.0.0-beta</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
* Type representing Database.
*/
public interface Database extends HasInner<DatabaseInner>, Indexable, Refreshable<Database>, Updatable<Database.Update>, HasManager<SqlManager> {
/**
* @return the autoPauseDelay value.
*/
Integer autoPauseDelay();

/**
* @return the catalogCollation value.
*/
Expand Down Expand Up @@ -120,6 +125,11 @@ public interface Database extends HasInner<DatabaseInner>, Indexable, Refreshabl
*/
Long maxSizeBytes();

/**
* @return the minCapacity value.
*/
Double minCapacity();

/**
* @return the name value.
*/
Expand Down Expand Up @@ -236,6 +246,18 @@ interface WithLocation {
WithCreate withLocation(String location);
}

/**
* The stage of the database definition allowing to specify AutoPauseDelay.
*/
interface WithAutoPauseDelay {
/**
* Specifies autoPauseDelay.
* @param autoPauseDelay Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled
* @return the next definition stage
*/
WithCreate withAutoPauseDelay(Integer autoPauseDelay);
}

/**
* The stage of the database definition allowing to specify CatalogCollation.
*/
Expand Down Expand Up @@ -328,6 +350,18 @@ interface WithMaxSizeBytes {
WithCreate withMaxSizeBytes(Long maxSizeBytes);
}

/**
* The stage of the database definition allowing to specify MinCapacity.
*/
interface WithMinCapacity {
/**
* Specifies minCapacity.
* @param minCapacity Minimal capacity that database will always have allocated, if not paused
* @return the next definition stage
*/
WithCreate withMinCapacity(Double minCapacity);
}

/**
* The stage of the database definition allowing to specify ReadScale.
*/
Expand Down Expand Up @@ -406,7 +440,14 @@ interface WithSampleName {
interface WithSku {
/**
* Specifies sku.
* @param sku The name and tier of the SKU
* @param sku The database SKU.
The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:
```azurecli
az sql db list-editions -l &lt;location&gt; -o table
````
```powershell
Get-AzSqlServerServiceObjective -Location &lt;location&gt;
````
* @return the next definition stage
*/
WithCreate withSku(Sku sku);
Expand Down Expand Up @@ -465,19 +506,31 @@ interface WithZoneRedundant {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<Database>, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithElasticPoolId, DefinitionStages.WithLicenseType, DefinitionStages.WithLongTermRetentionBackupResourceId, DefinitionStages.WithMaxSizeBytes, DefinitionStages.WithReadScale, DefinitionStages.WithRecoverableDatabaseId, DefinitionStages.WithRecoveryServicesRecoveryPointId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSampleName, DefinitionStages.WithSku, DefinitionStages.WithSourceDatabaseDeletionDate, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithTags, DefinitionStages.WithZoneRedundant {
interface WithCreate extends Creatable<Database>, DefinitionStages.WithAutoPauseDelay, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithElasticPoolId, DefinitionStages.WithLicenseType, DefinitionStages.WithLongTermRetentionBackupResourceId, DefinitionStages.WithMaxSizeBytes, DefinitionStages.WithMinCapacity, DefinitionStages.WithReadScale, DefinitionStages.WithRecoverableDatabaseId, DefinitionStages.WithRecoveryServicesRecoveryPointId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSampleName, DefinitionStages.WithSku, DefinitionStages.WithSourceDatabaseDeletionDate, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithTags, DefinitionStages.WithZoneRedundant {
}
}
/**
* The template for a Database update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<Database>, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithElasticPoolId, UpdateStages.WithLicenseType, UpdateStages.WithLongTermRetentionBackupResourceId, UpdateStages.WithMaxSizeBytes, UpdateStages.WithReadScale, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRecoveryServicesRecoveryPointId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSampleName, UpdateStages.WithSku, UpdateStages.WithSourceDatabaseDeletionDate, UpdateStages.WithSourceDatabaseId, UpdateStages.WithTags, UpdateStages.WithZoneRedundant {
interface Update extends Appliable<Database>, UpdateStages.WithAutoPauseDelay, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithElasticPoolId, UpdateStages.WithLicenseType, UpdateStages.WithLongTermRetentionBackupResourceId, UpdateStages.WithMaxSizeBytes, UpdateStages.WithMinCapacity, UpdateStages.WithReadScale, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRecoveryServicesRecoveryPointId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSampleName, UpdateStages.WithSku, UpdateStages.WithSourceDatabaseDeletionDate, UpdateStages.WithSourceDatabaseId, UpdateStages.WithTags, UpdateStages.WithZoneRedundant {
}

/**
* Grouping of Database update stages.
*/
interface UpdateStages {
/**
* The stage of the database update allowing to specify AutoPauseDelay.
*/
interface WithAutoPauseDelay {
/**
* Specifies autoPauseDelay.
* @param autoPauseDelay Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled
* @return the next update stage
*/
Update withAutoPauseDelay(Integer autoPauseDelay);
}

/**
* The stage of the database update allowing to specify CatalogCollation.
*/
Expand Down Expand Up @@ -570,6 +623,18 @@ interface WithMaxSizeBytes {
Update withMaxSizeBytes(Long maxSizeBytes);
}

/**
* The stage of the database update allowing to specify MinCapacity.
*/
interface WithMinCapacity {
/**
* Specifies minCapacity.
* @param minCapacity Minimal capacity that database will always have allocated, if not paused
* @return the next update stage
*/
Update withMinCapacity(Double minCapacity);
}

/**
* The stage of the database update allowing to specify ReadScale.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public final class DatabaseStatus extends ExpandableStringEnum<DatabaseStatus> {
/** Static value Scaling for DatabaseStatus. */
public static final DatabaseStatus SCALING = fromString("Scaling");

/** Static value OfflineChangingDwPerformanceTiers for DatabaseStatus. */
public static final DatabaseStatus OFFLINE_CHANGING_DW_PERFORMANCE_TIERS = fromString("OfflineChangingDwPerformanceTiers");

/** Static value OnlineChangingDwPerformanceTiers for DatabaseStatus. */
public static final DatabaseStatus ONLINE_CHANGING_DW_PERFORMANCE_TIERS = fromString("OnlineChangingDwPerformanceTiers");

/**
* Creates or finds a DatabaseStatus from its string representation.
* @param name a name to look for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public class DatabaseUpdate {
* 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', 'Offline',
* 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying',
* 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused',
* 'Resuming', 'Scaling'.
* 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
* 'OnlineChangingDwPerformanceTiers'.
*/
@JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
private DatabaseStatus status;
Expand Down Expand Up @@ -237,6 +238,20 @@ public class DatabaseUpdate {
@JsonProperty(value = "properties.currentSku", access = JsonProperty.Access.WRITE_ONLY)
private Sku currentSku;

/**
* Time in minutes after which database is automatically paused. A value of
* -1 means that automatic pause is disabled.
*/
@JsonProperty(value = "properties.autoPauseDelay")
private Integer autoPauseDelay;

/**
* Minimal capacity that database will always have allocated, if not
* paused.
*/
@JsonProperty(value = "properties.minCapacity")
private Double minCapacity;

/**
* Resource tags.
*/
Expand Down Expand Up @@ -400,7 +415,7 @@ public DatabaseUpdate withSourceDatabaseId(String sourceDatabaseId) {
}

/**
* Get the status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling'.
* Get the status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', 'OnlineChangingDwPerformanceTiers'.
*
* @return the status value
*/
Expand Down Expand Up @@ -689,6 +704,46 @@ public Sku currentSku() {
return this.currentSku;
}

/**
* Get time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.
*
* @return the autoPauseDelay value
*/
public Integer autoPauseDelay() {
return this.autoPauseDelay;
}

/**
* Set time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.
*
* @param autoPauseDelay the autoPauseDelay value to set
* @return the DatabaseUpdate object itself.
*/
public DatabaseUpdate withAutoPauseDelay(Integer autoPauseDelay) {
this.autoPauseDelay = autoPauseDelay;
return this;
}

/**
* Get minimal capacity that database will always have allocated, if not paused.
*
* @return the minCapacity value
*/
public Double minCapacity() {
return this.minCapacity;
}

/**
* Set minimal capacity that database will always have allocated, if not paused.
*
* @param minCapacity the minCapacity value to set
* @return the DatabaseUpdate object itself.
*/
public DatabaseUpdate withMinCapacity(Double minCapacity) {
this.minCapacity = minCapacity;
return this;
}

/**
* Get resource tags.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ interface WithPerDatabaseSettings {
interface WithSku {
/**
* Specifies sku.
* @param sku the sku parameter value
* @param sku The elastic pool SKU.
The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command:
```azurecli
az sql elastic-pool list-editions -l &lt;location&gt; -o table
````
* @return the next definition stage
*/
WithCreate withSku(Sku sku);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2017_10_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.RecoverableManagedDatabaseInner;
import com.microsoft.azure.arm.model.Indexable;
import com.microsoft.azure.arm.model.Refreshable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.SqlManager;

/**
* Type representing RecoverableManagedDatabase.
*/
public interface RecoverableManagedDatabase extends HasInner<RecoverableManagedDatabaseInner>, Indexable, Refreshable<RecoverableManagedDatabase>, HasManager<SqlManager> {
/**
* @return the id value.
*/
String id();

/**
* @return the lastAvailableBackupDate value.
*/
String lastAvailableBackupDate();

/**
* @return the name value.
*/
String name();

/**
* @return the type value.
*/
String type();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2017_10_01_preview;

import rx.Observable;
import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.RecoverableManagedDatabasesInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing RecoverableManagedDatabases.
*/
public interface RecoverableManagedDatabases extends HasInner<RecoverableManagedDatabasesInner> {
/**
* Gets a recoverable managed database.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param managedInstanceName The name of the managed instance.
* @param recoverableDatabaseName the String value
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<RecoverableManagedDatabase> getAsync(String resourceGroupName, String managedInstanceName, String recoverableDatabaseName);

/**
* Gets a list of recoverable managed databases.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param managedInstanceName The name of the managed instance.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<RecoverableManagedDatabase> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName);

}
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ private void resetCreateUpdateParameters() {
this.updateParameter = new DatabaseUpdate();
}

@Override
public Integer autoPauseDelay() {
return this.inner().autoPauseDelay();
}

@Override
public CatalogCollationType catalogCollation() {
return this.inner().catalogCollation();
Expand Down Expand Up @@ -196,6 +201,11 @@ public Long maxSizeBytes() {
return this.inner().maxSizeBytes();
}

@Override
public Double minCapacity() {
return this.inner().minCapacity();
}

@Override
public String name() {
return this.inner().name();
Expand Down Expand Up @@ -284,6 +294,16 @@ public DatabaseImpl withLocation(String location) {
return this;
}

@Override
public DatabaseImpl withAutoPauseDelay(Integer autoPauseDelay) {
if (isInCreateMode()) {
this.inner().withAutoPauseDelay(autoPauseDelay);
} else {
this.updateParameter.withAutoPauseDelay(autoPauseDelay);
}
return this;
}

@Override
public DatabaseImpl withCatalogCollation(CatalogCollationType catalogCollation) {
if (isInCreateMode()) {
Expand Down Expand Up @@ -354,6 +374,16 @@ public DatabaseImpl withMaxSizeBytes(Long maxSizeBytes) {
return this;
}

@Override
public DatabaseImpl withMinCapacity(Double minCapacity) {
if (isInCreateMode()) {
this.inner().withMinCapacity(minCapacity);
} else {
this.updateParameter.withMinCapacity(minCapacity);
}
return this;
}

@Override
public DatabaseImpl withReadScale(DatabaseReadScale readScale) {
if (isInCreateMode()) {
Expand Down
Loading