diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/pom.xml b/sdk/mysql/mgmt-v2017_12_01_preview/pom.xml index 08ad62ca71181..afd63999c8491 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/pom.xml +++ b/sdk/mysql/mgmt-v2017_12_01_preview/pom.xml @@ -11,14 +11,14 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml - azure-mgmt-mysql + azure-mgmt-dbformysql 1.0.0-beta jar - Microsoft Azure SDK for DBforMySQL Management - This package contains Microsoft DBforMySQL Management SDK. + Microsoft Azure SDK for DBForMySQL Management + This package contains Microsoft DBForMySQL Management SDK. https://github.com/Azure/azure-sdk-for-java @@ -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/AzureEntityResource.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/AzureEntityResource.java new file mode 100644 index 0000000000000..b253fed0e7056 --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/AzureEntityResource.java @@ -0,0 +1,34 @@ +/** + * 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.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * The resource model definition for a Azure Resource Manager resource with an + * etag. + */ +public class AzureEntityResource extends ProxyResource { + /** + * Resource Etag. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get resource Etag. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} 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 0613963a43d81..591b4e9b2de17 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 eb42069f17c18..8e2498e8a5313 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 6b4051bc1a40a..4ed3e124ad120 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 0000000000000..a54c95d37269b --- /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/InfrastructureEncryption.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/InfrastructureEncryption.java new file mode 100644 index 0000000000000..4f0678257ec3c --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/InfrastructureEncryption.java @@ -0,0 +1,41 @@ +/** + * 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 InfrastructureEncryption. + */ +public final class InfrastructureEncryption extends ExpandableStringEnum { + /** Static value Enabled for InfrastructureEncryption. */ + public static final InfrastructureEncryption ENABLED = fromString("Enabled"); + + /** Static value Disabled for InfrastructureEncryption. */ + public static final InfrastructureEncryption DISABLED = fromString("Disabled"); + + /** + * Creates or finds a InfrastructureEncryption from its string representation. + * @param name a name to look for + * @return the corresponding InfrastructureEncryption + */ + @JsonCreator + public static InfrastructureEncryption fromString(String name) { + return fromString(name, InfrastructureEncryption.class); + } + + /** + * @return known InfrastructureEncryption values + */ + public static Collection values() { + return values(InfrastructureEncryption.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 920ac347fe732..29e183807178d 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/MinimalTlsVersionEnum.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/MinimalTlsVersionEnum.java new file mode 100644 index 0000000000000..82100707ad3aa --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/MinimalTlsVersionEnum.java @@ -0,0 +1,47 @@ +/** + * 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 MinimalTlsVersionEnum. + */ +public final class MinimalTlsVersionEnum extends ExpandableStringEnum { + /** Static value TLS1_0 for MinimalTlsVersionEnum. */ + public static final MinimalTlsVersionEnum TLS1_0 = fromString("TLS1_0"); + + /** Static value TLS1_1 for MinimalTlsVersionEnum. */ + public static final MinimalTlsVersionEnum TLS1_1 = fromString("TLS1_1"); + + /** Static value TLS1_2 for MinimalTlsVersionEnum. */ + public static final MinimalTlsVersionEnum TLS1_2 = fromString("TLS1_2"); + + /** Static value TLSEnforcementDisabled for MinimalTlsVersionEnum. */ + public static final MinimalTlsVersionEnum TLSENFORCEMENT_DISABLED = fromString("TLSEnforcementDisabled"); + + /** + * Creates or finds a MinimalTlsVersionEnum from its string representation. + * @param name a name to look for + * @return the corresponding MinimalTlsVersionEnum + */ + @JsonCreator + public static MinimalTlsVersionEnum fromString(String name) { + return fromString(name, MinimalTlsVersionEnum.class); + } + + /** + * @return known MinimalTlsVersionEnum values + */ + public static Collection values() { + return values(MinimalTlsVersionEnum.class); + } +} 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 715b444741854..2b0669095ef7d 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 24485a1ad4fec..70c9f0285576a 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 1905786c125f5..0a6b485849b94 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/PrivateEndpointConnectionProperties.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateEndpointConnectionProperties.java new file mode 100644 index 0000000000000..3524b6f1a5f06 --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateEndpointConnectionProperties.java @@ -0,0 +1,85 @@ +/** + * 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of a private endpoint connection. + */ +public class PrivateEndpointConnectionProperties { + /** + * Private endpoint which the connection belongs to. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpointProperty privateEndpoint; + + /** + * Connection state of the private endpoint connection. + */ + @JsonProperty(value = "privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState; + + /** + * State of the private endpoint connection. Possible values include: + * 'Approving', 'Ready', 'Dropping', 'Failed', 'Rejecting'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointProvisioningState provisioningState; + + /** + * Get private endpoint which the connection belongs to. + * + * @return the privateEndpoint value + */ + public PrivateEndpointProperty privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set private endpoint which the connection belongs to. + * + * @param privateEndpoint the privateEndpoint value to set + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get connection state of the private endpoint connection. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set connection state of the private endpoint connection. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get state of the private endpoint connection. Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', 'Rejecting'. + * + * @return the provisioningState value + */ + public PrivateEndpointProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateEndpointProperty.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateEndpointProperty.java new file mode 100644 index 0000000000000..76ff9feb090f4 --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateEndpointProperty.java @@ -0,0 +1,43 @@ +/** + * 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The PrivateEndpointProperty model. + */ +public class PrivateEndpointProperty { + /** + * Resource id of the private endpoint. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get resource id of the private endpoint. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource id of the private endpoint. + * + * @param id the id value to set + * @return the PrivateEndpointProperty object itself. + */ + public PrivateEndpointProperty withId(String id) { + this.id = id; + return this; + } + +} diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateEndpointProvisioningState.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateEndpointProvisioningState.java new file mode 100644 index 0000000000000..f95d5785f03e6 --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateEndpointProvisioningState.java @@ -0,0 +1,50 @@ +/** + * 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 PrivateEndpointProvisioningState. + */ +public final class PrivateEndpointProvisioningState extends ExpandableStringEnum { + /** Static value Approving for PrivateEndpointProvisioningState. */ + public static final PrivateEndpointProvisioningState APPROVING = fromString("Approving"); + + /** Static value Ready for PrivateEndpointProvisioningState. */ + public static final PrivateEndpointProvisioningState READY = fromString("Ready"); + + /** Static value Dropping for PrivateEndpointProvisioningState. */ + public static final PrivateEndpointProvisioningState DROPPING = fromString("Dropping"); + + /** Static value Failed for PrivateEndpointProvisioningState. */ + public static final PrivateEndpointProvisioningState FAILED = fromString("Failed"); + + /** Static value Rejecting for PrivateEndpointProvisioningState. */ + public static final PrivateEndpointProvisioningState REJECTING = fromString("Rejecting"); + + /** + * Creates or finds a PrivateEndpointProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding PrivateEndpointProvisioningState + */ + @JsonCreator + public static PrivateEndpointProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointProvisioningState.class); + } + + /** + * @return known PrivateEndpointProvisioningState values + */ + public static Collection values() { + return values(PrivateEndpointProvisioningState.class); + } +} diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateLinkServiceConnectionStateActionsRequire.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateLinkServiceConnectionStateActionsRequire.java new file mode 100644 index 0000000000000..269855c723a19 --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateLinkServiceConnectionStateActionsRequire.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 PrivateLinkServiceConnectionStateActionsRequire. + */ +public final class PrivateLinkServiceConnectionStateActionsRequire extends ExpandableStringEnum { + /** Static value None for PrivateLinkServiceConnectionStateActionsRequire. */ + public static final PrivateLinkServiceConnectionStateActionsRequire NONE = fromString("None"); + + /** + * Creates or finds a PrivateLinkServiceConnectionStateActionsRequire from its string representation. + * @param name a name to look for + * @return the corresponding PrivateLinkServiceConnectionStateActionsRequire + */ + @JsonCreator + public static PrivateLinkServiceConnectionStateActionsRequire fromString(String name) { + return fromString(name, PrivateLinkServiceConnectionStateActionsRequire.class); + } + + /** + * @return known PrivateLinkServiceConnectionStateActionsRequire values + */ + public static Collection values() { + return values(PrivateLinkServiceConnectionStateActionsRequire.class); + } +} diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateLinkServiceConnectionStateProperty.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateLinkServiceConnectionStateProperty.java new file mode 100644 index 0000000000000..53de11d092a4c --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateLinkServiceConnectionStateProperty.java @@ -0,0 +1,86 @@ +/** + * 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The PrivateLinkServiceConnectionStateProperty model. + */ +public class PrivateLinkServiceConnectionStateProperty { + /** + * The private link service connection status. Possible values include: + * 'Approved', 'Pending', 'Rejected', 'Disconnected'. + */ + @JsonProperty(value = "status", required = true) + private PrivateLinkServiceConnectionStateStatus status; + + /** + * The private link service connection description. + */ + @JsonProperty(value = "description", required = true) + private String description; + + /** + * The actions required for private link service connection. Possible + * values include: 'None'. + */ + @JsonProperty(value = "actionsRequired", access = JsonProperty.Access.WRITE_ONLY) + private PrivateLinkServiceConnectionStateActionsRequire actionsRequired; + + /** + * Get the private link service connection status. Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected'. + * + * @return the status value + */ + public PrivateLinkServiceConnectionStateStatus status() { + return this.status; + } + + /** + * Set the private link service connection status. Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected'. + * + * @param status the status value to set + * @return the PrivateLinkServiceConnectionStateProperty object itself. + */ + public PrivateLinkServiceConnectionStateProperty withStatus(PrivateLinkServiceConnectionStateStatus status) { + this.status = status; + return this; + } + + /** + * Get the private link service connection description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the private link service connection description. + * + * @param description the description value to set + * @return the PrivateLinkServiceConnectionStateProperty object itself. + */ + public PrivateLinkServiceConnectionStateProperty withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actions required for private link service connection. Possible values include: 'None'. + * + * @return the actionsRequired value + */ + public PrivateLinkServiceConnectionStateActionsRequire actionsRequired() { + return this.actionsRequired; + } + +} diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateLinkServiceConnectionStateStatus.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateLinkServiceConnectionStateStatus.java new file mode 100644 index 0000000000000..fd16d7c06fe52 --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PrivateLinkServiceConnectionStateStatus.java @@ -0,0 +1,47 @@ +/** + * 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 PrivateLinkServiceConnectionStateStatus. + */ +public final class PrivateLinkServiceConnectionStateStatus extends ExpandableStringEnum { + /** Static value Approved for PrivateLinkServiceConnectionStateStatus. */ + public static final PrivateLinkServiceConnectionStateStatus APPROVED = fromString("Approved"); + + /** Static value Pending for PrivateLinkServiceConnectionStateStatus. */ + public static final PrivateLinkServiceConnectionStateStatus PENDING = fromString("Pending"); + + /** Static value Rejected for PrivateLinkServiceConnectionStateStatus. */ + public static final PrivateLinkServiceConnectionStateStatus REJECTED = fromString("Rejected"); + + /** Static value Disconnected for PrivateLinkServiceConnectionStateStatus. */ + public static final PrivateLinkServiceConnectionStateStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates or finds a PrivateLinkServiceConnectionStateStatus from its string representation. + * @param name a name to look for + * @return the corresponding PrivateLinkServiceConnectionStateStatus + */ + @JsonCreator + public static PrivateLinkServiceConnectionStateStatus fromString(String name) { + return fromString(name, PrivateLinkServiceConnectionStateStatus.class); + } + + /** + * @return known PrivateLinkServiceConnectionStateStatus values + */ + public static Collection values() { + return values(PrivateLinkServiceConnectionStateStatus.class); + } +} diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PublicNetworkAccessEnum.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PublicNetworkAccessEnum.java new file mode 100644 index 0000000000000..9925737d08b0d --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/PublicNetworkAccessEnum.java @@ -0,0 +1,41 @@ +/** + * 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 PublicNetworkAccessEnum. + */ +public final class PublicNetworkAccessEnum extends ExpandableStringEnum { + /** Static value Enabled for PublicNetworkAccessEnum. */ + public static final PublicNetworkAccessEnum ENABLED = fromString("Enabled"); + + /** Static value Disabled for PublicNetworkAccessEnum. */ + public static final PublicNetworkAccessEnum DISABLED = fromString("Disabled"); + + /** + * Creates or finds a PublicNetworkAccessEnum from its string representation. + * @param name a name to look for + * @return the corresponding PublicNetworkAccessEnum + */ + @JsonCreator + public static PublicNetworkAccessEnum fromString(String name) { + return fromString(name, PublicNetworkAccessEnum.class); + } + + /** + * @return known PublicNetworkAccessEnum values + */ + public static Collection values() { + return values(PublicNetworkAccessEnum.class); + } +} 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 0000000000000..06f1f4565dff9 --- /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 f6aae81db3514..9f38e2a4d0e87 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,19 +17,25 @@ 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 java.util.List; 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. */ String administratorLogin(); + /** + * @return the byokEnforcement value. + */ + String byokEnforcement(); + /** * @return the earliestRestoreDate value. */ @@ -40,11 +46,36 @@ public interface Server extends HasInner, Resource, GroupableResour */ String fullyQualifiedDomainName(); + /** + * @return the identity value. + */ + ResourceIdentity identity(); + + /** + * @return the infrastructureEncryption value. + */ + InfrastructureEncryption infrastructureEncryption(); + /** * @return the masterServerId value. */ String masterServerId(); + /** + * @return the minimalTlsVersion value. + */ + MinimalTlsVersionEnum minimalTlsVersion(); + + /** + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + + /** + * @return the publicNetworkAccess value. + */ + PublicNetworkAccessEnum publicNetworkAccess(); + /** * @return the replicaCapacity value. */ @@ -137,7 +168,7 @@ interface WithCreate extends Creatable, Resource.DefinitionWithTags, Resource.UpdateWithTags, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithReplicationRole, UpdateStages.WithSku, UpdateStages.WithSslEnforcement, UpdateStages.WithStorageProfile, UpdateStages.WithVersion { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithMinimalTlsVersion, UpdateStages.WithReplicationRole, UpdateStages.WithSku, UpdateStages.WithSslEnforcement, UpdateStages.WithStorageProfile, UpdateStages.WithVersion { } /** @@ -156,6 +187,18 @@ interface WithAdministratorLoginPassword { Update withAdministratorLoginPassword(String administratorLoginPassword); } + /** + * The stage of the server update allowing to specify MinimalTlsVersion. + */ + interface WithMinimalTlsVersion { + /** + * Specifies minimalTlsVersion. + * @param minimalTlsVersion Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled' + * @return the next update stage + */ + Update withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion); + } + /** * The stage of the server update allowing to specify ReplicationRole. */ @@ -210,7 +253,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 0000000000000..ebc8938d77908 --- /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 0000000000000..79c92bd87d0c0 --- /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 + */ + Completable 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 listAsync(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/ServerPrivateEndpointConnection.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPrivateEndpointConnection.java new file mode 100644 index 0000000000000..ac5e4bb1c6b6b --- /dev/null +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerPrivateEndpointConnection.java @@ -0,0 +1,47 @@ +/** + * 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * A private endpoint connection under a server. + */ +public class ServerPrivateEndpointConnection { + /** + * Resource Id of the private endpoint connection. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Private endpoint connection properties. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProperties properties; + + /** + * Get resource Id of the private endpoint connection. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get private endpoint connection properties. + * + * @return the properties value + */ + public PrivateEndpointConnectionProperties properties() { + return this.properties; + } + +} 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 436a532bdbeba..95c05bd247c17 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; @@ -38,6 +38,13 @@ public class ServerPropertiesForCreate { @JsonProperty(value = "sslEnforcement") private SslEnforcementEnum sslEnforcement; + /** + * Enforce a minimal Tls version for the server. Possible values include: + * 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled'. + */ + @JsonProperty(value = "minimalTlsVersion") + private MinimalTlsVersionEnum minimalTlsVersion; + /** * Storage profile of a server. */ @@ -45,7 +52,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 +61,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. @@ -84,6 +91,26 @@ public ServerPropertiesForCreate withSslEnforcement(SslEnforcementEnum sslEnforc return this; } + /** + * Get enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled'. + * + * @return the minimalTlsVersion value + */ + public MinimalTlsVersionEnum minimalTlsVersion() { + return this.minimalTlsVersion; + } + + /** + * Set enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled'. + * + * @param minimalTlsVersion the minimalTlsVersion value to set + * @return the ServerPropertiesForCreate object itself. + */ + public ServerPropertiesForCreate withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) { + this.minimalTlsVersion = minimalTlsVersion; + return this; + } + /** * Get storage profile of a server. * 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 7125666f22d9e..2bccf55786b9c 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 044e00df106df..028f6f801c457 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 3a6f003605810..5e0580cdb4957 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 0f4bd84d0b179..c249574c73af4 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 2b6d105b782af..a7761b19a848b 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 a279059d198df..1e7587cf7e816 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,19 +11,25 @@ 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.List; import java.util.Map; /** * Type representing ServerServer. */ -public interface ServerServer extends HasInner, HasManager { +public interface ServerServer extends HasInner, HasManager { /** * @return the administratorLogin value. */ String administratorLogin(); + /** + * @return the byokEnforcement value. + */ + String byokEnforcement(); + /** * @return the earliestRestoreDate value. */ @@ -39,6 +45,16 @@ public interface ServerServer extends HasInner, HasManager, HasManager privateEndpointConnections(); + + /** + * @return the publicNetworkAccess value. + */ + PublicNetworkAccessEnum publicNetworkAccess(); + /** * @return the replicaCapacity value. */ diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerState.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerState.java index 7863e4560f298..c46a691116b02 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerState.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerState.java @@ -25,6 +25,9 @@ public final class ServerState extends ExpandableStringEnum { /** Static value Disabled for ServerState. */ public static final ServerState DISABLED = fromString("Disabled"); + /** Static value Inaccessible for ServerState. */ + public static final ServerState INACCESSIBLE = fromString("Inaccessible"); + /** * Creates or finds a ServerState 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/ServerUpdateParameters.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerUpdateParameters.java index 3944eec286293..a1f6baff5f2b5 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerUpdateParameters.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerUpdateParameters.java @@ -36,7 +36,7 @@ public class ServerUpdateParameters { private String administratorLoginPassword; /** - * The version of a server. Possible values include: '5.6', '5.7'. + * The version of a server. Possible values include: '5.6', '5.7', '8.0'. */ @JsonProperty(value = "properties.version") private ServerVersion version; @@ -48,6 +48,13 @@ public class ServerUpdateParameters { @JsonProperty(value = "properties.sslEnforcement") private SslEnforcementEnum sslEnforcement; + /** + * Enforce a minimal Tls version for the server. Possible values include: + * 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled'. + */ + @JsonProperty(value = "properties.minimalTlsVersion") + private MinimalTlsVersionEnum minimalTlsVersion; + /** * The replication role of the server. */ @@ -121,7 +128,7 @@ public ServerUpdateParameters withAdministratorLoginPassword(String administrato } /** - * Get the version of a server. Possible values include: '5.6', '5.7'. + * Get the version of a server. Possible values include: '5.6', '5.7', '8.0'. * * @return the version value */ @@ -130,7 +137,7 @@ public ServerVersion version() { } /** - * Set the version of a server. Possible values include: '5.6', '5.7'. + * Set the version of a server. Possible values include: '5.6', '5.7', '8.0'. * * @param version the version value to set * @return the ServerUpdateParameters object itself. @@ -160,6 +167,26 @@ public ServerUpdateParameters withSslEnforcement(SslEnforcementEnum sslEnforceme return this; } + /** + * Get enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled'. + * + * @return the minimalTlsVersion value + */ + public MinimalTlsVersionEnum minimalTlsVersion() { + return this.minimalTlsVersion; + } + + /** + * Set enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled'. + * + * @param minimalTlsVersion the minimalTlsVersion value to set + * @return the ServerUpdateParameters object itself. + */ + public ServerUpdateParameters withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) { + this.minimalTlsVersion = minimalTlsVersion; + return this; + } + /** * Get the replication role of the server. * diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerVersion.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerVersion.java index 61a28863d3d4f..e1f72a0e2144b 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerVersion.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/ServerVersion.java @@ -22,6 +22,9 @@ public final class ServerVersion extends ExpandableStringEnum { /** 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/Sku.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Sku.java index 30fec03edc851..33be72221e4e9 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Sku.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/Sku.java @@ -18,7 +18,7 @@ public class Sku { * The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, * GP_Gen5_8. */ - @JsonProperty(value = "name") + @JsonProperty(value = "name", required = true) private String name; /** 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 8d172ecb774e3..1492dae0d68e9 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 1087ffa32e58f..5f51662343b55 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/CheckNameAvailabilitysInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/CheckNameAvailabilitysInner.java index cd6034f33b721..f06098f447d45 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/CheckNameAvailabilitysInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/CheckNameAvailabilitysInner.java @@ -55,7 +55,7 @@ public CheckNameAvailabilitysInner(Retrofit retrofit, MySQLManagementClientImpl */ interface CheckNameAvailabilitysService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.CheckNameAvailabilitys execute" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability") + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DBForMySQL/checkNameAvailability") Observable> execute(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body NameAvailabilityRequest nameAvailabilityRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } 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 53d1de4f3bf0c..84a169897c478 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/ConfigurationsInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ConfigurationsInner.java index 1aabf406c1e23..40e1e2a7ac011 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ConfigurationsInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ConfigurationsInner.java @@ -56,19 +56,19 @@ public ConfigurationsInner(Retrofit retrofit, MySQLManagementClientImpl client) */ interface ConfigurationsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.Configurations createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/configurations/{configurationName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/configurations/{configurationName}") Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("configurationName") String configurationName, @Query("api-version") String apiVersion, @Body ConfigurationInner parameters, @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.Configurations beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/configurations/{configurationName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/configurations/{configurationName}") Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("configurationName") String configurationName, @Query("api-version") String apiVersion, @Body ConfigurationInner parameters, @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.Configurations get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/configurations/{configurationName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/configurations/{configurationName}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("configurationName") String configurationName, @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.Configurations listByServer" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/configurations") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/configurations") 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); } 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 0000000000000..1b12256e69849 --- /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 ea3b83eff8aba..1e895111d9877 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/DatabasesInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DatabasesInner.java index 3bd61768d8f7e..8e62f5ea3ca18 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DatabasesInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/DatabasesInner.java @@ -57,27 +57,27 @@ public DatabasesInner(Retrofit retrofit, MySQLManagementClientImpl client) { */ interface DatabasesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.Databases createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases/{databaseName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases/{databaseName}") Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Body DatabaseInner parameters, @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.Databases beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases/{databaseName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases/{databaseName}") Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Body DatabaseInner parameters, @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.Databases delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases/{databaseName}", method = "DELETE", hasBody = true) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases/{databaseName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @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.Databases beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases/{databaseName}", method = "DELETE", hasBody = true) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases/{databaseName}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @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.Databases get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases/{databaseName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases/{databaseName}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @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.Databases listByServer" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases") 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); } 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 d058c872e600d..cf0902b4842d8 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/FirewallRulesInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/FirewallRulesInner.java index f36342814153f..6549846365814 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/FirewallRulesInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/FirewallRulesInner.java @@ -57,27 +57,27 @@ public FirewallRulesInner(Retrofit retrofit, MySQLManagementClientImpl client) { */ interface FirewallRulesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.FirewallRules createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules/{firewallRuleName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules/{firewallRuleName}") Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("firewallRuleName") String firewallRuleName, @Query("api-version") String apiVersion, @Body FirewallRuleInner parameters, @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.FirewallRules beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules/{firewallRuleName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules/{firewallRuleName}") Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("firewallRuleName") String firewallRuleName, @Query("api-version") String apiVersion, @Body FirewallRuleInner parameters, @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.FirewallRules delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules/{firewallRuleName}", method = "DELETE", hasBody = true) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules/{firewallRuleName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("firewallRuleName") String firewallRuleName, @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.FirewallRules beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules/{firewallRuleName}", method = "DELETE", hasBody = true) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules/{firewallRuleName}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("firewallRuleName") String firewallRuleName, @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.FirewallRules get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules/{firewallRuleName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules/{firewallRuleName}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("firewallRuleName") String firewallRuleName, @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.FirewallRules listByServer" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/firewallRules") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules") 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); } 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 4029218332b55..c1eddbc8c4bb1 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/LocationBasedPerformanceTiersInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LocationBasedPerformanceTiersInner.java index a129d89c89eb8..4a88fdf45dc35 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LocationBasedPerformanceTiersInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LocationBasedPerformanceTiersInner.java @@ -53,7 +53,7 @@ public LocationBasedPerformanceTiersInner(Retrofit retrofit, MySQLManagementClie */ interface LocationBasedPerformanceTiersService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.LocationBasedPerformanceTiers list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/performanceTiers") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DBForMySQL/locations/{locationName}/performanceTiers") Observable> list(@Path("subscriptionId") String subscriptionId, @Path("locationName") String locationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } 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 5960746f6a21e..51e4e9f273a9e 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 2d8a043c80bb1..915dacb41174d 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/LogFilesInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFilesInner.java index 7cd076ab131a1..c66f5bad50001 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFilesInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/LogFilesInner.java @@ -53,7 +53,7 @@ public LogFilesInner(Retrofit retrofit, MySQLManagementClientImpl client) { */ interface LogFilesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.LogFiles listByServer" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/logFiles") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/logFiles") 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); } 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 e97e97cdf7e03..d5af0537f12b0 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 500f07890f923..d4e2c5174cc37 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 68eb4e03ce3fd..8be3cd2de40cc 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 ffb86ced16f53..29775df7105cd 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/OperationsInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationsInner.java index ddb9a7e831e21..707771218c243 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationsInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/OperationsInner.java @@ -51,7 +51,7 @@ public OperationsInner(Retrofit retrofit, MySQLManagementClientImpl client) { */ interface OperationsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.Operations list" }) - @GET("providers/Microsoft.DBforMySQL/operations") + @GET("providers/Microsoft.DBForMySQL/operations") Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } 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 2cf3758e8df5d..e81b864bea708 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 d597c1c135966..33509779f02df 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/ReplicasInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ReplicasInner.java index 62f94f6d960a2..e7aff64c2736a 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ReplicasInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ReplicasInner.java @@ -53,7 +53,7 @@ public ReplicasInner(Retrofit retrofit, MySQLManagementClientImpl client) { */ interface ReplicasService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.Replicas listByServer" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/replicas") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/replicas") 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); } 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 0000000000000..f6467bea5ef25 --- /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 0000000000000..424acb28efb95 --- /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 account name. + */ + @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 account name. + * @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 account name. + * + * @return the login value + */ + public String login() { + return this.login; + } + + /** + * Set the server administrator login account name. + * + * @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 0000000000000..9f0979061ac0b --- /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,84 @@ +/** + * 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 rx.Completable; +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 Completable deleteAsync(String resourceGroupName, String serverName) { + ServerAdministratorsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, serverName).toCompletable(); + } + + @Override + public Observable listAsync(String resourceGroupName, String serverName) { + ServerAdministratorsInner client = this.inner(); + return client.listAsync(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 0000000000000..f8bf7ade9a8d9 --- /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,590 @@ +/** + * 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 list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/administrators") + Observable> list(@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 + */ + public void delete(String resourceGroupName, String serverName) { + 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, Void>() { + @Override + public Void 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 + */ + public void beginDelete(String resourceGroupName, String serverName) { + 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 {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String serverName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1, Void>() { + @Override + public Void 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 {@link ServiceResponse} object if successful. + */ + 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 list(String resourceGroupName, String serverName) { + return listWithServiceResponseAsync(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> listAsync(String resourceGroupName, String serverName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(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> listAsync(String resourceGroupName, String serverName) { + return listWithServiceResponseAsync(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>> listWithServiceResponseAsync(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.list(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 = listDelegate(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> listDelegate(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 6db3f85892726..79eb7343d1022 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,12 @@ 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.InfrastructureEncryption; +import com.microsoft.azure.management.mysql.v2017_12_01_preview.MinimalTlsVersionEnum; +import java.util.List; +import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerPrivateEndpointConnection; +import com.microsoft.azure.management.mysql.v2017_12_01_preview.PublicNetworkAccessEnum; 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 +28,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(); @@ -82,6 +88,11 @@ public String administratorLogin() { return this.inner().administratorLogin(); } + @Override + public String byokEnforcement() { + return this.inner().byokEnforcement(); + } + @Override public DateTime earliestRestoreDate() { return this.inner().earliestRestoreDate(); @@ -92,11 +103,36 @@ public String fullyQualifiedDomainName() { return this.inner().fullyQualifiedDomainName(); } + @Override + public ResourceIdentity identity() { + return this.inner().identity(); + } + + @Override + public InfrastructureEncryption infrastructureEncryption() { + return this.inner().infrastructureEncryption(); + } + @Override public String masterServerId() { return this.inner().masterServerId(); } + @Override + public MinimalTlsVersionEnum minimalTlsVersion() { + return this.inner().minimalTlsVersion(); + } + + @Override + public List privateEndpointConnections() { + return this.inner().privateEndpointConnections(); + } + + @Override + public PublicNetworkAccessEnum publicNetworkAccess() { + return this.inner().publicNetworkAccess(); + } + @Override public Integer replicaCapacity() { return this.inner().replicaCapacity(); @@ -144,6 +180,12 @@ public ServerImpl withAdministratorLoginPassword(String administratorLoginPasswo return this; } + @Override + public ServerImpl withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) { + this.updateParameter.withMinimalTlsVersion(minimalTlsVersion); + return this; + } + @Override public ServerImpl withReplicationRole(String replicationRole) { this.updateParameter.withReplicationRole(replicationRole); 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 0e3d971df1399..9a4947c59d8b2 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,12 +8,18 @@ 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; +import com.microsoft.azure.management.mysql.v2017_12_01_preview.MinimalTlsVersionEnum; +import com.microsoft.azure.management.mysql.v2017_12_01_preview.InfrastructureEncryption; import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerState; import org.joda.time.DateTime; import com.microsoft.azure.management.mysql.v2017_12_01_preview.StorageProfile; +import com.microsoft.azure.management.mysql.v2017_12_01_preview.PublicNetworkAccessEnum; +import java.util.List; +import com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerPrivateEndpointConnection; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -23,6 +29,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 +49,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; @@ -49,9 +61,30 @@ public class ServerInner extends Resource { @JsonProperty(value = "properties.sslEnforcement") private SslEnforcementEnum sslEnforcement; + /** + * Enforce a minimal Tls version for the server. Possible values include: + * 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled'. + */ + @JsonProperty(value = "properties.minimalTlsVersion") + private MinimalTlsVersionEnum minimalTlsVersion; + + /** + * Status showing whether the server data encryption is enabled with + * customer-managed keys. + */ + @JsonProperty(value = "properties.byokEnforcement", access = JsonProperty.Access.WRITE_ONLY) + private String byokEnforcement; + + /** + * Status showing whether the server enabled infrastructure encryption. + * Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.infrastructureEncryption") + private InfrastructureEncryption infrastructureEncryption; + /** * A state of a server that is visible to user. Possible values include: - * 'Ready', 'Dropping', 'Disabled'. + * 'Ready', 'Dropping', 'Disabled', 'Inaccessible'. */ @JsonProperty(value = "properties.userVisibleState") private ServerState userVisibleState; @@ -92,6 +125,40 @@ public class ServerInner extends Resource { @JsonProperty(value = "properties.replicaCapacity") private Integer replicaCapacity; + /** + * Whether or not public endpoint access is allowed for this server. Value + * is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private PublicNetworkAccessEnum publicNetworkAccess; + + /** + * List of private endpoint connections on a server. + */ + @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /** + * 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 +200,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 +209,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. @@ -173,7 +240,56 @@ public ServerInner withSslEnforcement(SslEnforcementEnum sslEnforcement) { } /** - * Get a state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', 'Disabled'. + * Get enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled'. + * + * @return the minimalTlsVersion value + */ + public MinimalTlsVersionEnum minimalTlsVersion() { + return this.minimalTlsVersion; + } + + /** + * Set enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled'. + * + * @param minimalTlsVersion the minimalTlsVersion value to set + * @return the ServerInner object itself. + */ + public ServerInner withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) { + this.minimalTlsVersion = minimalTlsVersion; + return this; + } + + /** + * Get status showing whether the server data encryption is enabled with customer-managed keys. + * + * @return the byokEnforcement value + */ + public String byokEnforcement() { + return this.byokEnforcement; + } + + /** + * Get status showing whether the server enabled infrastructure encryption. Possible values include: 'Enabled', 'Disabled'. + * + * @return the infrastructureEncryption value + */ + public InfrastructureEncryption infrastructureEncryption() { + return this.infrastructureEncryption; + } + + /** + * Set status showing whether the server enabled infrastructure encryption. Possible values include: 'Enabled', 'Disabled'. + * + * @param infrastructureEncryption the infrastructureEncryption value to set + * @return the ServerInner object itself. + */ + public ServerInner withInfrastructureEncryption(InfrastructureEncryption infrastructureEncryption) { + this.infrastructureEncryption = infrastructureEncryption; + return this; + } + + /** + * Get a state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible'. * * @return the userVisibleState value */ @@ -182,7 +298,7 @@ public ServerState userVisibleState() { } /** - * Set a state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', 'Disabled'. + * Set a state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible'. * * @param userVisibleState the userVisibleState value to set * @return the ServerInner object itself. @@ -312,4 +428,33 @@ public ServerInner withReplicaCapacity(Integer replicaCapacity) { return this; } + /** + * Get whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled'. + * + * @return the publicNetworkAccess value + */ + public PublicNetworkAccessEnum publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled'. + * + * @param publicNetworkAccess the publicNetworkAccess value to set + * @return the ServerInner object itself. + */ + public ServerInner withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get list of private endpoint connections on a server. + * + * @return the privateEndpointConnections value + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + } 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 2a2e03ec2ed8d..d889c0e65cff7 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/ServerSecurityAlertPoliciesInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPoliciesInner.java index f00fb07edb4bd..74bbf55b9393e 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPoliciesInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServerSecurityAlertPoliciesInner.java @@ -55,15 +55,15 @@ public ServerSecurityAlertPoliciesInner(Retrofit retrofit, MySQLManagementClient */ interface ServerSecurityAlertPoliciesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerSecurityAlertPolicies get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("securityAlertPolicyName") String securityAlertPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.ServerSecurityAlertPolicies createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("securityAlertPolicyName") String securityAlertPolicyName, @Path("subscriptionId") String subscriptionId, @Body ServerSecurityAlertPolicyInner parameters, @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.ServerSecurityAlertPolicies beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("securityAlertPolicyName") String securityAlertPolicyName, @Path("subscriptionId") String subscriptionId, @Body ServerSecurityAlertPolicyInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } 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 62de76bcddfb7..9a0a5783acad9 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; } @@ -39,6 +45,11 @@ public String administratorLogin() { return this.inner().administratorLogin(); } + @Override + public String byokEnforcement() { + return this.inner().byokEnforcement(); + } + @Override public DateTime earliestRestoreDate() { return this.inner().earliestRestoreDate(); @@ -54,6 +65,16 @@ public String id() { return this.inner().id(); } + @Override + public ResourceIdentity identity() { + return this.inner().identity(); + } + + @Override + public InfrastructureEncryption infrastructureEncryption() { + return this.inner().infrastructureEncryption(); + } + @Override public String location() { return this.inner().location(); @@ -64,11 +85,26 @@ public String masterServerId() { return this.inner().masterServerId(); } + @Override + public MinimalTlsVersionEnum minimalTlsVersion() { + return this.inner().minimalTlsVersion(); + } + @Override public String name() { return this.inner().name(); } + @Override + public List privateEndpointConnections() { + return this.inner().privateEndpointConnections(); + } + + @Override + public PublicNetworkAccessEnum publicNetworkAccess() { + return this.inner().publicNetworkAccess(); + } + @Override public Integer replicaCapacity() { return this.inner().replicaCapacity(); 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 58c47c0c089a0..c123853a7e047 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/ServersInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServersInner.java index 808325d8d9875..ec2e7712cb8f9 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServersInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/ServersInner.java @@ -66,47 +66,47 @@ public ServersInner(Retrofit retrofit, MySQLManagementClientImpl client) { */ interface ServersService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.Servers create" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}") Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ServerForCreate parameters, @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.Servers beginCreate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}") Observable> beginCreate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ServerForCreate parameters, @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.Servers update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}") Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ServerUpdateParameters parameters, @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.Servers beginUpdate" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}") Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ServerUpdateParameters parameters, @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.Servers delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}", method = "DELETE", hasBody = true) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}", 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.Servers beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}", method = "DELETE", hasBody = true) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}", 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.Servers getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}") Observable> getByResourceGroup(@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.Servers listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers") Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.Servers list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/servers") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DBForMySQL/servers") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.Servers restart" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/restart") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/restart") Observable> restart(@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.Servers beginRestart" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/restart") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/restart") Observable> beginRestart(@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); } 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 7e28d666f47a4..223e89f59bccc 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)); + } } }); } diff --git a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/VirtualNetworkRulesInner.java b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/VirtualNetworkRulesInner.java index e3489124c1add..a2d3c1de5d0a4 100644 --- a/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/VirtualNetworkRulesInner.java +++ b/sdk/mysql/mgmt-v2017_12_01_preview/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01_preview/implementation/VirtualNetworkRulesInner.java @@ -62,27 +62,27 @@ public VirtualNetworkRulesInner(Retrofit retrofit, MySQLManagementClientImpl cli */ interface VirtualNetworkRulesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.VirtualNetworkRules get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("subscriptionId") String subscriptionId, @Path("virtualNetworkRuleName") String virtualNetworkRuleName, @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.VirtualNetworkRules createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("subscriptionId") String subscriptionId, @Path("virtualNetworkRuleName") String virtualNetworkRuleName, @Query("api-version") String apiVersion, @Body VirtualNetworkRuleInner parameters, @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.VirtualNetworkRules beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("subscriptionId") String subscriptionId, @Path("virtualNetworkRuleName") String virtualNetworkRuleName, @Query("api-version") String apiVersion, @Body VirtualNetworkRuleInner parameters, @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.VirtualNetworkRules delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", method = "DELETE", hasBody = true) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", method = "DELETE", hasBody = true) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("virtualNetworkRuleName") String virtualNetworkRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.VirtualNetworkRules beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", method = "DELETE", hasBody = true) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("virtualNetworkRuleName") String virtualNetworkRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.VirtualNetworkRules listByServer" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules") Observable> listByServer(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.mysql.v2017_12_01_preview.VirtualNetworkRules listByServerNext" })