From 6179601cef308c55ea8ce17536aecaaae3f1d9e9 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 25 Apr 2019 17:40:59 +0000 Subject: [PATCH] Generated from 77bc40991e914b8cb6c2e560fec6431e50456b42 Add minCapacity param to 2017-01-01-preview database --- .../sql/v2017_10_01_preview/Database.java | 54 ++++++++++++++++++- .../v2017_10_01_preview/DatabaseUpdate.java | 54 +++++++++++++++++++ .../implementation/DatabaseImpl.java | 30 +++++++++++ .../implementation/DatabaseInner.java | 54 +++++++++++++++++++ 4 files changed, 190 insertions(+), 2 deletions(-) diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/Database.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/Database.java index 67c6cc9fd40b0..9fcff5e88a160 100644 --- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/Database.java +++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/Database.java @@ -25,6 +25,11 @@ * Type representing Database. */ public interface Database extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the autoPauseDelay value. + */ + Integer autoPauseDelay(); + /** * @return the catalogCollation value. */ @@ -120,6 +125,11 @@ public interface Database extends HasInner, Indexable, Refreshabl */ Long maxSizeBytes(); + /** + * @return the minCapacity value. + */ + Double minCapacity(); + /** * @return the name value. */ @@ -231,6 +241,16 @@ interface WithLocation { WithCreate withLocation(String location); } + /** + * The stage of the database definition allowing to specify AutoPauseDelay. + */ + interface WithAutoPauseDelay { + /** + * Specifies autoPauseDelay. + */ + WithCreate withAutoPauseDelay(Integer autoPauseDelay); + } + /** * The stage of the database definition allowing to specify CatalogCollation. */ @@ -301,6 +321,16 @@ interface WithMaxSizeBytes { WithCreate withMaxSizeBytes(Long maxSizeBytes); } + /** + * The stage of the database definition allowing to specify MinCapacity. + */ + interface WithMinCapacity { + /** + * Specifies minCapacity. + */ + WithCreate withMinCapacity(Double minCapacity); + } + /** * The stage of the database definition allowing to specify ReadScale. */ @@ -416,19 +446,29 @@ 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, 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, 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, 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, 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. + */ + Update withAutoPauseDelay(Integer autoPauseDelay); + } + /** * The stage of the database update allowing to specify CatalogCollation. */ @@ -499,6 +539,16 @@ interface WithMaxSizeBytes { Update withMaxSizeBytes(Long maxSizeBytes); } + /** + * The stage of the database update allowing to specify MinCapacity. + */ + interface WithMinCapacity { + /** + * Specifies minCapacity. + */ + Update withMinCapacity(Double minCapacity); + } + /** * The stage of the database update allowing to specify ReadScale. */ diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseUpdate.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseUpdate.java index eafe8ef45060a..42b1e825cc953 100644 --- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseUpdate.java +++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseUpdate.java @@ -237,6 +237,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. */ @@ -689,6 +703,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. * diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseImpl.java index 90eac77d4eb12..119a955b14010 100644 --- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseImpl.java +++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseImpl.java @@ -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(); @@ -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(); @@ -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()) { @@ -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()) { diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseInner.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseInner.java index 9c0e11f49b7f6..7d9760d8e79c8 100644 --- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseInner.java +++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseInner.java @@ -256,6 +256,20 @@ public class DatabaseInner extends Resource { @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; + /** * Get the name and tier of the SKU. * @@ -720,4 +734,44 @@ 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 DatabaseInner object itself. + */ + public DatabaseInner 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 DatabaseInner object itself. + */ + public DatabaseInner withMinCapacity(Double minCapacity) { + this.minCapacity = minCapacity; + return this; + } + }