diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/pom.xml b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/pom.xml
index b1ca95bfd516b..87487bc55f683 100644
--- a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/pom.xml
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/pom.xml
@@ -11,8 +11,8 @@
com.microsoft.azure
azure-arm-parent
- 1.1.0
- ../../../pom.management.xml
+ 0.0.3-beta
+ ../../../pom.xml
azure-mgmt-sqlvirtualmachine
1.0.0-beta
@@ -71,8 +71,6 @@
azure-arm-client-runtime
test-jar
test
-
- 1.6.5
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SQLStorageSettings.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SQLStorageSettings.java
new file mode 100644
index 0000000000000..75281438eb6ec
--- /dev/null
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SQLStorageSettings.java
@@ -0,0 +1,70 @@
+/**
+ * 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.sqlvirtualmachine.v2017_03_01_preview;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Set disk storage settings for SQL Server.
+ */
+public class SQLStorageSettings {
+ /**
+ * Logical Unit Numbers for the disks.
+ */
+ @JsonProperty(value = "luns")
+ private List luns;
+
+ /**
+ * SQL Server default file path.
+ */
+ @JsonProperty(value = "defaultFilePath")
+ private String defaultFilePath;
+
+ /**
+ * Get logical Unit Numbers for the disks.
+ *
+ * @return the luns value
+ */
+ public List luns() {
+ return this.luns;
+ }
+
+ /**
+ * Set logical Unit Numbers for the disks.
+ *
+ * @param luns the luns value to set
+ * @return the SQLStorageSettings object itself.
+ */
+ public SQLStorageSettings withLuns(List luns) {
+ this.luns = luns;
+ return this;
+ }
+
+ /**
+ * Get sQL Server default file path.
+ *
+ * @return the defaultFilePath value
+ */
+ public String defaultFilePath() {
+ return this.defaultFilePath;
+ }
+
+ /**
+ * Set sQL Server default file path.
+ *
+ * @param defaultFilePath the defaultFilePath value to set
+ * @return the SQLStorageSettings object itself.
+ */
+ public SQLStorageSettings withDefaultFilePath(String defaultFilePath) {
+ this.defaultFilePath = defaultFilePath;
+ return this;
+ }
+
+}
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SqlVirtualMachine.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SqlVirtualMachine.java
index 6ab9c2f4896c0..a8ae398921216 100644
--- a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SqlVirtualMachine.java
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SqlVirtualMachine.java
@@ -9,21 +9,19 @@
package com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview;
import com.microsoft.azure.arm.model.HasInner;
-import com.microsoft.azure.arm.resources.models.Resource;
-import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
-import com.microsoft.azure.arm.resources.models.HasResourceGroup;
-import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.implementation.SqlVirtualMachineInner;
+import com.microsoft.azure.arm.model.Indexable;
import com.microsoft.azure.arm.model.Updatable;
import com.microsoft.azure.arm.model.Appliable;
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.implementation.SqlVirtualMachineManager;
-import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.implementation.SqlVirtualMachineInner;
+import java.util.Map;
/**
* Type representing SqlVirtualMachine.
*/
-public interface SqlVirtualMachine extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+public interface SqlVirtualMachine extends HasInner, Indexable, Updatable, HasManager {
/**
* @return the autoBackupSettings value.
*/
@@ -34,6 +32,11 @@ public interface SqlVirtualMachine extends HasInner, Res
*/
AutoPatchingSettings autoPatchingSettings();
+ /**
+ * @return the id value.
+ */
+ String id();
+
/**
* @return the identity value.
*/
@@ -44,6 +47,16 @@ public interface SqlVirtualMachine extends HasInner, Res
*/
KeyVaultCredentialSettings keyVaultCredentialSettings();
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
/**
* @return the provisioningState value.
*/
@@ -79,6 +92,21 @@ public interface SqlVirtualMachine extends HasInner, Res
*/
String sqlVirtualMachineGroupResourceId();
+ /**
+ * @return the storageConfigurationSettings value.
+ */
+ StorageConfigurationSettings storageConfigurationSettings();
+
+ /**
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
/**
* @return the virtualMachineResourceId value.
*/
@@ -92,7 +120,7 @@ public interface SqlVirtualMachine extends HasInner, Res
/**
* The entirety of the SqlVirtualMachine definition.
*/
- interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate {
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSqlVirtualMachineGroup, DefinitionStages.WithLocation, DefinitionStages.WithCreate {
}
/**
@@ -102,13 +130,31 @@ interface DefinitionStages {
/**
* The first stage of a SqlVirtualMachine definition.
*/
- interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ interface Blank extends WithSqlVirtualMachineGroup {
}
/**
- * The stage of the SqlVirtualMachine definition allowing to specify the resource group.
+ * The stage of the sqlvirtualmachine definition allowing to specify SqlVirtualMachineGroup.
*/
- interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ interface WithSqlVirtualMachineGroup {
+ /**
+ * Specifies resourceGroupName.
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @return the next definition stage
+ */
+ WithLocation withExistingSqlVirtualMachineGroup(String resourceGroupName);
+ }
+
+ /**
+ * The stage of the sqlvirtualmachine definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ * @param location Resource location
+ * @return the next definition stage
+ */
+ WithCreate withLocation(String location);
}
/**
@@ -231,6 +277,30 @@ interface WithSqlVirtualMachineGroupResourceId {
WithCreate withSqlVirtualMachineGroupResourceId(String sqlVirtualMachineGroupResourceId);
}
+ /**
+ * The stage of the sqlvirtualmachine definition allowing to specify StorageConfigurationSettings.
+ */
+ interface WithStorageConfigurationSettings {
+ /**
+ * Specifies storageConfigurationSettings.
+ * @param storageConfigurationSettings Storage Configuration Settings
+ * @return the next definition stage
+ */
+ WithCreate withStorageConfigurationSettings(StorageConfigurationSettings storageConfigurationSettings);
+ }
+
+ /**
+ * The stage of the sqlvirtualmachine definition allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next definition stage
+ */
+ WithCreate withTags(Map tags);
+ }
+
/**
* The stage of the sqlvirtualmachine definition allowing to specify VirtualMachineResourceId.
*/
@@ -260,13 +330,13 @@ interface WithWsfcDomainCredentials {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
- interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAutoBackupSettings, DefinitionStages.WithAutoPatchingSettings, DefinitionStages.WithIdentity, DefinitionStages.WithKeyVaultCredentialSettings, DefinitionStages.WithServerConfigurationsManagementSettings, DefinitionStages.WithSqlImageOffer, DefinitionStages.WithSqlImageSku, DefinitionStages.WithSqlManagement, DefinitionStages.WithSqlServerLicenseType, DefinitionStages.WithSqlVirtualMachineGroupResourceId, DefinitionStages.WithVirtualMachineResourceId, DefinitionStages.WithWsfcDomainCredentials {
+ interface WithCreate extends Creatable, DefinitionStages.WithAutoBackupSettings, DefinitionStages.WithAutoPatchingSettings, DefinitionStages.WithIdentity, DefinitionStages.WithKeyVaultCredentialSettings, DefinitionStages.WithServerConfigurationsManagementSettings, DefinitionStages.WithSqlImageOffer, DefinitionStages.WithSqlImageSku, DefinitionStages.WithSqlManagement, DefinitionStages.WithSqlServerLicenseType, DefinitionStages.WithSqlVirtualMachineGroupResourceId, DefinitionStages.WithStorageConfigurationSettings, DefinitionStages.WithTags, DefinitionStages.WithVirtualMachineResourceId, DefinitionStages.WithWsfcDomainCredentials {
}
}
/**
* The template for a SqlVirtualMachine update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAutoBackupSettings, UpdateStages.WithAutoPatchingSettings, UpdateStages.WithIdentity, UpdateStages.WithKeyVaultCredentialSettings, UpdateStages.WithServerConfigurationsManagementSettings, UpdateStages.WithSqlImageOffer, UpdateStages.WithSqlImageSku, UpdateStages.WithSqlManagement, UpdateStages.WithSqlServerLicenseType, UpdateStages.WithSqlVirtualMachineGroupResourceId, UpdateStages.WithVirtualMachineResourceId, UpdateStages.WithWsfcDomainCredentials {
+ interface Update extends Appliable, UpdateStages.WithAutoBackupSettings, UpdateStages.WithAutoPatchingSettings, UpdateStages.WithIdentity, UpdateStages.WithKeyVaultCredentialSettings, UpdateStages.WithServerConfigurationsManagementSettings, UpdateStages.WithSqlImageOffer, UpdateStages.WithSqlImageSku, UpdateStages.WithSqlManagement, UpdateStages.WithSqlServerLicenseType, UpdateStages.WithSqlVirtualMachineGroupResourceId, UpdateStages.WithStorageConfigurationSettings, UpdateStages.WithTags, UpdateStages.WithVirtualMachineResourceId, UpdateStages.WithWsfcDomainCredentials {
}
/**
@@ -393,6 +463,30 @@ interface WithSqlVirtualMachineGroupResourceId {
Update withSqlVirtualMachineGroupResourceId(String sqlVirtualMachineGroupResourceId);
}
+ /**
+ * The stage of the sqlvirtualmachine update allowing to specify StorageConfigurationSettings.
+ */
+ interface WithStorageConfigurationSettings {
+ /**
+ * Specifies storageConfigurationSettings.
+ * @param storageConfigurationSettings Storage Configuration Settings
+ * @return the next update stage
+ */
+ Update withStorageConfigurationSettings(StorageConfigurationSettings storageConfigurationSettings);
+ }
+
+ /**
+ * The stage of the sqlvirtualmachine update allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
+ */
+ Update withTags(Map tags);
+ }
+
/**
* The stage of the sqlvirtualmachine update allowing to specify VirtualMachineResourceId.
*/
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SqlVirtualMachines.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SqlVirtualMachines.java
index 359f32a3574a4..fa09ae5c0de0a 100644
--- a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SqlVirtualMachines.java
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/SqlVirtualMachines.java
@@ -9,17 +9,60 @@
package com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview;
import com.microsoft.azure.arm.collection.SupportsCreating;
-import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup;
-import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion;
-import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup;
import rx.Observable;
-import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
-import com.microsoft.azure.arm.collection.SupportsListing;
+import rx.Completable;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.implementation.SqlVirtualMachinesInner;
import com.microsoft.azure.arm.model.HasInner;
/**
* Type representing SqlVirtualMachines.
*/
-public interface SqlVirtualMachines extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+public interface SqlVirtualMachines extends SupportsCreating, HasInner {
+ /**
+ * Gets a SQL virtual machine.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByResourceGroupAsync(String resourceGroupName, String sqlVirtualMachineName);
+
+ /**
+ * Deletes a SQL virtual machine.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String sqlVirtualMachineName);
+
+ /**
+ * Gets all SQL virtual machines in a subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+ /**
+ * Gets all SQL virtual machines in a resource group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceGroupAsync(final String resourceGroupName);
+
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listBySqlVmGroupAsync(final String resourceGroupName, final String sqlVirtualMachineGroupName);
+
}
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/StorageConfigurationSettings.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/StorageConfigurationSettings.java
new file mode 100644
index 0000000000000..12dbf1a0bc2cf
--- /dev/null
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/StorageConfigurationSettings.java
@@ -0,0 +1,148 @@
+/**
+ * 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.sqlvirtualmachine.v2017_03_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Storage Configurations for SQL Data, Log and TempDb.
+ */
+public class StorageConfigurationSettings {
+ /**
+ * SQL Server Data Storage Settings.
+ */
+ @JsonProperty(value = "sqlDataSettings")
+ private SQLStorageSettings sqlDataSettings;
+
+ /**
+ * SQL Server Log Storage Settings.
+ */
+ @JsonProperty(value = "sqlLogSettings")
+ private SQLStorageSettings sqlLogSettings;
+
+ /**
+ * SQL Server TempDb Storage Settings.
+ */
+ @JsonProperty(value = "sqlTempDbSettings")
+ private SQLStorageSettings sqlTempDbSettings;
+
+ /**
+ * Disk configuration to apply to SQL Server. Possible values include:
+ * 'NEW', 'EXTEND', 'ADD'.
+ */
+ @JsonProperty(value = "diskConfigurationType")
+ private DiskConfigurationType diskConfigurationType;
+
+ /**
+ * Storage workload type. Possible values include: 'GENERAL', 'OLTP', 'DW'.
+ */
+ @JsonProperty(value = "storageWorkloadType")
+ private StorageWorkloadType storageWorkloadType;
+
+ /**
+ * Get sQL Server Data Storage Settings.
+ *
+ * @return the sqlDataSettings value
+ */
+ public SQLStorageSettings sqlDataSettings() {
+ return this.sqlDataSettings;
+ }
+
+ /**
+ * Set sQL Server Data Storage Settings.
+ *
+ * @param sqlDataSettings the sqlDataSettings value to set
+ * @return the StorageConfigurationSettings object itself.
+ */
+ public StorageConfigurationSettings withSqlDataSettings(SQLStorageSettings sqlDataSettings) {
+ this.sqlDataSettings = sqlDataSettings;
+ return this;
+ }
+
+ /**
+ * Get sQL Server Log Storage Settings.
+ *
+ * @return the sqlLogSettings value
+ */
+ public SQLStorageSettings sqlLogSettings() {
+ return this.sqlLogSettings;
+ }
+
+ /**
+ * Set sQL Server Log Storage Settings.
+ *
+ * @param sqlLogSettings the sqlLogSettings value to set
+ * @return the StorageConfigurationSettings object itself.
+ */
+ public StorageConfigurationSettings withSqlLogSettings(SQLStorageSettings sqlLogSettings) {
+ this.sqlLogSettings = sqlLogSettings;
+ return this;
+ }
+
+ /**
+ * Get sQL Server TempDb Storage Settings.
+ *
+ * @return the sqlTempDbSettings value
+ */
+ public SQLStorageSettings sqlTempDbSettings() {
+ return this.sqlTempDbSettings;
+ }
+
+ /**
+ * Set sQL Server TempDb Storage Settings.
+ *
+ * @param sqlTempDbSettings the sqlTempDbSettings value to set
+ * @return the StorageConfigurationSettings object itself.
+ */
+ public StorageConfigurationSettings withSqlTempDbSettings(SQLStorageSettings sqlTempDbSettings) {
+ this.sqlTempDbSettings = sqlTempDbSettings;
+ return this;
+ }
+
+ /**
+ * Get disk configuration to apply to SQL Server. Possible values include: 'NEW', 'EXTEND', 'ADD'.
+ *
+ * @return the diskConfigurationType value
+ */
+ public DiskConfigurationType diskConfigurationType() {
+ return this.diskConfigurationType;
+ }
+
+ /**
+ * Set disk configuration to apply to SQL Server. Possible values include: 'NEW', 'EXTEND', 'ADD'.
+ *
+ * @param diskConfigurationType the diskConfigurationType value to set
+ * @return the StorageConfigurationSettings object itself.
+ */
+ public StorageConfigurationSettings withDiskConfigurationType(DiskConfigurationType diskConfigurationType) {
+ this.diskConfigurationType = diskConfigurationType;
+ return this;
+ }
+
+ /**
+ * Get storage workload type. Possible values include: 'GENERAL', 'OLTP', 'DW'.
+ *
+ * @return the storageWorkloadType value
+ */
+ public StorageWorkloadType storageWorkloadType() {
+ return this.storageWorkloadType;
+ }
+
+ /**
+ * Set storage workload type. Possible values include: 'GENERAL', 'OLTP', 'DW'.
+ *
+ * @param storageWorkloadType the storageWorkloadType value to set
+ * @return the StorageConfigurationSettings object itself.
+ */
+ public StorageConfigurationSettings withStorageWorkloadType(StorageWorkloadType storageWorkloadType) {
+ this.storageWorkloadType = storageWorkloadType;
+ return this;
+ }
+
+}
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/StorageWorkloadType.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/StorageWorkloadType.java
new file mode 100644
index 0000000000000..f8dade4585665
--- /dev/null
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/StorageWorkloadType.java
@@ -0,0 +1,44 @@
+/**
+ * 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.sqlvirtualmachine.v2017_03_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for StorageWorkloadType.
+ */
+public final class StorageWorkloadType extends ExpandableStringEnum {
+ /** Static value GENERAL for StorageWorkloadType. */
+ public static final StorageWorkloadType GENERAL = fromString("GENERAL");
+
+ /** Static value OLTP for StorageWorkloadType. */
+ public static final StorageWorkloadType OLTP = fromString("OLTP");
+
+ /** Static value DW for StorageWorkloadType. */
+ public static final StorageWorkloadType DW = fromString("DW");
+
+ /**
+ * Creates or finds a StorageWorkloadType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding StorageWorkloadType
+ */
+ @JsonCreator
+ public static StorageWorkloadType fromString(String name) {
+ return fromString(name, StorageWorkloadType.class);
+ }
+
+ /**
+ * @return known StorageWorkloadType values
+ */
+ public static Collection values() {
+ return values(StorageWorkloadType.class);
+ }
+}
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/AvailabilityGroupListenersImpl.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/AvailabilityGroupListenersImpl.java
index c0b696454bcbe..7355fb70aa776 100644
--- a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/AvailabilityGroupListenersImpl.java
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/AvailabilityGroupListenersImpl.java
@@ -64,14 +64,10 @@ public AvailabilityGroupListener call(AvailabilityGroupListenerInner inner) {
public Observable getAsync(String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
AvailabilityGroupListenersInner client = this.inner();
return client.getAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName)
- .flatMap(new Func1>() {
+ .map(new Func1() {
@Override
- public Observable call(AvailabilityGroupListenerInner inner) {
- if (inner == null) {
- return Observable.empty();
- } else {
- return Observable.just((AvailabilityGroupListener)wrapModel(inner));
- }
+ public AvailabilityGroupListener call(AvailabilityGroupListenerInner inner) {
+ return wrapModel(inner);
}
});
}
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachineImpl.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachineImpl.java
index 6cbd713dff1b3..fc8c85ce4ed86 100644
--- a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachineImpl.java
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachineImpl.java
@@ -8,9 +8,10 @@
package com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.implementation;
-import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlVirtualMachine;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
import rx.Observable;
+import java.util.Map;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.ResourceIdentity;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlServerLicenseType;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlManagementMode;
@@ -20,30 +21,55 @@
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.AutoBackupSettings;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.KeyVaultCredentialSettings;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.ServerConfigurationsManagementSettings;
+import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.StorageConfigurationSettings;
+
+class SqlVirtualMachineImpl extends CreatableUpdatableImpl implements SqlVirtualMachine, SqlVirtualMachine.Definition, SqlVirtualMachine.Update {
+ private final SqlVirtualMachineManager manager;
+ private String resourceGroupName;
+ private String sqlVirtualMachineName;
+
+ SqlVirtualMachineImpl(String name, SqlVirtualMachineManager manager) {
+ super(name, new SqlVirtualMachineInner());
+ this.manager = manager;
+ // Set resource name
+ this.sqlVirtualMachineName = name;
+ //
+ }
-class SqlVirtualMachineImpl extends GroupableResourceCoreImpl implements SqlVirtualMachine, SqlVirtualMachine.Definition, SqlVirtualMachine.Update {
- SqlVirtualMachineImpl(String name, SqlVirtualMachineInner inner, SqlVirtualMachineManager manager) {
- super(name, inner, manager);
+ SqlVirtualMachineImpl(SqlVirtualMachineInner inner, SqlVirtualMachineManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.sqlVirtualMachineName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.sqlVirtualMachineName = IdParsingUtils.getValueFromIdByName(inner.id(), "sqlVirtualMachines");
+ //
+ }
+
+ @Override
+ public SqlVirtualMachineManager manager() {
+ return this.manager;
}
@Override
public Observable createResourceAsync() {
SqlVirtualMachinesInner client = this.manager().inner().sqlVirtualMachines();
- return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner())
+ return client.createOrUpdateAsync(this.resourceGroupName, this.sqlVirtualMachineName, this.inner())
.map(innerToFluentMap(this));
}
@Override
public Observable updateResourceAsync() {
SqlVirtualMachinesInner client = this.manager().inner().sqlVirtualMachines();
- return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner())
+ return client.createOrUpdateAsync(this.resourceGroupName, this.sqlVirtualMachineName, this.inner())
.map(innerToFluentMap(this));
}
@Override
protected Observable getInnerAsync() {
SqlVirtualMachinesInner client = this.manager().inner().sqlVirtualMachines();
- return client.getByResourceGroupAsync(this.resourceGroupName(), this.name());
+ return null; // NOP getInnerAsync implementation as get is not supported
}
@Override
@@ -62,6 +88,11 @@ public AutoPatchingSettings autoPatchingSettings() {
return this.inner().autoPatchingSettings();
}
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
@Override
public ResourceIdentity identity() {
return this.inner().identity();
@@ -72,6 +103,16 @@ public KeyVaultCredentialSettings keyVaultCredentialSettings() {
return this.inner().keyVaultCredentialSettings();
}
+ @Override
+ public String location() {
+ return this.inner().location();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
@Override
public String provisioningState() {
return this.inner().provisioningState();
@@ -107,6 +148,21 @@ public String sqlVirtualMachineGroupResourceId() {
return this.inner().sqlVirtualMachineGroupResourceId();
}
+ @Override
+ public StorageConfigurationSettings storageConfigurationSettings() {
+ return this.inner().storageConfigurationSettings();
+ }
+
+ @Override
+ public Map tags() {
+ return this.inner().getTags();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
@Override
public String virtualMachineResourceId() {
return this.inner().virtualMachineResourceId();
@@ -117,6 +173,18 @@ public WsfcDomainCredentials wsfcDomainCredentials() {
return this.inner().wsfcDomainCredentials();
}
+ @Override
+ public SqlVirtualMachineImpl withExistingSqlVirtualMachineGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ @Override
+ public SqlVirtualMachineImpl withLocation(String location) {
+ this.inner().withLocation(location);
+ return this;
+ }
+
@Override
public SqlVirtualMachineImpl withAutoBackupSettings(AutoBackupSettings autoBackupSettings) {
this.inner().withAutoBackupSettings(autoBackupSettings);
@@ -177,6 +245,18 @@ public SqlVirtualMachineImpl withSqlVirtualMachineGroupResourceId(String sqlVirt
return this;
}
+ @Override
+ public SqlVirtualMachineImpl withStorageConfigurationSettings(StorageConfigurationSettings storageConfigurationSettings) {
+ this.inner().withStorageConfigurationSettings(storageConfigurationSettings);
+ return this;
+ }
+
+ @Override
+ public SqlVirtualMachineImpl withTags(Map tags) {
+ this.inner().withTags(tags);
+ return this;
+ }
+
@Override
public SqlVirtualMachineImpl withVirtualMachineResourceId(String virtualMachineResourceId) {
this.inner().withVirtualMachineResourceId(virtualMachineResourceId);
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachineInner.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachineInner.java
index 7448ec5c2ab64..9d7df34f21ef3 100644
--- a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachineInner.java
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachineInner.java
@@ -17,6 +17,7 @@
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.AutoBackupSettings;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.KeyVaultCredentialSettings;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.ServerConfigurationsManagementSettings;
+import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.StorageConfigurationSettings;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.Resource;
@@ -110,6 +111,12 @@ public class SqlVirtualMachineInner extends Resource {
@JsonProperty(value = "properties.serverConfigurationsManagementSettings")
private ServerConfigurationsManagementSettings serverConfigurationsManagementSettings;
+ /**
+ * Storage Configuration Settings.
+ */
+ @JsonProperty(value = "properties.storageConfigurationSettings")
+ private StorageConfigurationSettings storageConfigurationSettings;
+
/**
* Get azure Active Directory identity of the server.
*
@@ -359,4 +366,24 @@ public SqlVirtualMachineInner withServerConfigurationsManagementSettings(ServerC
return this;
}
+ /**
+ * Get storage Configuration Settings.
+ *
+ * @return the storageConfigurationSettings value
+ */
+ public StorageConfigurationSettings storageConfigurationSettings() {
+ return this.storageConfigurationSettings;
+ }
+
+ /**
+ * Set storage Configuration Settings.
+ *
+ * @param storageConfigurationSettings the storageConfigurationSettings value to set
+ * @return the SqlVirtualMachineInner object itself.
+ */
+ public SqlVirtualMachineInner withStorageConfigurationSettings(StorageConfigurationSettings storageConfigurationSettings) {
+ this.storageConfigurationSettings = storageConfigurationSettings;
+ return this;
+ }
+
}
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachinesImpl.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachinesImpl.java
index 626f62da62535..95e9237168e84 100644
--- a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachinesImpl.java
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachinesImpl.java
@@ -4,84 +4,66 @@
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * def
+ *
*/
package com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.implementation;
-import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlVirtualMachines;
-import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlVirtualMachine;
import rx.Observable;
-import rx.Completable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import com.microsoft.azure.arm.resources.ResourceUtilsCore;
-import com.microsoft.azure.arm.utils.RXMapper;
import rx.functions.Func1;
-import com.microsoft.azure.PagedList;
import com.microsoft.azure.Page;
+import rx.Completable;
+import com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlVirtualMachine;
-class SqlVirtualMachinesImpl extends GroupableResourcesCoreImpl implements SqlVirtualMachines {
- protected SqlVirtualMachinesImpl(SqlVirtualMachineManager manager) {
- super(manager.inner().sqlVirtualMachines(), manager);
- }
+class SqlVirtualMachinesImpl extends WrapperImpl implements SqlVirtualMachines {
+ private final SqlVirtualMachineManager manager;
- @Override
- protected Observable getInnerAsync(String resourceGroupName, String name) {
- SqlVirtualMachinesInner client = this.inner();
- return client.getByResourceGroupAsync(resourceGroupName, name);
+ SqlVirtualMachinesImpl(SqlVirtualMachineManager manager) {
+ super(manager.inner().sqlVirtualMachines());
+ this.manager = manager;
}
- @Override
- protected Completable deleteInnerAsync(String resourceGroupName, String name) {
- SqlVirtualMachinesInner client = this.inner();
- return client.deleteAsync(resourceGroupName, name).toCompletable();
+ public SqlVirtualMachineManager manager() {
+ return this.manager;
}
@Override
- public Observable deleteByIdsAsync(Collection ids) {
- if (ids == null || ids.isEmpty()) {
- return Observable.empty();
- }
- Collection> observables = new ArrayList<>();
- for (String id : ids) {
- final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id);
- final String name = ResourceUtilsCore.nameFromResourceId(id);
- Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id);
- observables.add(o);
- }
- return Observable.mergeDelayError(observables);
+ public SqlVirtualMachineImpl define(String name) {
+ return wrapModel(name);
}
- @Override
- public Observable deleteByIdsAsync(String...ids) {
- return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids)));
+ private SqlVirtualMachineImpl wrapModel(SqlVirtualMachineInner inner) {
+ return new SqlVirtualMachineImpl(inner, manager());
}
- @Override
- public void deleteByIds(Collection ids) {
- if (ids != null && !ids.isEmpty()) {
- this.deleteByIdsAsync(ids).toBlocking().last();
- }
+ private SqlVirtualMachineImpl wrapModel(String name) {
+ return new SqlVirtualMachineImpl(name, this.manager());
}
@Override
- public void deleteByIds(String...ids) {
- this.deleteByIds(new ArrayList(Arrays.asList(ids)));
+ public Observable getByResourceGroupAsync(String resourceGroupName, String sqlVirtualMachineName) {
+ SqlVirtualMachinesInner client = this.inner();
+ return client.getByResourceGroupAsync(resourceGroupName, sqlVirtualMachineName)
+ .map(new Func1() {
+ @Override
+ public SqlVirtualMachine call(SqlVirtualMachineInner inner) {
+ return new SqlVirtualMachineImpl(inner, manager());
+ }
+ });
}
@Override
- public PagedList listByResourceGroup(String resourceGroupName) {
+ public Completable deleteAsync(String resourceGroupName, String sqlVirtualMachineName) {
SqlVirtualMachinesInner client = this.inner();
- return this.wrapList(client.listByResourceGroup(resourceGroupName));
+ return client.deleteAsync(resourceGroupName, sqlVirtualMachineName).toCompletable();
}
@Override
- public Observable listByResourceGroupAsync(String resourceGroupName) {
+ public Observable listAsync() {
SqlVirtualMachinesInner client = this.inner();
- return client.listByResourceGroupAsync(resourceGroupName)
+ return client.listAsync()
.flatMapIterable(new Func1, Iterable>() {
@Override
public Iterable call(Page page) {
@@ -91,21 +73,33 @@ public Iterable call(Page page)
.map(new Func1() {
@Override
public SqlVirtualMachine call(SqlVirtualMachineInner inner) {
- return wrapModel(inner);
+ return new SqlVirtualMachineImpl(inner, manager());
}
});
}
@Override
- public PagedList list() {
+ public Observable listByResourceGroupAsync(final String resourceGroupName) {
SqlVirtualMachinesInner client = this.inner();
- return this.wrapList(client.list());
+ return client.listByResourceGroupAsync(resourceGroupName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public SqlVirtualMachine call(SqlVirtualMachineInner inner) {
+ return new SqlVirtualMachineImpl(inner, manager());
+ }
+ });
}
@Override
- public Observable listAsync() {
+ public Observable listBySqlVmGroupAsync(final String resourceGroupName, final String sqlVirtualMachineGroupName) {
SqlVirtualMachinesInner client = this.inner();
- return client.listAsync()
+ return client.listBySqlVmGroupAsync(resourceGroupName, sqlVirtualMachineGroupName)
.flatMapIterable(new Func1, Iterable>() {
@Override
public Iterable call(Page page) {
@@ -120,19 +114,4 @@ public SqlVirtualMachine call(SqlVirtualMachineInner inner) {
});
}
- @Override
- public SqlVirtualMachineImpl define(String name) {
- return wrapModel(name);
- }
-
- @Override
- protected SqlVirtualMachineImpl wrapModel(SqlVirtualMachineInner inner) {
- return new SqlVirtualMachineImpl(inner.name(), inner, manager());
- }
-
- @Override
- protected SqlVirtualMachineImpl wrapModel(String name) {
- return new SqlVirtualMachineImpl(name, new SqlVirtualMachineInner(), this.manager());
- }
-
}
diff --git a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachinesInner.java b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachinesInner.java
index 3cac074ce5941..10616389f1594 100644
--- a/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachinesInner.java
+++ b/sqlvirtualmachine/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachinesInner.java
@@ -67,6 +67,10 @@ public SqlVirtualMachinesInner(Retrofit retrofit, SqlVirtualMachineManagementCli
* used by Retrofit to perform actually REST calls.
*/
interface SqlVirtualMachinesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlVirtualMachines listBySqlVmGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines")
+ Observable> listBySqlVmGroup(@Path("resourceGroupName") String resourceGroupName, @Path("sqlVirtualMachineGroupName") String sqlVirtualMachineGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlVirtualMachines list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines")
Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -103,6 +107,10 @@ interface SqlVirtualMachinesService {
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines")
Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlVirtualMachines listBySqlVmGroupNext" })
+ @GET
+ Observable> listBySqlVmGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sqlvirtualmachine.v2017_03_01_preview.SqlVirtualMachines listNext" })
@GET
Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -113,6 +121,129 @@ interface SqlVirtualMachinesService {
}
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<SqlVirtualMachineInner> object if successful.
+ */
+ public PagedList listBySqlVmGroup(final String resourceGroupName, final String sqlVirtualMachineGroupName) {
+ ServiceResponse> response = listBySqlVmGroupSinglePageAsync(resourceGroupName, sqlVirtualMachineGroupName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listBySqlVmGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listBySqlVmGroupAsync(final String resourceGroupName, final String sqlVirtualMachineGroupName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listBySqlVmGroupSinglePageAsync(resourceGroupName, sqlVirtualMachineGroupName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listBySqlVmGroupNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<SqlVirtualMachineInner> object
+ */
+ public Observable> listBySqlVmGroupAsync(final String resourceGroupName, final String sqlVirtualMachineGroupName) {
+ return listBySqlVmGroupWithServiceResponseAsync(resourceGroupName, sqlVirtualMachineGroupName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<SqlVirtualMachineInner> object
+ */
+ public Observable>> listBySqlVmGroupWithServiceResponseAsync(final String resourceGroupName, final String sqlVirtualMachineGroupName) {
+ return listBySqlVmGroupSinglePageAsync(resourceGroupName, sqlVirtualMachineGroupName)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listBySqlVmGroupNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ ServiceResponse> * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ ServiceResponse> * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<SqlVirtualMachineInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listBySqlVmGroupSinglePageAsync(final String resourceGroupName, final String sqlVirtualMachineGroupName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (sqlVirtualMachineGroupName == null) {
+ throw new IllegalArgumentException("Parameter sqlVirtualMachineGroupName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listBySqlVmGroupDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listBySqlVmGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
/**
* Gets all SQL virtual machines in a subscription.
*
@@ -1154,6 +1285,117 @@ private ServiceResponse> listByResourceGroupDel
.build(response);
}
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<SqlVirtualMachineInner> object if successful.
+ */
+ public PagedList listBySqlVmGroupNext(final String nextPageLink) {
+ ServiceResponse> response = listBySqlVmGroupNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listBySqlVmGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listBySqlVmGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listBySqlVmGroupNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listBySqlVmGroupNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<SqlVirtualMachineInner> object
+ */
+ public Observable> listBySqlVmGroupNextAsync(final String nextPageLink) {
+ return listBySqlVmGroupNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<SqlVirtualMachineInner> object
+ */
+ public Observable>> listBySqlVmGroupNextWithServiceResponseAsync(final String nextPageLink) {
+ return listBySqlVmGroupNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listBySqlVmGroupNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<SqlVirtualMachineInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listBySqlVmGroupNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listBySqlVmGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listBySqlVmGroupNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listBySqlVmGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
/**
* Gets all SQL virtual machines in a subscription.
*