diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/pom.xml b/sdk/mysql/mgmt-v2017_12_01_preview/pom.xml
index 30315c2de470..2dbc51ed2a14 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/pom.xml
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/pom.xml
@@ -11,10 +11,10 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
+ 1.1.0
../../../pom.management.xml
- azure-mgmt-mysql
+ azure-mgmt-dbformysql
1.0.0-beta
jar
Microsoft Azure SDK for DBforMySQL Management
@@ -71,6 +71,8 @@
azure-arm-client-runtime
test-jar
test
+
+ 1.6.5
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Configuration.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Configuration.java
index 0613963a43d8..56cdd28c6a87 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Configuration.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Configuration.java
@@ -16,12 +16,12 @@
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.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
/**
* Type representing Configuration.
*/
-public interface Configuration extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+public interface Configuration extends HasInner, Indexable, Refreshable, Updatable, HasManager {
/**
* @return the allowedValues value.
*/
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Database.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Database.java
index eb42069f17c1..26d3cced0502 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Database.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Database.java
@@ -16,12 +16,12 @@
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.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
/**
* Type representing Database.
*/
-public interface Database extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+public interface Database extends HasInner, Indexable, Refreshable, Updatable, HasManager {
/**
* @return the charset value.
*/
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/FirewallRule.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/FirewallRule.java
index 6b4051bc1a40..bbbd5181704d 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/FirewallRule.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/FirewallRule.java
@@ -16,12 +16,12 @@
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.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
/**
* Type representing FirewallRule.
*/
-public interface FirewallRule extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+public interface FirewallRule extends HasInner, Indexable, Refreshable, Updatable, HasManager {
/**
* @return the endIpAddress value.
*/
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/IdentityType.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/IdentityType.java
new file mode 100644
index 000000000000..a54c95d37269
--- /dev/null
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/IdentityType.java
@@ -0,0 +1,38 @@
+/**
+ * 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.mysql.v2017_12_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for IdentityType.
+ */
+public final class IdentityType extends ExpandableStringEnum {
+ /** Static value SystemAssigned for IdentityType. */
+ public static final IdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned");
+
+ /**
+ * Creates or finds a IdentityType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding IdentityType
+ */
+ @JsonCreator
+ public static IdentityType fromString(String name) {
+ return fromString(name, IdentityType.class);
+ }
+
+ /**
+ * @return known IdentityType values
+ */
+ public static Collection values() {
+ return values(IdentityType.class);
+ }
+}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/LogFile.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/LogFile.java
index 920ac347fe73..90fab84c2da2 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/LogFile.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/LogFile.java
@@ -11,13 +11,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.LogFileInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
import org.joda.time.DateTime;
/**
* Type representing LogFile.
*/
-public interface LogFile extends HasInner, HasManager {
+public interface LogFile extends HasInner, HasManager {
/**
* @return the createdTime value.
*/
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/NameAvailability.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/NameAvailability.java
index 715b44474185..387229f4d19c 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/NameAvailability.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/NameAvailability.java
@@ -10,13 +10,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.NameAvailabilityInner;
/**
* Type representing NameAvailability.
*/
-public interface NameAvailability extends HasInner, HasManager {
+public interface NameAvailability extends HasInner, HasManager {
/**
* @return the message value.
*/
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/OperationListResult.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/OperationListResult.java
index 24485a1ad4fe..0738d0732afc 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/OperationListResult.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/OperationListResult.java
@@ -10,7 +10,7 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.OperationListResultInner;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.OperationInner;
import java.util.List;
@@ -18,7 +18,7 @@
/**
* Type representing OperationListResult.
*/
-public interface OperationListResult extends HasInner, HasManager {
+public interface OperationListResult extends HasInner, HasManager {
/**
* @return the value value.
*/
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PerformanceTierProperties.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PerformanceTierProperties.java
index 1905786c125f..7c173c6a8aea 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PerformanceTierProperties.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PerformanceTierProperties.java
@@ -11,13 +11,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.PerformanceTierPropertiesInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
import java.util.List;
/**
* Type representing PerformanceTierProperties.
*/
-public interface PerformanceTierProperties extends HasInner, HasManager {
+public interface PerformanceTierProperties extends HasInner, HasManager {
/**
* @return the id value.
*/
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ResourceIdentity.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ResourceIdentity.java
new file mode 100644
index 000000000000..06f1f4565dff
--- /dev/null
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ResourceIdentity.java
@@ -0,0 +1,76 @@
+/**
+ * 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.mysql.v2017_12_01_preview;
+
+import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Azure Active Directory identity configuration for a resource.
+ */
+public class ResourceIdentity {
+ /**
+ * The Azure Active Directory principal id.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID principalId;
+
+ /**
+ * The identity type. Set this to 'SystemAssigned' in order to
+ * automatically create and assign an Azure Active Directory principal for
+ * the resource. Possible values include: 'SystemAssigned'.
+ */
+ @JsonProperty(value = "type")
+ private IdentityType type;
+
+ /**
+ * The Azure Active Directory tenant id.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID tenantId;
+
+ /**
+ * Get the Azure Active Directory principal id.
+ *
+ * @return the principalId value
+ */
+ public UUID principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned'.
+ *
+ * @return the type value
+ */
+ public IdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned'.
+ *
+ * @param type the type value to set
+ * @return the ResourceIdentity object itself.
+ */
+ public ResourceIdentity withType(IdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the Azure Active Directory tenant id.
+ *
+ * @return the tenantId value
+ */
+ public UUID tenantId() {
+ return this.tenantId;
+ }
+
+}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Server.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Server.java
index f6aae81db351..76e565e6652c 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Server.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Server.java
@@ -17,14 +17,14 @@
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.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
import org.joda.time.DateTime;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.ServerInner;
/**
* Type representing Server.
*/
-public interface Server extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+public interface Server extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
/**
* @return the administratorLogin value.
*/
@@ -40,6 +40,11 @@ public interface Server extends HasInner, Resource, GroupableResour
*/
String fullyQualifiedDomainName();
+ /**
+ * @return the identity value.
+ */
+ ResourceIdentity identity();
+
/**
* @return the masterServerId value.
*/
@@ -210,7 +215,7 @@ interface WithStorageProfile {
interface WithVersion {
/**
* Specifies version.
- * @param version The version of a server. Possible values include: '5.6', '5.7'
+ * @param version The version of a server. Possible values include: '5.6', '5.7', '8.0'
* @return the next update stage
*/
Update withVersion(ServerVersion version);
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerAdministratorResource.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerAdministratorResource.java
new file mode 100644
index 000000000000..794202fbf3d9
--- /dev/null
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerAdministratorResource.java
@@ -0,0 +1,56 @@
+/**
+ * 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.mysql.v2017_12_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.ServerAdministratorResourceInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
+import java.util.UUID;
+
+/**
+ * Type representing ServerAdministratorResource.
+ */
+public interface ServerAdministratorResource extends HasInner, HasManager {
+ /**
+ * @return the administratorType value.
+ */
+ String administratorType();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the login value.
+ */
+ String login();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the sid value.
+ */
+ UUID sid();
+
+ /**
+ * @return the tenantId value.
+ */
+ UUID tenantId();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerAdministrators.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerAdministrators.java
new file mode 100644
index 000000000000..a4c3ceb06165
--- /dev/null
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerAdministrators.java
@@ -0,0 +1,62 @@
+/**
+ * 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.mysql.v2017_12_01_preview;
+
+import rx.Observable;
+import rx.Completable;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.ServerAdministratorResourceInner;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.ServerAdministratorsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ServerAdministrators.
+ */
+public interface ServerAdministrators extends HasInner {
+ /**
+ * Gets information about a AAD server administrator.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
+ *
+ * @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 serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createOrUpdateAsync(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties);
+
+ /**
+ * Deletes AAD Administrator.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable deleteAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Returns a list of server Administrators.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByServerAsync(String resourceGroupName, String serverName);
+
+}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForCreate.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForCreate.java
index 436a532bdbeb..c981860a84c2 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForCreate.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForCreate.java
@@ -16,7 +16,7 @@
/**
* The properties used to create a new server.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode", defaultImpl = ServerPropertiesForCreate.class)
@JsonTypeName("ServerPropertiesForCreate")
@JsonSubTypes({
@JsonSubTypes.Type(name = "Default", value = ServerPropertiesForDefaultCreate.class),
@@ -26,7 +26,7 @@
})
public class ServerPropertiesForCreate {
/**
- * Server version. Possible values include: '5.6', '5.7'.
+ * Server version. Possible values include: '5.6', '5.7', '8.0'.
*/
@JsonProperty(value = "version")
private ServerVersion version;
@@ -45,7 +45,7 @@ public class ServerPropertiesForCreate {
private StorageProfile storageProfile;
/**
- * Get server version. Possible values include: '5.6', '5.7'.
+ * Get server version. Possible values include: '5.6', '5.7', '8.0'.
*
* @return the version value
*/
@@ -54,7 +54,7 @@ public ServerVersion version() {
}
/**
- * Set server version. Possible values include: '5.6', '5.7'.
+ * Set server version. Possible values include: '5.6', '5.7', '8.0'.
*
* @param version the version value to set
* @return the ServerPropertiesForCreate object itself.
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForDefaultCreate.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForDefaultCreate.java
index 7125666f22d9..2bccf55786b9 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForDefaultCreate.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForDefaultCreate.java
@@ -15,7 +15,7 @@
/**
* The properties used to create a new server.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode", defaultImpl = ServerPropertiesForDefaultCreate.class)
@JsonTypeName("Default")
public class ServerPropertiesForDefaultCreate extends ServerPropertiesForCreate {
/**
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForGeoRestore.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForGeoRestore.java
index 044e00df106d..028f6f801c45 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForGeoRestore.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForGeoRestore.java
@@ -16,7 +16,7 @@
* The properties used to create a new server by restoring to a different
* region from a geo replicated backup.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode", defaultImpl = ServerPropertiesForGeoRestore.class)
@JsonTypeName("GeoRestore")
public class ServerPropertiesForGeoRestore extends ServerPropertiesForCreate {
/**
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForReplica.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForReplica.java
index 3a6f00360581..5e0580cdb495 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForReplica.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForReplica.java
@@ -15,7 +15,7 @@
/**
* The properties to create a new replica.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode", defaultImpl = ServerPropertiesForReplica.class)
@JsonTypeName("Replica")
public class ServerPropertiesForReplica extends ServerPropertiesForCreate {
/**
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForRestore.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForRestore.java
index 0f4bd84d0b17..c249574c73af 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForRestore.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPropertiesForRestore.java
@@ -16,7 +16,7 @@
/**
* The properties used to create a new server by restoring from a backup.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "createMode", defaultImpl = ServerPropertiesForRestore.class)
@JsonTypeName("PointInTimeRestore")
public class ServerPropertiesForRestore extends ServerPropertiesForCreate {
/**
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerSecurityAlertPolicy.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerSecurityAlertPolicy.java
index 2b6d105b782a..1296cd69bf25 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerSecurityAlertPolicy.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerSecurityAlertPolicy.java
@@ -16,13 +16,13 @@
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.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
import java.util.List;
/**
* Type representing ServerSecurityAlertPolicy.
*/
-public interface ServerSecurityAlertPolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+public interface ServerSecurityAlertPolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager {
/**
* @return the disabledAlerts value.
*/
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerServer.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerServer.java
index a279059d198d..0814b9b60ee6 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerServer.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerServer.java
@@ -11,14 +11,14 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.ServerInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
import org.joda.time.DateTime;
import java.util.Map;
/**
* Type representing ServerServer.
*/
-public interface ServerServer extends HasInner, HasManager {
+public interface ServerServer extends HasInner, HasManager {
/**
* @return the administratorLogin value.
*/
@@ -39,6 +39,11 @@ public interface ServerServer extends HasInner, HasManager {
/** Static value 5.7 for ServerVersion. */
public static final ServerVersion FIVE_FULL_STOP_SEVEN = fromString("5.7");
+ /** Static value 8.0 for ServerVersion. */
+ public static final ServerVersion EIGHT_FULL_STOP_ZERO = fromString("8.0");
+
/**
* Creates or finds a ServerVersion from its string representation.
* @param name a name to look for
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/VirtualNetworkRule.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/VirtualNetworkRule.java
index 8d172ecb774e..584000eb625b 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/VirtualNetworkRule.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/VirtualNetworkRule.java
@@ -16,12 +16,12 @@
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.mysql.v2017_12_01_preview.implementation.MySQLManager;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation.DBforMySQLManager;
/**
* Type representing VirtualNetworkRule.
*/
-public interface VirtualNetworkRule extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+public interface VirtualNetworkRule extends HasInner, Indexable, Refreshable, Updatable, HasManager {
/**
* @return the id value.
*/
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/CheckNameAvailabilitysImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/CheckNameAvailabilitysImpl.java
index 1087ffa32e58..654c5ef1ff97 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/CheckNameAvailabilitysImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/CheckNameAvailabilitysImpl.java
@@ -17,14 +17,14 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.NameAvailabilityRequest;
class CheckNameAvailabilitysImpl extends WrapperImpl implements CheckNameAvailabilitys {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- CheckNameAvailabilitysImpl(MySQLManager manager) {
+ CheckNameAvailabilitysImpl(DBforMySQLManager manager) {
super(manager.inner().checkNameAvailabilitys());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ConfigurationImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ConfigurationImpl.java
index 53d1de4f3bf0..ab6f6cefe2cf 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ConfigurationImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ConfigurationImpl.java
@@ -13,12 +13,12 @@
import rx.Observable;
class ConfigurationImpl extends CreatableUpdatableImpl implements Configuration, Configuration.Definition, Configuration.Update {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
private String resourceGroupName;
private String serverName;
private String configurationName;
- ConfigurationImpl(String name, MySQLManager manager) {
+ ConfigurationImpl(String name, DBforMySQLManager manager) {
super(name, new ConfigurationInner());
this.manager = manager;
// Set resource name
@@ -26,7 +26,7 @@ class ConfigurationImpl extends CreatableUpdatableImpl implements Configurations {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- ConfigurationsImpl(MySQLManager manager) {
+ ConfigurationsImpl(DBforMySQLManager manager) {
super(manager.inner().configurations());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
@@ -63,10 +63,14 @@ public Configuration call(ConfigurationInner inner) {
public Observable getAsync(String resourceGroupName, String serverName, String configurationName) {
ConfigurationsInner client = this.inner();
return client.getAsync(resourceGroupName, serverName, configurationName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public Configuration call(ConfigurationInner inner) {
- return wrapModel(inner);
+ public Observable call(ConfigurationInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((Configuration)wrapModel(inner));
+ }
}
});
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DBforMySQLManager.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DBforMySQLManager.java
new file mode 100644
index 000000000000..8785cd32b27c
--- /dev/null
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DBforMySQLManager.java
@@ -0,0 +1,231 @@
+/**
+ * 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.mysql.v2017_12_01_preview.implementation;
+
+import com.microsoft.azure.AzureEnvironment;
+import com.microsoft.azure.AzureResponseBuilder;
+import com.microsoft.azure.credentials.AzureTokenCredentials;
+import com.microsoft.azure.management.apigeneration.Beta;
+import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
+import com.microsoft.azure.arm.resources.AzureConfigurable;
+import com.microsoft.azure.serializer.AzureJacksonAdapter;
+import com.microsoft.rest.RestClient;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.Servers;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.Replicas;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.FirewallRules;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.VirtualNetworkRules;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.Databases;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.Configurations;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.LogFiles;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerAdministrators;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.LocationBasedPerformanceTiers;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.CheckNameAvailabilitys;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerSecurityAlertPolicies;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.Operations;
+import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
+import com.microsoft.azure.arm.resources.implementation.ManagerCore;
+
+/**
+ * Entry point to Azure DBforMySQL resource management.
+ */
+public final class DBforMySQLManager extends ManagerCore {
+ private Servers servers;
+ private Replicas replicas;
+ private FirewallRules firewallRules;
+ private VirtualNetworkRules virtualNetworkRules;
+ private Databases databases;
+ private Configurations configurations;
+ private LogFiles logFiles;
+ private ServerAdministrators serverAdministrators;
+ private LocationBasedPerformanceTiers locationBasedPerformanceTiers;
+ private CheckNameAvailabilitys checkNameAvailabilitys;
+ private ServerSecurityAlertPolicies serverSecurityAlertPolicies;
+ private Operations operations;
+ /**
+ * Get a Configurable instance that can be used to create DBforMySQLManager with optional configuration.
+ *
+ * @return the instance allowing configurations
+ */
+ public static Configurable configure() {
+ return new DBforMySQLManager.ConfigurableImpl();
+ }
+ /**
+ * Creates an instance of DBforMySQLManager that exposes DBforMySQL resource management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the DBforMySQLManager
+ */
+ public static DBforMySQLManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return new DBforMySQLManager(new RestClient.Builder()
+ .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER)
+ .withCredentials(credentials)
+ .withSerializerAdapter(new AzureJacksonAdapter())
+ .withResponseBuilderFactory(new AzureResponseBuilder.Factory())
+ .build(), subscriptionId);
+ }
+ /**
+ * Creates an instance of DBforMySQLManager that exposes DBforMySQL resource management API entry points.
+ *
+ * @param restClient the RestClient to be used for API calls.
+ * @param subscriptionId the subscription UUID
+ * @return the DBforMySQLManager
+ */
+ public static DBforMySQLManager authenticate(RestClient restClient, String subscriptionId) {
+ return new DBforMySQLManager(restClient, subscriptionId);
+ }
+ /**
+ * The interface allowing configurations to be set.
+ */
+ public interface Configurable extends AzureConfigurable {
+ /**
+ * Creates an instance of DBforMySQLManager that exposes DBforMySQL management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the interface exposing DBforMySQL management API entry points that work across subscriptions
+ */
+ DBforMySQLManager authenticate(AzureTokenCredentials credentials, String subscriptionId);
+ }
+
+ /**
+ * @return Entry point to manage Servers.
+ */
+ public Servers servers() {
+ if (this.servers == null) {
+ this.servers = new ServersImpl(this);
+ }
+ return this.servers;
+ }
+
+ /**
+ * @return Entry point to manage Replicas.
+ */
+ public Replicas replicas() {
+ if (this.replicas == null) {
+ this.replicas = new ReplicasImpl(this);
+ }
+ return this.replicas;
+ }
+
+ /**
+ * @return Entry point to manage FirewallRules.
+ */
+ public FirewallRules firewallRules() {
+ if (this.firewallRules == null) {
+ this.firewallRules = new FirewallRulesImpl(this);
+ }
+ return this.firewallRules;
+ }
+
+ /**
+ * @return Entry point to manage VirtualNetworkRules.
+ */
+ public VirtualNetworkRules virtualNetworkRules() {
+ if (this.virtualNetworkRules == null) {
+ this.virtualNetworkRules = new VirtualNetworkRulesImpl(this);
+ }
+ return this.virtualNetworkRules;
+ }
+
+ /**
+ * @return Entry point to manage Databases.
+ */
+ public Databases databases() {
+ if (this.databases == null) {
+ this.databases = new DatabasesImpl(this);
+ }
+ return this.databases;
+ }
+
+ /**
+ * @return Entry point to manage Configurations.
+ */
+ public Configurations configurations() {
+ if (this.configurations == null) {
+ this.configurations = new ConfigurationsImpl(this);
+ }
+ return this.configurations;
+ }
+
+ /**
+ * @return Entry point to manage LogFiles.
+ */
+ public LogFiles logFiles() {
+ if (this.logFiles == null) {
+ this.logFiles = new LogFilesImpl(this);
+ }
+ return this.logFiles;
+ }
+
+ /**
+ * @return Entry point to manage ServerAdministrators.
+ */
+ public ServerAdministrators serverAdministrators() {
+ if (this.serverAdministrators == null) {
+ this.serverAdministrators = new ServerAdministratorsImpl(this);
+ }
+ return this.serverAdministrators;
+ }
+
+ /**
+ * @return Entry point to manage LocationBasedPerformanceTiers.
+ */
+ public LocationBasedPerformanceTiers locationBasedPerformanceTiers() {
+ if (this.locationBasedPerformanceTiers == null) {
+ this.locationBasedPerformanceTiers = new LocationBasedPerformanceTiersImpl(this);
+ }
+ return this.locationBasedPerformanceTiers;
+ }
+
+ /**
+ * @return Entry point to manage CheckNameAvailabilitys.
+ */
+ public CheckNameAvailabilitys checkNameAvailabilitys() {
+ if (this.checkNameAvailabilitys == null) {
+ this.checkNameAvailabilitys = new CheckNameAvailabilitysImpl(this);
+ }
+ return this.checkNameAvailabilitys;
+ }
+
+ /**
+ * @return Entry point to manage ServerSecurityAlertPolicies.
+ */
+ public ServerSecurityAlertPolicies serverSecurityAlertPolicies() {
+ if (this.serverSecurityAlertPolicies == null) {
+ this.serverSecurityAlertPolicies = new ServerSecurityAlertPoliciesImpl(this);
+ }
+ return this.serverSecurityAlertPolicies;
+ }
+
+ /**
+ * @return Entry point to manage Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(this);
+ }
+ return this.operations;
+ }
+
+ /**
+ * The implementation for Configurable interface.
+ */
+ private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable {
+ public DBforMySQLManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return DBforMySQLManager.authenticate(buildRestClient(credentials), subscriptionId);
+ }
+ }
+ private DBforMySQLManager(RestClient restClient, String subscriptionId) {
+ super(
+ restClient,
+ subscriptionId,
+ new MySQLManagementClientImpl(restClient).withSubscriptionId(subscriptionId));
+ }
+}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DatabaseImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DatabaseImpl.java
index ea3b83eff8ab..8dc65429f33d 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DatabaseImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DatabaseImpl.java
@@ -13,12 +13,12 @@
import rx.Observable;
class DatabaseImpl extends CreatableUpdatableImpl implements Database, Database.Definition, Database.Update {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
private String resourceGroupName;
private String serverName;
private String databaseName;
- DatabaseImpl(String name, MySQLManager manager) {
+ DatabaseImpl(String name, DBforMySQLManager manager) {
super(name, new DatabaseInner());
this.manager = manager;
// Set resource name
@@ -26,7 +26,7 @@ class DatabaseImpl extends CreatableUpdatableImpl implements Databases {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- DatabasesImpl(MySQLManager manager) {
+ DatabasesImpl(DBforMySQLManager manager) {
super(manager.inner().databases());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
@@ -64,10 +64,14 @@ public Database call(DatabaseInner inner) {
public Observable getAsync(String resourceGroupName, String serverName, String databaseName) {
DatabasesInner client = this.inner();
return client.getAsync(resourceGroupName, serverName, databaseName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public Database call(DatabaseInner inner) {
- return wrapModel(inner);
+ public Observable call(DatabaseInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((Database)wrapModel(inner));
+ }
}
});
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/FirewallRuleImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/FirewallRuleImpl.java
index d058c872e600..d1e5fbb790a8 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/FirewallRuleImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/FirewallRuleImpl.java
@@ -13,12 +13,12 @@
import rx.Observable;
class FirewallRuleImpl extends CreatableUpdatableImpl implements FirewallRule, FirewallRule.Definition, FirewallRule.Update {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
private String resourceGroupName;
private String serverName;
private String firewallRuleName;
- FirewallRuleImpl(String name, MySQLManager manager) {
+ FirewallRuleImpl(String name, DBforMySQLManager manager) {
super(name, new FirewallRuleInner());
this.manager = manager;
// Set resource name
@@ -26,7 +26,7 @@ class FirewallRuleImpl extends CreatableUpdatableImpl implements FirewallRules {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- FirewallRulesImpl(MySQLManager manager) {
+ FirewallRulesImpl(DBforMySQLManager manager) {
super(manager.inner().firewallRules());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
@@ -64,10 +64,14 @@ public FirewallRule call(FirewallRuleInner inner) {
public Observable getAsync(String resourceGroupName, String serverName, String firewallRuleName) {
FirewallRulesInner client = this.inner();
return client.getAsync(resourceGroupName, serverName, firewallRuleName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public FirewallRule call(FirewallRuleInner inner) {
- return wrapModel(inner);
+ public Observable call(FirewallRuleInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((FirewallRule)wrapModel(inner));
+ }
}
});
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LocationBasedPerformanceTiersImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LocationBasedPerformanceTiersImpl.java
index 4029218332b5..b36cb63f42a4 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LocationBasedPerformanceTiersImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LocationBasedPerformanceTiersImpl.java
@@ -17,14 +17,14 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.PerformanceTierProperties;
class LocationBasedPerformanceTiersImpl extends WrapperImpl implements LocationBasedPerformanceTiers {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- LocationBasedPerformanceTiersImpl(MySQLManager manager) {
+ LocationBasedPerformanceTiersImpl(DBforMySQLManager manager) {
super(manager.inner().locationBasedPerformanceTiers());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFileImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFileImpl.java
index 5960746f6a21..cf5952c25423 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFileImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFileImpl.java
@@ -14,15 +14,15 @@
import org.joda.time.DateTime;
class LogFileImpl extends WrapperImpl implements LogFile {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- LogFileImpl(LogFileInner inner, MySQLManager manager) {
+ LogFileImpl(LogFileInner inner, DBforMySQLManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFilesImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFilesImpl.java
index 2d8a043c80bb..d9f5418cfad2 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFilesImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFilesImpl.java
@@ -17,14 +17,14 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.LogFile;
class LogFilesImpl extends WrapperImpl implements LogFiles {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- LogFilesImpl(MySQLManager manager) {
+ LogFilesImpl(DBforMySQLManager manager) {
super(manager.inner().logFiles());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/MySQLManagementClientImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/MySQLManagementClientImpl.java
index e97e97cdf7e0..d5af0537f12b 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/MySQLManagementClientImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/MySQLManagementClientImpl.java
@@ -223,6 +223,19 @@ public LogFilesInner logFiles() {
return this.logFiles;
}
+ /**
+ * The ServerAdministratorsInner object to access its operations.
+ */
+ private ServerAdministratorsInner serverAdministrators;
+
+ /**
+ * Gets the ServerAdministratorsInner object to access its operations.
+ * @return the ServerAdministratorsInner object.
+ */
+ public ServerAdministratorsInner serverAdministrators() {
+ return this.serverAdministrators;
+ }
+
/**
* The LocationBasedPerformanceTiersInner object to access its operations.
*/
@@ -317,6 +330,7 @@ protected void initialize() {
this.databases = new DatabasesInner(restClient().retrofit(), this);
this.configurations = new ConfigurationsInner(restClient().retrofit(), this);
this.logFiles = new LogFilesInner(restClient().retrofit(), this);
+ this.serverAdministrators = new ServerAdministratorsInner(restClient().retrofit(), this);
this.locationBasedPerformanceTiers = new LocationBasedPerformanceTiersInner(restClient().retrofit(), this);
this.checkNameAvailabilitys = new CheckNameAvailabilitysInner(restClient().retrofit(), this);
this.serverSecurityAlertPolicies = new ServerSecurityAlertPoliciesInner(restClient().retrofit(), this);
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/NameAvailabilityImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/NameAvailabilityImpl.java
index 500f07890f92..ed6e3e20236c 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/NameAvailabilityImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/NameAvailabilityImpl.java
@@ -12,14 +12,14 @@
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
class NameAvailabilityImpl extends WrapperImpl implements NameAvailability {
- private final MySQLManager manager;
- NameAvailabilityImpl(NameAvailabilityInner inner, MySQLManager manager) {
+ private final DBforMySQLManager manager;
+ NameAvailabilityImpl(NameAvailabilityInner inner, DBforMySQLManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationListResultImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationListResultImpl.java
index 68eb4e03ce3f..97aa26783122 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationListResultImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationListResultImpl.java
@@ -13,14 +13,14 @@
import java.util.List;
class OperationListResultImpl extends WrapperImpl implements OperationListResult {
- private final MySQLManager manager;
- OperationListResultImpl(OperationListResultInner inner, MySQLManager manager) {
+ private final DBforMySQLManager manager;
+ OperationListResultImpl(OperationListResultInner inner, DBforMySQLManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationsImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationsImpl.java
index ffb86ced16f5..413391ed2812 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationsImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationsImpl.java
@@ -16,14 +16,14 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.OperationListResult;
class OperationsImpl extends WrapperImpl implements Operations {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- OperationsImpl(MySQLManager manager) {
+ OperationsImpl(DBforMySQLManager manager) {
super(manager.inner().operations());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/PerformanceTierPropertiesImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/PerformanceTierPropertiesImpl.java
index 2cf3758e8df5..697cd6383dd2 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/PerformanceTierPropertiesImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/PerformanceTierPropertiesImpl.java
@@ -15,15 +15,15 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.PerformanceTierServiceLevelObjectives;
class PerformanceTierPropertiesImpl extends WrapperImpl implements PerformanceTierProperties {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- PerformanceTierPropertiesImpl(PerformanceTierPropertiesInner inner, MySQLManager manager) {
+ PerformanceTierPropertiesImpl(PerformanceTierPropertiesInner inner, DBforMySQLManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ReplicasImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ReplicasImpl.java
index d597c1c13596..8d8e4f7abb87 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ReplicasImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ReplicasImpl.java
@@ -17,14 +17,14 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerServer;
class ReplicasImpl extends WrapperImpl implements Replicas {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- ReplicasImpl(MySQLManager manager) {
+ ReplicasImpl(DBforMySQLManager manager) {
super(manager.inner().replicas());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorResourceImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorResourceImpl.java
new file mode 100644
index 000000000000..b1710ffdc431
--- /dev/null
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorResourceImpl.java
@@ -0,0 +1,66 @@
+/**
+ * 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.mysql.v2017_12_01_preview.implementation;
+
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerAdministratorResource;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import rx.Observable;
+import java.util.UUID;
+
+class ServerAdministratorResourceImpl extends WrapperImpl implements ServerAdministratorResource {
+ private final DBforMySQLManager manager;
+
+ ServerAdministratorResourceImpl(ServerAdministratorResourceInner inner, DBforMySQLManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public DBforMySQLManager manager() {
+ return this.manager;
+ }
+
+
+
+ @Override
+ public String administratorType() {
+ return this.inner().administratorType();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String login() {
+ return this.inner().login();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public UUID sid() {
+ return this.inner().sid();
+ }
+
+ @Override
+ public UUID tenantId() {
+ return this.inner().tenantId();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorResourceInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorResourceInner.java
new file mode 100644
index 000000000000..ee2220d47934
--- /dev/null
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorResourceInner.java
@@ -0,0 +1,135 @@
+/**
+ * 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.mysql.v2017_12_01_preview.implementation;
+
+import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Represents a and external administrator to be created.
+ */
+@JsonFlatten
+public class ServerAdministratorResourceInner extends ProxyResource {
+ /**
+ * The type of administrator.
+ */
+ @JsonProperty(value = "properties.administratorType", required = true)
+ private String administratorType;
+
+ /**
+ * The server administrator login value.
+ */
+ @JsonProperty(value = "properties.login", required = true)
+ private String login;
+
+ /**
+ * The server administrator Sid (Secure ID).
+ */
+ @JsonProperty(value = "properties.sid", required = true)
+ private UUID sid;
+
+ /**
+ * The server Active Directory Administrator tenant id.
+ */
+ @JsonProperty(value = "properties.tenantId", required = true)
+ private UUID tenantId;
+
+ /**
+ * Creates an instance of ServerAdministratorResourceInner class.
+ * @param login the server administrator login value.
+ * @param sid the server administrator Sid (Secure ID).
+ * @param tenantId the server Active Directory Administrator tenant id.
+ */
+ public ServerAdministratorResourceInner() {
+ administratorType = "ActiveDirectory";
+ }
+
+ /**
+ * Get the type of administrator.
+ *
+ * @return the administratorType value
+ */
+ public String administratorType() {
+ return this.administratorType;
+ }
+
+ /**
+ * Set the type of administrator.
+ *
+ * @param administratorType the administratorType value to set
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withAdministratorType(String administratorType) {
+ this.administratorType = administratorType;
+ return this;
+ }
+
+ /**
+ * Get the server administrator login value.
+ *
+ * @return the login value
+ */
+ public String login() {
+ return this.login;
+ }
+
+ /**
+ * Set the server administrator login value.
+ *
+ * @param login the login value to set
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ /**
+ * Get the server administrator Sid (Secure ID).
+ *
+ * @return the sid value
+ */
+ public UUID sid() {
+ return this.sid;
+ }
+
+ /**
+ * Set the server administrator Sid (Secure ID).
+ *
+ * @param sid the sid value to set
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withSid(UUID sid) {
+ this.sid = sid;
+ return this;
+ }
+
+ /**
+ * Get the server Active Directory Administrator tenant id.
+ *
+ * @return the tenantId value
+ */
+ public UUID tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the server Active Directory Administrator tenant id.
+ *
+ * @param tenantId the tenantId value to set
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withTenantId(UUID tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorsImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorsImpl.java
new file mode 100644
index 000000000000..3a173baefffb
--- /dev/null
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorsImpl.java
@@ -0,0 +1,89 @@
+/**
+ * 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.mysql.v2017_12_01_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerAdministrators;
+import rx.Observable;
+import rx.functions.Func1;
+import java.util.List;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerAdministratorResource;
+
+class ServerAdministratorsImpl extends WrapperImpl implements ServerAdministrators {
+ private final DBforMySQLManager manager;
+
+ ServerAdministratorsImpl(DBforMySQLManager manager) {
+ super(manager.inner().serverAdministrators());
+ this.manager = manager;
+ }
+
+ public DBforMySQLManager manager() {
+ return this.manager;
+ }
+
+ private ServerAdministratorResourceImpl wrapModel(ServerAdministratorResourceInner inner) {
+ return new ServerAdministratorResourceImpl(inner, manager());
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String serverName) {
+ ServerAdministratorsInner client = this.inner();
+ return client.getAsync(resourceGroupName, serverName)
+ .map(new Func1() {
+ @Override
+ public ServerAdministratorResource call(ServerAdministratorResourceInner inner) {
+ return new ServerAdministratorResourceImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable createOrUpdateAsync(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties) {
+ ServerAdministratorsInner client = this.inner();
+ return client.createOrUpdateAsync(resourceGroupName, serverName, properties)
+ .map(new Func1() {
+ @Override
+ public ServerAdministratorResource call(ServerAdministratorResourceInner inner) {
+ return new ServerAdministratorResourceImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable deleteAsync(String resourceGroupName, String serverName) {
+ ServerAdministratorsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, serverName)
+ .map(new Func1() {
+ @Override
+ public ServerAdministratorResource call(ServerAdministratorResourceInner inner) {
+ return new ServerAdministratorResourceImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listByServerAsync(String resourceGroupName, String serverName) {
+ ServerAdministratorsInner client = this.inner();
+ return client.listByServerAsync(resourceGroupName, serverName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public ServerAdministratorResource call(ServerAdministratorResourceInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorsInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorsInner.java
new file mode 100644
index 000000000000..b57ca0f94cf4
--- /dev/null
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerAdministratorsInner.java
@@ -0,0 +1,592 @@
+/**
+ * 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.mysql.v2017_12_01_preview.implementation;
+
+import com.microsoft.azure.arm.collection.InnerSupportsDelete;
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in ServerAdministrators.
+ */
+public class ServerAdministratorsInner implements InnerSupportsDelete {
+ /** The Retrofit service to perform REST calls. */
+ private ServerAdministratorsService service;
+ /** The service client containing this operation class. */
+ private MySQLManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ServerAdministratorsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ServerAdministratorsInner(Retrofit retrofit, MySQLManagementClientImpl client) {
+ this.service = retrofit.create(ServerAdministratorsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ServerAdministrators to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ServerAdministratorsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerAdministrators get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory")
+ Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @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.mysql.v2017_12_01_preview.ServerAdministrators createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory")
+ Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ServerAdministratorResourceInner properties, @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.mysql.v2017_12_01_preview.ServerAdministrators beginCreateOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory")
+ Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ServerAdministratorResourceInner properties, @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.mysql.v2017_12_01_preview.ServerAdministrators delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @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.mysql.v2017_12_01_preview.ServerAdministrators beginDelete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory", method = "DELETE", hasBody = true)
+ Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @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.mysql.v2017_12_01_preview.ServerAdministrators listByServer" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/administrators")
+ Observable> listByServer(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets information about a AAD server administrator.
+ *
+ * @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 serverName The name of the server.
+ * @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 ServerAdministratorResourceInner object if successful.
+ */
+ public ServerAdministratorResourceInner get(String resourceGroupName, String serverName) {
+ return getWithServiceResponseAsync(resourceGroupName, serverName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets information about a AAD server administrator.
+ *
+ * @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 serverName The name of the server.
+ * @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 getAsync(String resourceGroupName, String serverName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serverName), serviceCallback);
+ }
+
+ /**
+ * Gets information about a AAD server administrator.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ServerAdministratorResourceInner object
+ */
+ public Observable getAsync(String resourceGroupName, String serverName) {
+ return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1, ServerAdministratorResourceInner>() {
+ @Override
+ public ServerAdministratorResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets information about a AAD server administrator.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ServerAdministratorResourceInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String serverName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName 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.get(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
+ *
+ * @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 serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @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 ServerAdministratorResourceInner object if successful.
+ */
+ public ServerAdministratorResourceInner createOrUpdate(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties).toBlocking().last().body();
+ }
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
+ *
+ * @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 serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @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 createOrUpdateAsync(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties), serviceCallback);
+ }
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
+ *
+ * @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 serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties).map(new Func1, ServerAdministratorResourceInner>() {
+ @Override
+ public ServerAdministratorResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
+ *
+ * @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 serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (properties == null) {
+ throw new IllegalArgumentException("Parameter properties is required and cannot be null.");
+ }
+ Validator.validate(properties);
+ Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), properties, this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
+ *
+ * @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 serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @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 ServerAdministratorResourceInner object if successful.
+ */
+ public ServerAdministratorResourceInner beginCreateOrUpdate(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties).toBlocking().single().body();
+ }
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
+ *
+ * @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 serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @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 beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties), serviceCallback);
+ }
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
+ *
+ * @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 serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ServerAdministratorResourceInner object
+ */
+ public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties).map(new Func1, ServerAdministratorResourceInner>() {
+ @Override
+ public ServerAdministratorResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
+ *
+ * @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 serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ServerAdministratorResourceInner object
+ */
+ public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serverName, ServerAdministratorResourceInner properties) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (properties == null) {
+ throw new IllegalArgumentException("Parameter properties is required and cannot be null.");
+ }
+ Validator.validate(properties);
+ return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), properties, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes AAD Administrator.
+ *
+ * @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 serverName The name of the server.
+ * @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 ServerAdministratorResourceInner object if successful.
+ */
+ public ServerAdministratorResourceInner delete(String resourceGroupName, String serverName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, serverName).toBlocking().last().body();
+ }
+
+ /**
+ * Deletes AAD Administrator.
+ *
+ * @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 serverName The name of the server.
+ * @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 deleteAsync(String resourceGroupName, String serverName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serverName), serviceCallback);
+ }
+
+ /**
+ * Deletes AAD Administrator.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable deleteAsync(String resourceGroupName, String serverName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1, ServerAdministratorResourceInner>() {
+ @Override
+ public ServerAdministratorResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes AAD Administrator.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serverName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Deletes AAD Administrator.
+ *
+ * @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 serverName The name of the server.
+ * @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 ServerAdministratorResourceInner object if successful.
+ */
+ public ServerAdministratorResourceInner beginDelete(String resourceGroupName, String serverName) {
+ return beginDeleteWithServiceResponseAsync(resourceGroupName, serverName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes AAD Administrator.
+ *
+ * @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 serverName The name of the server.
+ * @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 beginDeleteAsync(String resourceGroupName, String serverName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, serverName), serviceCallback);
+ }
+
+ /**
+ * Deletes AAD Administrator.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ServerAdministratorResourceInner object
+ */
+ public Observable beginDeleteAsync(String resourceGroupName, String serverName) {
+ return beginDeleteWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1, ServerAdministratorResourceInner>() {
+ @Override
+ public ServerAdministratorResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes AAD Administrator.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ServerAdministratorResourceInner object
+ */
+ public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String serverName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName 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.beginDelete(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginDeleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Returns a list of server Administrators.
+ *
+ * @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 serverName The name of the server.
+ * @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 List<ServerAdministratorResourceInner> object if successful.
+ */
+ public List listByServer(String resourceGroupName, String serverName) {
+ return listByServerWithServiceResponseAsync(resourceGroupName, serverName).toBlocking().single().body();
+ }
+
+ /**
+ * Returns a list of server Administrators.
+ *
+ * @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 serverName The name of the server.
+ * @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> listByServerAsync(String resourceGroupName, String serverName, final ServiceCallback> serviceCallback) {
+ return ServiceFuture.fromResponse(listByServerWithServiceResponseAsync(resourceGroupName, serverName), serviceCallback);
+ }
+
+ /**
+ * Returns a list of server Administrators.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the List<ServerAdministratorResourceInner> object
+ */
+ public Observable> listByServerAsync(String resourceGroupName, String serverName) {
+ return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1>, List>() {
+ @Override
+ public List call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Returns a list of server Administrators.
+ *
+ * @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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the List<ServerAdministratorResourceInner> object
+ */
+ public Observable>> listByServerWithServiceResponseAsync(String resourceGroupName, String serverName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName 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.listByServer(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByServerDelegate(response);
+ List items = null;
+ if (result.body() != null) {
+ items = result.body().items();
+ }
+ ServiceResponse> clientResponse = new ServiceResponse>(items, result.response());
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByServerDelegate(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);
+ }
+
+}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerImpl.java
index 6db3f8589272..94c38dbdf8a7 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerImpl.java
@@ -14,6 +14,7 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerUpdateParameters;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerForCreate;
import org.joda.time.DateTime;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.ResourceIdentity;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.Sku;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.SslEnforcementEnum;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.StorageProfile;
@@ -22,10 +23,10 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerPropertiesForCreate;
import rx.functions.Func1;
-class ServerImpl extends GroupableResourceCoreImpl implements Server, Server.Definition, Server.Update {
+class ServerImpl extends GroupableResourceCoreImpl implements Server, Server.Definition, Server.Update {
private ServerForCreate createParameter;
private ServerUpdateParameters updateParameter;
- ServerImpl(String name, ServerInner inner, MySQLManager manager) {
+ ServerImpl(String name, ServerInner inner, DBforMySQLManager manager) {
super(name, inner, manager);
this.createParameter = new ServerForCreate();
this.updateParameter = new ServerUpdateParameters();
@@ -92,6 +93,11 @@ public String fullyQualifiedDomainName() {
return this.inner().fullyQualifiedDomainName();
}
+ @Override
+ public ResourceIdentity identity() {
+ return this.inner().identity();
+ }
+
@Override
public String masterServerId() {
return this.inner().masterServerId();
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerInner.java
index 0e3d971df139..6235331dc8e7 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerInner.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerInner.java
@@ -8,6 +8,7 @@
package com.microsoft.azure.management.mysql.v2017_12_01_preview.implementation;
+import com.microsoft.azure.management.mysql.v2017_12_01_preview.ResourceIdentity;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.Sku;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerVersion;
import com.microsoft.azure.management.mysql.v2017_12_01_preview.SslEnforcementEnum;
@@ -23,6 +24,12 @@
*/
@JsonFlatten
public class ServerInner extends Resource {
+ /**
+ * The Azure Active Directory identity of the server.
+ */
+ @JsonProperty(value = "identity")
+ private ResourceIdentity identity;
+
/**
* The SKU (pricing tier) of the server.
*/
@@ -37,7 +44,7 @@ public class ServerInner extends Resource {
private String administratorLogin;
/**
- * Server version. Possible values include: '5.6', '5.7'.
+ * Server version. Possible values include: '5.6', '5.7', '8.0'.
*/
@JsonProperty(value = "properties.version")
private ServerVersion version;
@@ -92,6 +99,26 @@ public class ServerInner extends Resource {
@JsonProperty(value = "properties.replicaCapacity")
private Integer replicaCapacity;
+ /**
+ * Get the Azure Active Directory identity of the server.
+ *
+ * @return the identity value
+ */
+ public ResourceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the Azure Active Directory identity of the server.
+ *
+ * @param identity the identity value to set
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withIdentity(ResourceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Get the SKU (pricing tier) of the server.
*
@@ -133,7 +160,7 @@ public ServerInner withAdministratorLogin(String administratorLogin) {
}
/**
- * Get server version. Possible values include: '5.6', '5.7'.
+ * Get server version. Possible values include: '5.6', '5.7', '8.0'.
*
* @return the version value
*/
@@ -142,7 +169,7 @@ public ServerVersion version() {
}
/**
- * Set server version. Possible values include: '5.6', '5.7'.
+ * Set server version. Possible values include: '5.6', '5.7', '8.0'.
*
* @param version the version value to set
* @return the ServerInner object itself.
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPoliciesImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPoliciesImpl.java
index 2a2e03ec2ed8..4ec2da818e73 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPoliciesImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPoliciesImpl.java
@@ -16,14 +16,14 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerSecurityAlertPolicy;
class ServerSecurityAlertPoliciesImpl extends WrapperImpl implements ServerSecurityAlertPolicies {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- ServerSecurityAlertPoliciesImpl(MySQLManager manager) {
+ ServerSecurityAlertPoliciesImpl(DBforMySQLManager manager) {
super(manager.inner().serverSecurityAlertPolicies());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
@@ -44,10 +44,14 @@ private ServerSecurityAlertPolicyImpl wrapModel(String name) {
public Observable getAsync(String resourceGroupName, String serverName) {
ServerSecurityAlertPoliciesInner client = this.inner();
return client.getAsync(resourceGroupName, serverName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public ServerSecurityAlertPolicy call(ServerSecurityAlertPolicyInner inner) {
- return wrapModel(inner);
+ public Observable call(ServerSecurityAlertPolicyInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((ServerSecurityAlertPolicy)wrapModel(inner));
+ }
}
});
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPolicyImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPolicyImpl.java
index 62de76bcddfb..05230e0877b3 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPolicyImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPolicyImpl.java
@@ -15,11 +15,11 @@
import java.util.List;
class ServerSecurityAlertPolicyImpl extends CreatableUpdatableImpl implements ServerSecurityAlertPolicy, ServerSecurityAlertPolicy.Definition, ServerSecurityAlertPolicy.Update {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
private String resourceGroupName;
private String serverName;
- ServerSecurityAlertPolicyImpl(String name, MySQLManager manager) {
+ ServerSecurityAlertPolicyImpl(String name, DBforMySQLManager manager) {
super(name, new ServerSecurityAlertPolicyInner());
this.manager = manager;
// Set resource name
@@ -27,7 +27,7 @@ class ServerSecurityAlertPolicyImpl extends CreatableUpdatableImpl implements ServerServer {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- ServerServerImpl(ServerInner inner, MySQLManager manager) {
+ ServerServerImpl(ServerInner inner, DBforMySQLManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
@@ -54,6 +55,11 @@ public String id() {
return this.inner().id();
}
+ @Override
+ public ResourceIdentity identity() {
+ return this.inner().identity();
+ }
+
@Override
public String location() {
return this.inner().location();
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServersImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServersImpl.java
index 58c47c0c089a..232b2479b797 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServersImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServersImpl.java
@@ -23,8 +23,8 @@
import com.microsoft.azure.PagedList;
import com.microsoft.azure.Page;
-class ServersImpl extends GroupableResourcesCoreImpl implements Servers {
- protected ServersImpl(MySQLManager manager) {
+class ServersImpl extends GroupableResourcesCoreImpl implements Servers {
+ protected ServersImpl(DBforMySQLManager manager) {
super(manager.inner().servers(), manager);
}
diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/VirtualNetworkRuleImpl.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/VirtualNetworkRuleImpl.java
index 7e28d666f47a..7f0b1bbab639 100644
--- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/VirtualNetworkRuleImpl.java
+++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/VirtualNetworkRuleImpl.java
@@ -14,12 +14,12 @@
import com.microsoft.azure.management.mysql.v2017_12_01_preview.VirtualNetworkRuleState;
class VirtualNetworkRuleImpl extends CreatableUpdatableImpl implements VirtualNetworkRule, VirtualNetworkRule.Definition, VirtualNetworkRule.Update {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
private String resourceGroupName;
private String serverName;
private String virtualNetworkRuleName;
- VirtualNetworkRuleImpl(String name, MySQLManager manager) {
+ VirtualNetworkRuleImpl(String name, DBforMySQLManager manager) {
super(name, new VirtualNetworkRuleInner());
this.manager = manager;
// Set resource name
@@ -27,7 +27,7 @@ class VirtualNetworkRuleImpl extends CreatableUpdatableImpl implements VirtualNetworkRules {
- private final MySQLManager manager;
+ private final DBforMySQLManager manager;
- VirtualNetworkRulesImpl(MySQLManager manager) {
+ VirtualNetworkRulesImpl(DBforMySQLManager manager) {
super(manager.inner().virtualNetworkRules());
this.manager = manager;
}
- public MySQLManager manager() {
+ public DBforMySQLManager manager() {
return this.manager;
}
@@ -64,10 +64,14 @@ public VirtualNetworkRule call(VirtualNetworkRuleInner inner) {
public Observable getAsync(String resourceGroupName, String serverName, String virtualNetworkRuleName) {
VirtualNetworkRulesInner client = this.inner();
return client.getAsync(resourceGroupName, serverName, virtualNetworkRuleName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public VirtualNetworkRule call(VirtualNetworkRuleInner inner) {
- return wrapModel(inner);
+ public Observable call(VirtualNetworkRuleInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((VirtualNetworkRule)wrapModel(inner));
+ }
}
});
}