, ServerInner> beginCutoverMigration(
+ String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner cutoverMigration(String resourceGroupName, String serverName);
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner cutoverMigration(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionInner.java
new file mode 100644
index 000000000000..cf50b2e28293
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionInner.java
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A server's Advanced Threat Protection. */
+@Fluent
+public final class AdvancedThreatProtectionInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private AdvancedThreatProtectionProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of AdvancedThreatProtectionInner class. */
+ public AdvancedThreatProtectionInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private AdvancedThreatProtectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the creationTime property: Specifies the UTC creation time of the policy.
+ *
+ * @return the creationTime value.
+ */
+ public OffsetDateTime creationTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().creationTime();
+ }
+
+ /**
+ * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @return the state value.
+ */
+ public AdvancedThreatProtectionState state() {
+ return this.innerProperties() == null ? null : this.innerProperties().state();
+ }
+
+ /**
+ * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @param state the state value to set.
+ * @return the AdvancedThreatProtectionInner object itself.
+ */
+ public AdvancedThreatProtectionInner withState(AdvancedThreatProtectionState state) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdvancedThreatProtectionProperties();
+ }
+ this.innerProperties().withState(state);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the Threat Protection.
+ *
+ * @return the provisioningState value.
+ */
+ public AdvancedThreatProtectionProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionProperties.java
new file mode 100644
index 000000000000..3850977f03a9
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionProperties.java
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Properties of an Advanced Threat Protection setting. */
+@Fluent
+public final class AdvancedThreatProtectionProperties {
+ /*
+ * Specifies the UTC creation time of the policy.
+ */
+ @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime creationTime;
+
+ /*
+ * Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been
+ * applied yet on the specific database or server.
+ */
+ @JsonProperty(value = "state")
+ private AdvancedThreatProtectionState state;
+
+ /*
+ * Provisioning state of the Threat Protection.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private AdvancedThreatProtectionProvisioningState provisioningState;
+
+ /** Creates an instance of AdvancedThreatProtectionProperties class. */
+ public AdvancedThreatProtectionProperties() {
+ }
+
+ /**
+ * Get the creationTime property: Specifies the UTC creation time of the policy.
+ *
+ * @return the creationTime value.
+ */
+ public OffsetDateTime creationTime() {
+ return this.creationTime;
+ }
+
+ /**
+ * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @return the state value.
+ */
+ public AdvancedThreatProtectionState state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @param state the state value to set.
+ * @return the AdvancedThreatProtectionProperties object itself.
+ */
+ public AdvancedThreatProtectionProperties withState(AdvancedThreatProtectionState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the Threat Protection.
+ *
+ * @return the provisioningState value.
+ */
+ public AdvancedThreatProtectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionUpdateProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionUpdateProperties.java
new file mode 100644
index 000000000000..b6f31461690d
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionUpdateProperties.java
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of Advanced Threat Protection that can be updated. */
+@Fluent
+public final class AdvancedThreatProtectionUpdateProperties {
+ /*
+ * Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been
+ * applied yet on the specific database or server.
+ */
+ @JsonProperty(value = "state", required = true)
+ private AdvancedThreatProtectionState state;
+
+ /** Creates an instance of AdvancedThreatProtectionUpdateProperties class. */
+ public AdvancedThreatProtectionUpdateProperties() {
+ }
+
+ /**
+ * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @return the state value.
+ */
+ public AdvancedThreatProtectionState state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @param state the state value to set.
+ * @return the AdvancedThreatProtectionUpdateProperties object itself.
+ */
+ public AdvancedThreatProtectionUpdateProperties withState(AdvancedThreatProtectionState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (state() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property state in model AdvancedThreatProtectionUpdateProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionUpdateProperties.class);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AzureADAdministratorInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AzureADAdministratorInner.java
index 8903f56b030d..f5e3e16e0a2c 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AzureADAdministratorInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AzureADAdministratorInner.java
@@ -20,7 +20,7 @@ public final class AzureADAdministratorInner extends ProxyResource {
private AdministratorProperties innerProperties;
/*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -39,7 +39,7 @@ private AdministratorProperties innerProperties() {
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseInner.java
index 0a0e178a7ee5..919f9588d284 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseInner.java
@@ -6,6 +6,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.core.management.exception.ManagementError;
import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatus;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -45,9 +46,13 @@ public final class BackupAndExportResponseInner extends ProxyResource {
private BackupAndExportResponseProperties innerProperties;
/*
- * Error Response
- *
- * The BackupAndExport operation error response.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * The error object.
*/
@JsonProperty(value = "error")
private ManagementError error;
@@ -146,9 +151,16 @@ private BackupAndExportResponseProperties innerProperties() {
}
/**
- * Get the error property: Error Response
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * The BackupAndExport operation error response.
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the error property: The error object.
*
* @return the error value.
*/
@@ -157,9 +169,7 @@ public ManagementError error() {
}
/**
- * Set the error property: Error Response
- *
- *
The BackupAndExport operation error response.
+ * Set the error property: The error object.
*
* @param error the error value to set.
* @return the BackupAndExportResponseInner object itself.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityInner.java
new file mode 100644
index 000000000000..33d620648022
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityInner.java
@@ -0,0 +1,89 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerEditionCapabilityV2;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersionCapabilityV2;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Represents a location capability set. */
+@Immutable
+public final class CapabilityInner extends ProxyResource {
+ /*
+ * The properties of a location capability set.
+ */
+ @JsonProperty(value = "properties")
+ private CapabilityPropertiesV2 innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of CapabilityInner class. */
+ public CapabilityInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a location capability set.
+ *
+ * @return the innerProperties value.
+ */
+ private CapabilityPropertiesV2 innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the supportedGeoBackupRegions property: supported geo backup regions.
+ *
+ * @return the supportedGeoBackupRegions value.
+ */
+ public List supportedGeoBackupRegions() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportedGeoBackupRegions();
+ }
+
+ /**
+ * Get the supportedFlexibleServerEditions property: A list of supported flexible server editions.
+ *
+ * @return the supportedFlexibleServerEditions value.
+ */
+ public List supportedFlexibleServerEditions() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportedFlexibleServerEditions();
+ }
+
+ /**
+ * Get the supportedServerVersions property: A list of supported server versions.
+ *
+ * @return the supportedServerVersions value.
+ */
+ public List supportedServerVersions() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportedServerVersions();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesV2.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesV2.java
new file mode 100644
index 000000000000..8295fd21bffa
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesV2.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerEditionCapabilityV2;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersionCapabilityV2;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Location capability. */
+@Immutable
+public final class CapabilityPropertiesV2 {
+ /*
+ * supported geo backup regions
+ */
+ @JsonProperty(value = "supportedGeoBackupRegions", access = JsonProperty.Access.WRITE_ONLY)
+ private List supportedGeoBackupRegions;
+
+ /*
+ * A list of supported flexible server editions.
+ */
+ @JsonProperty(value = "supportedFlexibleServerEditions", access = JsonProperty.Access.WRITE_ONLY)
+ private List supportedFlexibleServerEditions;
+
+ /*
+ * A list of supported server versions.
+ */
+ @JsonProperty(value = "supportedServerVersions", access = JsonProperty.Access.WRITE_ONLY)
+ private List supportedServerVersions;
+
+ /** Creates an instance of CapabilityPropertiesV2 class. */
+ public CapabilityPropertiesV2() {
+ }
+
+ /**
+ * Get the supportedGeoBackupRegions property: supported geo backup regions.
+ *
+ * @return the supportedGeoBackupRegions value.
+ */
+ public List supportedGeoBackupRegions() {
+ return this.supportedGeoBackupRegions;
+ }
+
+ /**
+ * Get the supportedFlexibleServerEditions property: A list of supported flexible server editions.
+ *
+ * @return the supportedFlexibleServerEditions value.
+ */
+ public List supportedFlexibleServerEditions() {
+ return this.supportedFlexibleServerEditions;
+ }
+
+ /**
+ * Get the supportedServerVersions property: A list of supported server versions.
+ *
+ * @return the supportedServerVersions value.
+ */
+ public List supportedServerVersions() {
+ return this.supportedServerVersions;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (supportedFlexibleServerEditions() != null) {
+ supportedFlexibleServerEditions().forEach(e -> e.validate());
+ }
+ if (supportedServerVersions() != null) {
+ supportedServerVersions().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationInner.java
index 4357c0385ca3..7ae574543ccc 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationInner.java
@@ -23,7 +23,7 @@ public final class ConfigurationInner extends ProxyResource {
private ConfigurationProperties innerProperties;
/*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -42,7 +42,7 @@ private ConfigurationProperties innerProperties() {
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/DatabaseInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/DatabaseInner.java
index 5e05985e128c..79d6d97cb8cd 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/DatabaseInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/DatabaseInner.java
@@ -19,7 +19,7 @@ public final class DatabaseInner extends ProxyResource {
private DatabaseProperties innerProperties;
/*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -38,7 +38,7 @@ private DatabaseProperties innerProperties() {
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/FirewallRuleInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/FirewallRuleInner.java
index 89fb5eb8a280..a2074b6ae73b 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/FirewallRuleInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/FirewallRuleInner.java
@@ -20,7 +20,7 @@ public final class FirewallRuleInner extends ProxyResource {
private FirewallRuleProperties innerProperties = new FirewallRuleProperties();
/*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -39,7 +39,7 @@ private FirewallRuleProperties innerProperties() {
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileInner.java
index 511bd0fe65b3..727e90ad3b3a 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileInner.java
@@ -20,7 +20,7 @@ public final class LogFileInner extends ProxyResource {
private LogFileProperties innerProperties;
/*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -39,7 +39,7 @@ private LogFileProperties innerProperties() {
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/OperationStatusExtendedResultInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/OperationStatusExtendedResultInner.java
new file mode 100644
index 000000000000..09dcbe2b4c7c
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/OperationStatusExtendedResultInner.java
@@ -0,0 +1,115 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusResult;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+
+/** Represents Operation Results API Response. */
+@Fluent
+public final class OperationStatusExtendedResultInner extends OperationStatusResult {
+ /*
+ * The extended properties of Operation Results
+ */
+ @JsonProperty(value = "properties")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map properties;
+
+ /** Creates an instance of OperationStatusExtendedResultInner class. */
+ public OperationStatusExtendedResultInner() {
+ }
+
+ /**
+ * Get the properties property: The extended properties of Operation Results.
+ *
+ * @return the properties value.
+ */
+ public Map properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The extended properties of Operation Results.
+ *
+ * @param properties the properties value to set.
+ * @return the OperationStatusExtendedResultInner object itself.
+ */
+ public OperationStatusExtendedResultInner withProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public OperationStatusExtendedResultInner withId(String id) {
+ super.withId(id);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public OperationStatusExtendedResultInner withName(String name) {
+ super.withName(name);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public OperationStatusExtendedResultInner withStatus(String status) {
+ super.withStatus(status);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public OperationStatusExtendedResultInner withPercentComplete(Float percentComplete) {
+ super.withPercentComplete(percentComplete);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public OperationStatusExtendedResultInner withStartTime(OffsetDateTime startTime) {
+ super.withStartTime(startTime);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public OperationStatusExtendedResultInner withEndTime(OffsetDateTime endTime) {
+ super.withEndTime(endTime);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public OperationStatusExtendedResultInner withOperations(List operations) {
+ super.withOperations(operations);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public OperationStatusExtendedResultInner withError(ManagementError error) {
+ super.withError(error);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 000000000000..168998f51dd8
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpoint;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of the private endpoint connection. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ /*
+ * The group ids for the private endpoint resource.
+ */
+ @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List groupIds;
+
+ /*
+ * The private endpoint resource.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /** Creates an instance of PrivateEndpointConnectionProperties class. */
+ public PrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * Get the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.groupIds;
+ }
+
+ /**
+ * Get the privateEndpoint property: The private endpoint resource.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: The private endpoint resource.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property privateLinkServiceConnectionState in model"
+ + " PrivateEndpointConnectionProperties"));
+ } else {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupInner.java
index 207507edf997..0285f8298b7f 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupInner.java
@@ -20,7 +20,7 @@ public final class ServerBackupInner extends ProxyResource {
private ServerBackupProperties innerProperties;
/*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -39,7 +39,7 @@ private ServerBackupProperties innerProperties() {
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerInner.java
index c413157dccf5..0a774e9d742f 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerInner.java
@@ -11,16 +11,19 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.CreateMode;
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryption;
import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailability;
-import com.azure.resourcemanager.mysqlflexibleserver.models.Identity;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ImportSourceProperties;
import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceWindow;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MySqlServerIdentity;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MySqlServerSku;
import com.azure.resourcemanager.mysqlflexibleserver.models.Network;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointConnection;
import com.azure.resourcemanager.mysqlflexibleserver.models.ReplicationRole;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerState;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersion;
-import com.azure.resourcemanager.mysqlflexibleserver.models.Sku;
import com.azure.resourcemanager.mysqlflexibleserver.models.Storage;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
+import java.util.List;
import java.util.Map;
/** Represents a server. */
@@ -30,13 +33,13 @@ public final class ServerInner extends Resource {
* The cmk identity for the server.
*/
@JsonProperty(value = "identity")
- private Identity identity;
+ private MySqlServerIdentity identity;
/*
* The SKU (pricing tier) of the server.
*/
@JsonProperty(value = "sku")
- private Sku sku;
+ private MySqlServerSku sku;
/*
* Properties of the server.
@@ -45,7 +48,7 @@ public final class ServerInner extends Resource {
private ServerProperties innerProperties;
/*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -59,7 +62,7 @@ public ServerInner() {
*
* @return the identity value.
*/
- public Identity identity() {
+ public MySqlServerIdentity identity() {
return this.identity;
}
@@ -69,7 +72,7 @@ public Identity identity() {
* @param identity the identity value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withIdentity(Identity identity) {
+ public ServerInner withIdentity(MySqlServerIdentity identity) {
this.identity = identity;
return this;
}
@@ -79,7 +82,7 @@ public ServerInner withIdentity(Identity identity) {
*
* @return the sku value.
*/
- public Sku sku() {
+ public MySqlServerSku sku() {
return this.sku;
}
@@ -89,7 +92,7 @@ public Sku sku() {
* @param sku the sku value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withSku(Sku sku) {
+ public ServerInner withSku(MySqlServerSku sku) {
this.sku = sku;
return this;
}
@@ -104,7 +107,7 @@ private ServerProperties innerProperties() {
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -458,6 +461,15 @@ public ServerInner withNetwork(Network network) {
return this;
}
+ /**
+ * Get the privateEndpointConnections property: PrivateEndpointConnections related properties of a server.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
+ }
+
/**
* Get the maintenanceWindow property: Maintenance window of a server.
*
@@ -481,6 +493,29 @@ public ServerInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
return this;
}
+ /**
+ * Get the importSourceProperties property: Source properties for import from storage.
+ *
+ * @return the importSourceProperties value.
+ */
+ public ImportSourceProperties importSourceProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().importSourceProperties();
+ }
+
+ /**
+ * Set the importSourceProperties property: Source properties for import from storage.
+ *
+ * @param importSourceProperties the importSourceProperties value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withImportSourceProperties(ImportSourceProperties importSourceProperties) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withImportSourceProperties(importSourceProperties);
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerProperties.java
index 42bb3aaf094b..fa5be895a5ae 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerProperties.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerProperties.java
@@ -9,14 +9,17 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.CreateMode;
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryption;
import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailability;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ImportSourceProperties;
import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceWindow;
import com.azure.resourcemanager.mysqlflexibleserver.models.Network;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointConnection;
import com.azure.resourcemanager.mysqlflexibleserver.models.ReplicationRole;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerState;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersion;
import com.azure.resourcemanager.mysqlflexibleserver.models.Storage;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
+import java.util.List;
/** The properties of a server. */
@Fluent
@@ -118,12 +121,24 @@ public final class ServerProperties {
@JsonProperty(value = "network")
private Network network;
+ /*
+ * PrivateEndpointConnections related properties of a server.
+ */
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
/*
* Maintenance window of a server.
*/
@JsonProperty(value = "maintenanceWindow")
private MaintenanceWindow maintenanceWindow;
+ /*
+ * Source properties for import from storage.
+ */
+ @JsonProperty(value = "importSourceProperties")
+ private ImportSourceProperties importSourceProperties;
+
/** Creates an instance of ServerProperties class. */
public ServerProperties() {
}
@@ -421,6 +436,15 @@ public ServerProperties withNetwork(Network network) {
return this;
}
+ /**
+ * Get the privateEndpointConnections property: PrivateEndpointConnections related properties of a server.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
/**
* Get the maintenanceWindow property: Maintenance window of a server.
*
@@ -441,6 +465,26 @@ public ServerProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindo
return this;
}
+ /**
+ * Get the importSourceProperties property: Source properties for import from storage.
+ *
+ * @return the importSourceProperties value.
+ */
+ public ImportSourceProperties importSourceProperties() {
+ return this.importSourceProperties;
+ }
+
+ /**
+ * Set the importSourceProperties property: Source properties for import from storage.
+ *
+ * @param importSourceProperties the importSourceProperties value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withImportSourceProperties(ImportSourceProperties importSourceProperties) {
+ this.importSourceProperties = importSourceProperties;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -462,8 +506,14 @@ public void validate() {
if (network() != null) {
network().validate();
}
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
if (maintenanceWindow() != null) {
maintenanceWindow().validate();
}
+ if (importSourceProperties() != null) {
+ importSourceProperties().validate();
+ }
}
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionImpl.java
new file mode 100644
index 000000000000..c9eff5442a10
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionImpl.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtection;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+import java.time.OffsetDateTime;
+
+public final class AdvancedThreatProtectionImpl implements AdvancedThreatProtection {
+ private AdvancedThreatProtectionInner innerObject;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ AdvancedThreatProtectionImpl(
+ AdvancedThreatProtectionInner innerObject,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public OffsetDateTime creationTime() {
+ return this.innerModel().creationTime();
+ }
+
+ public AdvancedThreatProtectionState state() {
+ return this.innerModel().state();
+ }
+
+ public AdvancedThreatProtectionProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public AdvancedThreatProtectionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java
new file mode 100644
index 000000000000..4d787326756d
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java
@@ -0,0 +1,899 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionForUpdate;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionListResult;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in AdvancedThreatProtectionSettingsClient.
+ */
+public final class AdvancedThreatProtectionSettingsClientImpl implements AdvancedThreatProtectionSettingsClient {
+ /** The proxy service used to perform REST calls. */
+ private final AdvancedThreatProtectionSettingsService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AdvancedThreatProtectionSettingsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AdvancedThreatProtectionSettingsClientImpl(MySqlManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ AdvancedThreatProtectionSettingsService.class,
+ client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientAdvancedThreatProtectionSettings to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ public interface AdvancedThreatProtectionSettingsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") AdvancedThreatProtectionForUpdate parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (advancedThreatProtectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter advancedThreatProtectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2023-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ serverName,
+ advancedThreatProtectionName,
+ this.client.getSubscriptionId(),
+ apiVersion,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (advancedThreatProtectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter advancedThreatProtectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2023-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ serverName,
+ advancedThreatProtectionName,
+ this.client.getSubscriptionId(),
+ apiVersion,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName) {
+ return getWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ Context context) {
+ return getWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName, context).block();
+ }
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdvancedThreatProtectionInner get(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName) {
+ return getWithResponse(resourceGroupName, serverName, advancedThreatProtectionName, Context.NONE).getValue();
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (advancedThreatProtectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter advancedThreatProtectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2023-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ serverName,
+ advancedThreatProtectionName,
+ this.client.getSubscriptionId(),
+ apiVersion,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (advancedThreatProtectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter advancedThreatProtectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2023-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ serverName,
+ advancedThreatProtectionName,
+ this.client.getSubscriptionId(),
+ apiVersion,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, AdvancedThreatProtectionInner> beginUpdateAsync(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ AdvancedThreatProtectionInner.class,
+ AdvancedThreatProtectionInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, AdvancedThreatProtectionInner> beginUpdateAsync(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ AdvancedThreatProtectionInner.class,
+ AdvancedThreatProtectionInner.class,
+ context);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AdvancedThreatProtectionInner> beginUpdate(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters) {
+ return this
+ .beginUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters)
+ .getSyncPoller();
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AdvancedThreatProtectionInner> beginUpdate(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters,
+ Context context) {
+ return this
+ .beginUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters) {
+ return beginUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters,
+ Context context) {
+ return beginUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdvancedThreatProtectionInner update(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters) {
+ return updateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters).block();
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdvancedThreatProtectionInner update(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters,
+ Context context) {
+ return updateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context).block();
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String serverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2023-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ serverName,
+ this.client.getSubscriptionId(),
+ apiVersion,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String serverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2023-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ serverName,
+ this.client.getSubscriptionId(),
+ apiVersion,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String serverName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, serverName), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String serverName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, serverName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String serverName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, serverName));
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String serverName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, serverName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of the server's Advanced Threat Protection configurations along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of the server's Advanced Threat Protection configurations along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java
new file mode 100644
index 000000000000..bb850f234353
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtection;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionForUpdate;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionSettings;
+
+public final class AdvancedThreatProtectionSettingsImpl implements AdvancedThreatProtectionSettings {
+ private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsImpl.class);
+
+ private final AdvancedThreatProtectionSettingsClient innerClient;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ public AdvancedThreatProtectionSettingsImpl(
+ AdvancedThreatProtectionSettingsClient innerClient,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, serverName, advancedThreatProtectionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AdvancedThreatProtectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AdvancedThreatProtection get(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName) {
+ AdvancedThreatProtectionInner inner =
+ this.serviceClient().get(resourceGroupName, serverName, advancedThreatProtectionName);
+ if (inner != null) {
+ return new AdvancedThreatProtectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public AdvancedThreatProtection update(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters) {
+ AdvancedThreatProtectionInner inner =
+ this.serviceClient().update(resourceGroupName, serverName, advancedThreatProtectionName, parameters);
+ if (inner != null) {
+ return new AdvancedThreatProtectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public AdvancedThreatProtection update(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters,
+ Context context) {
+ AdvancedThreatProtectionInner inner =
+ this
+ .serviceClient()
+ .update(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context);
+ if (inner != null) {
+ return new AdvancedThreatProtectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceGroupName, String serverName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, serverName);
+ return Utils.mapPage(inner, inner1 -> new AdvancedThreatProtectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String serverName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, serverName, context);
+ return Utils.mapPage(inner, inner1 -> new AdvancedThreatProtectionImpl(inner1, this.manager()));
+ }
+
+ private AdvancedThreatProtectionSettingsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorsClientImpl.java
index ec983c8ec867..d8048402daa3 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorsClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorsClientImpl.java
@@ -183,7 +183,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -250,7 +250,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -506,7 +506,7 @@ private Mono>> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter administratorName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -562,7 +562,7 @@ private Mono>> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter administratorName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -765,7 +765,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter administratorName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -822,7 +822,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter administratorName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -923,7 +923,7 @@ private Mono> listByServerSinglePageAsy
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -983,7 +983,7 @@ private Mono> listByServerSinglePageAsy
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportResponseImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportResponseImpl.java
index 6200fdecdb31..236b6c0f0d71 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportResponseImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportResponseImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+import com.azure.core.management.SystemData;
import com.azure.core.management.exception.ManagementError;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseInner;
import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportResponse;
@@ -50,6 +51,10 @@ public Double percentComplete() {
return this.innerModel().percentComplete();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public ManagementError error() {
return this.innerModel().error();
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportsClientImpl.java
index 6eb944a5fa10..c4a86377b6ac 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportsClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportsClientImpl.java
@@ -128,7 +128,7 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -186,7 +186,7 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -396,7 +396,7 @@ private Mono> validateBackupWithResponseAs
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -447,7 +447,7 @@ private Mono> validateBackupWithResponseAs
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupsClientImpl.java
index e3426f53af40..8ba0d9b9df64 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupsClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupsClientImpl.java
@@ -147,7 +147,7 @@ private Mono> putWithResponseAsync(
if (backupName == null) {
return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -202,7 +202,7 @@ private Mono> putWithResponseAsync(
if (backupName == null) {
return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -304,7 +304,7 @@ private Mono> getWithResponseAsync(
if (backupName == null) {
return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -359,7 +359,7 @@ private Mono> getWithResponseAsync(
if (backupName == null) {
return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -457,7 +457,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -516,7 +516,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CapabilityImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CapabilityImpl.java
new file mode 100644
index 000000000000..7f64025398f7
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CapabilityImpl.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.Capability;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerEditionCapabilityV2;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersionCapabilityV2;
+import java.util.Collections;
+import java.util.List;
+
+public final class CapabilityImpl implements Capability {
+ private CapabilityInner innerObject;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ CapabilityImpl(
+ CapabilityInner innerObject, com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public List supportedGeoBackupRegions() {
+ List inner = this.innerModel().supportedGeoBackupRegions();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List supportedFlexibleServerEditions() {
+ List inner = this.innerModel().supportedFlexibleServerEditions();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List supportedServerVersions() {
+ List inner = this.innerModel().supportedServerVersions();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public CapabilityInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
index e8ade0c13226..3e0d3346c10d 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
@@ -105,7 +105,7 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -159,7 +159,7 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilityWithoutLocationsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilityWithoutLocationsClientImpl.java
index 1d771a3629cb..f20f4c681d4c 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilityWithoutLocationsClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilityWithoutLocationsClientImpl.java
@@ -106,7 +106,7 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -155,7 +155,7 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckVirtualNetworkSubnetUsagesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckVirtualNetworkSubnetUsagesClientImpl.java
index 4f32ae9315d0..dc9046a63a5c 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckVirtualNetworkSubnetUsagesClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckVirtualNetworkSubnetUsagesClientImpl.java
@@ -106,7 +106,7 @@ private Mono> executeWithResponse
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -158,7 +158,7 @@ private Mono> executeWithResponse
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationsClientImpl.java
index ea282327b1ca..c0788d4e29ce 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationsClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationsClientImpl.java
@@ -200,7 +200,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -267,7 +267,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -513,7 +513,7 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -580,7 +580,7 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -819,7 +819,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -876,7 +876,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -980,7 +980,7 @@ private Mono>> batchUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1037,7 +1037,7 @@ private Mono>> batchUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1251,7 +1251,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1325,7 +1325,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/DatabasesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/DatabasesClientImpl.java
index 53bb088a3083..9aec861999bd 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/DatabasesClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/DatabasesClientImpl.java
@@ -177,7 +177,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -239,7 +239,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -460,7 +460,7 @@ private Mono>> deleteWithResponseAsync(
if (databaseName == null) {
return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -515,7 +515,7 @@ private Mono>> deleteWithResponseAsync(
if (databaseName == null) {
return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -713,7 +713,7 @@ private Mono> getWithResponseAsync(
if (databaseName == null) {
return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -768,7 +768,7 @@ private Mono> getWithResponseAsync(
if (databaseName == null) {
return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -866,7 +866,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -925,7 +925,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/FirewallRulesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/FirewallRulesClientImpl.java
index df8ca09c2ece..2e10c0008723 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/FirewallRulesClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/FirewallRulesClientImpl.java
@@ -178,7 +178,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -245,7 +245,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -485,7 +485,7 @@ private Mono>> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -541,7 +541,7 @@ private Mono>> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -743,7 +743,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -800,7 +800,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -898,7 +898,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -957,7 +957,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java
index d2e657c1d9f6..ae9b1e24c070 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java
@@ -79,7 +79,7 @@ private Mono> executeWithResponse
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.execute(this.client.getEndpoint(), apiVersion, accept, context))
@@ -104,7 +104,7 @@ private Mono> executeWithResponse
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service.execute(this.client.getEndpoint(), apiVersion, accept, context);
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java
index 8c0c04a24a47..f4eb29f7d57f 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java
@@ -108,7 +108,7 @@ private Mono> listSinglePageAsync(Strin
if (locationName == null) {
return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -161,7 +161,7 @@ private Mono> listSinglePageAsync(Strin
if (locationName == null) {
return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsClientImpl.java
new file mode 100644
index 000000000000..d4632d202a8b
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsClientImpl.java
@@ -0,0 +1,470 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.LocationBasedCapabilitySetsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.CapabilitySetsList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in LocationBasedCapabilitySetsClient. */
+public final class LocationBasedCapabilitySetsClientImpl implements LocationBasedCapabilitySetsClient {
+ /** The proxy service used to perform REST calls. */
+ private final LocationBasedCapabilitySetsService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of LocationBasedCapabilitySetsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ LocationBasedCapabilitySetsClientImpl(MySqlManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ LocationBasedCapabilitySetsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientLocationBasedCapabilitySets to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ public interface LocationBasedCapabilitySetsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilitySets")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationName") String locationName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilitySets/{capabilitySetName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationName") String locationName,
+ @PathParam("capabilitySetName") String capabilitySetName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String locationName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-06-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ locationName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String locationName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-06-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), locationName, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String locationName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(locationName), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String locationName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(locationName, context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String locationName) {
+ return new PagedIterable<>(listAsync(locationName));
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String locationName, Context context) {
+ return new PagedIterable<>(listAsync(locationName, context));
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param capabilitySetName Name of capability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String locationName, String capabilitySetName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (capabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter capabilitySetName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-06-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ locationName,
+ capabilitySetName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param capabilitySetName Name of capability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String locationName, String capabilitySetName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (capabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter capabilitySetName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-06-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ locationName,
+ capabilitySetName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param capabilitySetName Name of capability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String locationName, String capabilitySetName) {
+ return getWithResponseAsync(locationName, capabilitySetName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param capabilitySetName Name of capability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String locationName, String capabilitySetName, Context context) {
+ return getWithResponseAsync(locationName, capabilitySetName, context).block();
+ }
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param capabilitySetName Name of capability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CapabilityInner get(String locationName, String capabilitySetName) {
+ return getWithResponse(locationName, capabilitySetName, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return location capability set along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return location capability set along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsImpl.java
new file mode 100644
index 000000000000..10d0e99338cd
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsImpl.java
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.LocationBasedCapabilitySetsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.Capability;
+import com.azure.resourcemanager.mysqlflexibleserver.models.LocationBasedCapabilitySets;
+
+public final class LocationBasedCapabilitySetsImpl implements LocationBasedCapabilitySets {
+ private static final ClientLogger LOGGER = new ClientLogger(LocationBasedCapabilitySetsImpl.class);
+
+ private final LocationBasedCapabilitySetsClient innerClient;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ public LocationBasedCapabilitySetsImpl(
+ LocationBasedCapabilitySetsClient innerClient,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String locationName) {
+ PagedIterable inner = this.serviceClient().list(locationName);
+ return Utils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String locationName, Context context) {
+ PagedIterable inner = this.serviceClient().list(locationName, context);
+ return Utils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(String locationName, String capabilitySetName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(locationName, capabilitySetName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CapabilityImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Capability get(String locationName, String capabilitySetName) {
+ CapabilityInner inner = this.serviceClient().get(locationName, capabilitySetName);
+ if (inner != null) {
+ return new CapabilityImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private LocationBasedCapabilitySetsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LogFilesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LogFilesClientImpl.java
index b0ee993e1081..c6ba855c1aa6 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LogFilesClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LogFilesClientImpl.java
@@ -111,7 +111,7 @@ private Mono> listByServerSinglePageAsync(String res
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -170,7 +170,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/MySqlManagementClientBuilder.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/MySqlManagementClientBuilder.java
index 1c4c5ba62488..c63b32158063 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/MySqlManagementClientBuilder.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/MySqlManagementClientBuilder.java
@@ -18,12 +18,12 @@
@ServiceClientBuilder(serviceClients = {MySqlManagementClientImpl.class})
public final class MySqlManagementClientBuilder {
/*
- * The ID of the target subscription.
+ * The ID of the target subscription. The value must be an UUID.
*/
private String subscriptionId;
/**
- * Sets The ID of the target subscription.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
* @param subscriptionId the subscriptionId value.
* @return the MySqlManagementClientBuilder.
@@ -137,7 +137,7 @@ public MySqlManagementClientImpl buildClient() {
localSerializerAdapter,
localDefaultPollInterval,
localEnvironment,
- subscriptionId,
+ this.subscriptionId,
localEndpoint);
return client;
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/MySqlManagementClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/MySqlManagementClientImpl.java
index d342a6137625..68f2c0bc670d 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/MySqlManagementClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/MySqlManagementClientImpl.java
@@ -22,6 +22,7 @@
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.AzureADAdministratorsClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.BackupAndExportsClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.BackupsClient;
@@ -33,11 +34,14 @@
import com.azure.resourcemanager.mysqlflexibleserver.fluent.FirewallRulesClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.GetPrivateDnsZoneSuffixesClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.LocationBasedCapabilitiesClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.LocationBasedCapabilitySetsClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.LogFilesClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.MySqlManagementClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.OperationResultsClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.OperationsClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.ReplicasClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.ServersClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.ServersMigrationsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -50,11 +54,11 @@
/** Initializes a new instance of the MySqlManagementClientImpl type. */
@ServiceClient(builder = MySqlManagementClientBuilder.class)
public final class MySqlManagementClientImpl implements MySqlManagementClient {
- /** The ID of the target subscription. */
+ /** The ID of the target subscription. The value must be an UUID. */
private final String subscriptionId;
/**
- * Gets The ID of the target subscription.
+ * Gets The ID of the target subscription. The value must be an UUID.
*
* @return the subscriptionId value.
*/
@@ -206,6 +210,18 @@ public ReplicasClient getReplicas() {
return this.replicas;
}
+ /** The ServersMigrationsClient object to access its operations. */
+ private final ServersMigrationsClient serversMigrations;
+
+ /**
+ * Gets the ServersMigrationsClient object to access its operations.
+ *
+ * @return the ServersMigrationsClient object.
+ */
+ public ServersMigrationsClient getServersMigrations() {
+ return this.serversMigrations;
+ }
+
/** The LogFilesClient object to access its operations. */
private final LogFilesClient logFiles;
@@ -230,6 +246,18 @@ public LocationBasedCapabilitiesClient getLocationBasedCapabilities() {
return this.locationBasedCapabilities;
}
+ /** The LocationBasedCapabilitySetsClient object to access its operations. */
+ private final LocationBasedCapabilitySetsClient locationBasedCapabilitySets;
+
+ /**
+ * Gets the LocationBasedCapabilitySetsClient object to access its operations.
+ *
+ * @return the LocationBasedCapabilitySetsClient object.
+ */
+ public LocationBasedCapabilitySetsClient getLocationBasedCapabilitySets() {
+ return this.locationBasedCapabilitySets;
+ }
+
/** The CheckVirtualNetworkSubnetUsagesClient object to access its operations. */
private final CheckVirtualNetworkSubnetUsagesClient checkVirtualNetworkSubnetUsages;
@@ -266,6 +294,18 @@ public CheckNameAvailabilityWithoutLocationsClient getCheckNameAvailabilityWitho
return this.checkNameAvailabilityWithoutLocations;
}
+ /** The OperationResultsClient object to access its operations. */
+ private final OperationResultsClient operationResults;
+
+ /**
+ * Gets the OperationResultsClient object to access its operations.
+ *
+ * @return the OperationResultsClient object.
+ */
+ public OperationResultsClient getOperationResults() {
+ return this.operationResults;
+ }
+
/** The GetPrivateDnsZoneSuffixesClient object to access its operations. */
private final GetPrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes;
@@ -290,6 +330,18 @@ public OperationsClient getOperations() {
return this.operations;
}
+ /** The AdvancedThreatProtectionSettingsClient object to access its operations. */
+ private final AdvancedThreatProtectionSettingsClient advancedThreatProtectionSettings;
+
+ /**
+ * Gets the AdvancedThreatProtectionSettingsClient object to access its operations.
+ *
+ * @return the AdvancedThreatProtectionSettingsClient object.
+ */
+ public AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings() {
+ return this.advancedThreatProtectionSettings;
+ }
+
/**
* Initializes an instance of MySqlManagementClient client.
*
@@ -297,7 +349,7 @@ public OperationsClient getOperations() {
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId The ID of the target subscription.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
* @param endpoint server parameter.
*/
MySqlManagementClientImpl(
@@ -320,13 +372,17 @@ public OperationsClient getOperations() {
this.firewallRules = new FirewallRulesClientImpl(this);
this.servers = new ServersClientImpl(this);
this.replicas = new ReplicasClientImpl(this);
+ this.serversMigrations = new ServersMigrationsClientImpl(this);
this.logFiles = new LogFilesClientImpl(this);
this.locationBasedCapabilities = new LocationBasedCapabilitiesClientImpl(this);
+ this.locationBasedCapabilitySets = new LocationBasedCapabilitySetsClientImpl(this);
this.checkVirtualNetworkSubnetUsages = new CheckVirtualNetworkSubnetUsagesClientImpl(this);
this.checkNameAvailabilities = new CheckNameAvailabilitiesClientImpl(this);
this.checkNameAvailabilityWithoutLocations = new CheckNameAvailabilityWithoutLocationsClientImpl(this);
+ this.operationResults = new OperationResultsClientImpl(this);
this.getPrivateDnsZoneSuffixes = new GetPrivateDnsZoneSuffixesClientImpl(this);
this.operations = new OperationsClientImpl(this);
+ this.advancedThreatProtectionSettings = new AdvancedThreatProtectionSettingsClientImpl(this);
}
/**
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsClientImpl.java
new file mode 100644
index 000000000000..f8d8351942e2
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsClientImpl.java
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.OperationResultsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationStatusExtendedResultInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationResultsClient. */
+public final class OperationResultsClientImpl implements OperationResultsClient {
+ /** The proxy service used to perform REST calls. */
+ private final OperationResultsService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationResultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationResultsClientImpl(MySqlManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientOperationResults to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ public interface OperationResultsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/operationResults/{operationId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("locationName") String locationName,
+ @PathParam("operationId") String operationId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a long running operation along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String locationName, String operationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String apiVersion = "2023-06-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ apiVersion,
+ locationName,
+ operationId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The operation Id.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a long running operation along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String locationName, String operationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String apiVersion = "2023-06-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ apiVersion,
+ locationName,
+ operationId,
+ accept,
+ context);
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a long running operation on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String locationName, String operationId) {
+ return getWithResponseAsync(locationName, operationId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The operation Id.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a long running operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String locationName, String operationId, Context context) {
+ return getWithResponseAsync(locationName, operationId, context).block();
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusExtendedResultInner get(String locationName, String operationId) {
+ return getWithResponse(locationName, operationId, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsImpl.java
new file mode 100644
index 000000000000..f867a6c994e4
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsImpl.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.OperationResultsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationStatusExtendedResultInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationResults;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusExtendedResult;
+
+public final class OperationResultsImpl implements OperationResults {
+ private static final ClientLogger LOGGER = new ClientLogger(OperationResultsImpl.class);
+
+ private final OperationResultsClient innerClient;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ public OperationResultsImpl(
+ OperationResultsClient innerClient, com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(
+ String locationName, String operationId, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(locationName, operationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new OperationStatusExtendedResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatusExtendedResult get(String locationName, String operationId) {
+ OperationStatusExtendedResultInner inner = this.serviceClient().get(locationName, operationId);
+ if (inner != null) {
+ return new OperationStatusExtendedResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private OperationResultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationStatusExtendedResultImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationStatusExtendedResultImpl.java
new file mode 100644
index 000000000000..e406839809e4
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationStatusExtendedResultImpl.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationStatusExtendedResultInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusExtendedResult;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusResult;
+import java.time.OffsetDateTime;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class OperationStatusExtendedResultImpl implements OperationStatusExtendedResult {
+ private OperationStatusExtendedResultInner innerObject;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ OperationStatusExtendedResultImpl(
+ OperationStatusExtendedResultInner innerObject,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String resourceId() {
+ return this.innerModel().resourceId();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public Float percentComplete() {
+ return this.innerModel().percentComplete();
+ }
+
+ public OffsetDateTime startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public OffsetDateTime endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public List operations() {
+ List inner = this.innerModel().operations();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ManagementError error() {
+ return this.innerModel().error();
+ }
+
+ public Map properties() {
+ Map inner = this.innerModel().properties();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public OperationStatusExtendedResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationsClientImpl.java
index 0421db5b1224..81c3ee503441 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationsClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationsClientImpl.java
@@ -93,7 +93,7 @@ private Mono> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context))
@@ -127,7 +127,7 @@ private Mono> listSinglePageAsync(Context context)
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
+ final String apiVersion = "2023-06-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ReplicasClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ReplicasClientImpl.java
index ca2ddd3f5ef8..ee20b279eab1 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ReplicasClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ReplicasClientImpl.java
@@ -111,7 +111,7 @@ private Mono> listByServerSinglePageAsync(String reso
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -170,7 +170,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerImpl.java
index 6a239ccf4957..e729509e27f1 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerImpl.java
@@ -12,9 +12,12 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.CreateMode;
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryption;
import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailability;
-import com.azure.resourcemanager.mysqlflexibleserver.models.Identity;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ImportSourceProperties;
import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceWindow;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MySqlServerIdentity;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MySqlServerSku;
import com.azure.resourcemanager.mysqlflexibleserver.models.Network;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointConnection;
import com.azure.resourcemanager.mysqlflexibleserver.models.ReplicationRole;
import com.azure.resourcemanager.mysqlflexibleserver.models.Server;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerForUpdate;
@@ -22,10 +25,10 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParameter;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerState;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersion;
-import com.azure.resourcemanager.mysqlflexibleserver.models.Sku;
import com.azure.resourcemanager.mysqlflexibleserver.models.Storage;
import java.time.OffsetDateTime;
import java.util.Collections;
+import java.util.List;
import java.util.Map;
public final class ServerImpl implements Server, Server.Definition, Server.Update {
@@ -58,11 +61,11 @@ public Map tags() {
}
}
- public Identity identity() {
+ public MySqlServerIdentity identity() {
return this.innerModel().identity();
}
- public Sku sku() {
+ public MySqlServerSku sku() {
return this.innerModel().sku();
}
@@ -134,10 +137,23 @@ public Network network() {
return this.innerModel().network();
}
+ public List privateEndpointConnections() {
+ List inner = this.innerModel().privateEndpointConnections();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public MaintenanceWindow maintenanceWindow() {
return this.innerModel().maintenanceWindow();
}
+ public ImportSourceProperties importSourceProperties() {
+ return this.innerModel().importSourceProperties();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -303,7 +319,7 @@ public ServerImpl withTags(Map tags) {
}
}
- public ServerImpl withIdentity(Identity identity) {
+ public ServerImpl withIdentity(MySqlServerIdentity identity) {
if (isInCreateMode()) {
this.innerModel().withIdentity(identity);
return this;
@@ -313,7 +329,7 @@ public ServerImpl withIdentity(Identity identity) {
}
}
- public ServerImpl withSku(Sku sku) {
+ public ServerImpl withSku(MySqlServerSku sku) {
if (isInCreateMode()) {
this.innerModel().withSku(sku);
return this;
@@ -428,6 +444,11 @@ public ServerImpl withNetwork(Network network) {
}
}
+ public ServerImpl withImportSourceProperties(ImportSourceProperties importSourceProperties) {
+ this.innerModel().withImportSourceProperties(importSourceProperties);
+ return this;
+ }
+
public ServerImpl withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
this.updateParameters.withMaintenanceWindow(maintenanceWindow);
return this;
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersClientImpl.java
index 170838e9d66a..2b78f4f8d8ff 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersClientImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersClientImpl.java
@@ -281,7 +281,7 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -338,7 +338,7 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -543,7 +543,7 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -601,7 +601,7 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -807,7 +807,7 @@ private Mono>> deleteWithResponseAsync(String resource
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -857,7 +857,7 @@ private Mono>> deleteWithResponseAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1037,7 +1037,7 @@ private Mono> getByResourceGroupWithResponseAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1087,7 +1087,7 @@ private Mono> getByResourceGroupWithResponseAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1176,7 +1176,7 @@ private Mono> listByResourceGroupSinglePageAsync(Stri
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1230,7 +1230,7 @@ private Mono> listByResourceGroupSinglePageAsync(
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1335,7 +1335,7 @@ private Mono> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1377,7 +1377,7 @@ private Mono> listSinglePageAsync(Context context) {
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1477,7 +1477,7 @@ private Mono>> failoverWithResponseAsync(String resour
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1527,7 +1527,7 @@ private Mono>> failoverWithResponseAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1713,7 +1713,7 @@ private Mono>> restartWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1770,7 +1770,7 @@ private Mono>> restartWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1965,7 +1965,7 @@ private Mono>> startWithResponseAsync(String resourceG
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2015,7 +2015,7 @@ private Mono>> startWithResponseAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -2193,7 +2193,7 @@ private Mono>> stopWithResponseAsync(String resourceGr
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2243,7 +2243,7 @@ private Mono>> stopWithResponseAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -2428,7 +2428,7 @@ private Mono>> resetGtidWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2485,7 +2485,7 @@ private Mono>> resetGtidWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
+ final String apiVersion = "2023-10-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsClientImpl.java
new file mode 100644
index 000000000000..81e3f17a7e4a
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsClientImpl.java
@@ -0,0 +1,311 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.ServersMigrationsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ServersMigrationsClient. */
+public final class ServersMigrationsClientImpl implements ServersMigrationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ServersMigrationsService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ServersMigrationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ServersMigrationsClientImpl(MySqlManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ServersMigrationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientServersMigrations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ public interface ServersMigrationsService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/cutoverMigration")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> cutoverMigration(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cutoverMigrationWithResponseAsync(
+ String resourceGroupName, String serverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .cutoverMigration(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cutoverMigrationWithResponseAsync(
+ String resourceGroupName, String serverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .cutoverMigration(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context);
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ServerInner> beginCutoverMigrationAsync(
+ String resourceGroupName, String serverName) {
+ Mono>> mono = cutoverMigrationWithResponseAsync(resourceGroupName, serverName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, this.client.getContext());
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ServerInner> beginCutoverMigrationAsync(
+ String resourceGroupName, String serverName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ cutoverMigrationWithResponseAsync(resourceGroupName, serverName, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, context);
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ServerInner> beginCutoverMigration(
+ String resourceGroupName, String serverName) {
+ return this.beginCutoverMigrationAsync(resourceGroupName, serverName).getSyncPoller();
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ServerInner> beginCutoverMigration(
+ String resourceGroupName, String serverName, Context context) {
+ return this.beginCutoverMigrationAsync(resourceGroupName, serverName, context).getSyncPoller();
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cutoverMigrationAsync(String resourceGroupName, String serverName) {
+ return beginCutoverMigrationAsync(resourceGroupName, serverName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cutoverMigrationAsync(String resourceGroupName, String serverName, Context context) {
+ return beginCutoverMigrationAsync(resourceGroupName, serverName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ServerInner cutoverMigration(String resourceGroupName, String serverName) {
+ return cutoverMigrationAsync(resourceGroupName, serverName).block();
+ }
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ServerInner cutoverMigration(String resourceGroupName, String serverName, Context context) {
+ return cutoverMigrationAsync(resourceGroupName, serverName, context).block();
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsImpl.java
new file mode 100644
index 000000000000..ff600c6f4f24
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsImpl.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.ServersMigrationsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.Server;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServersMigrations;
+
+public final class ServersMigrationsImpl implements ServersMigrations {
+ private static final ClientLogger LOGGER = new ClientLogger(ServersMigrationsImpl.class);
+
+ private final ServersMigrationsClient innerClient;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ public ServersMigrationsImpl(
+ ServersMigrationsClient innerClient,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Server cutoverMigration(String resourceGroupName, String serverName) {
+ ServerInner inner = this.serviceClient().cutoverMigration(resourceGroupName, serverName);
+ if (inner != null) {
+ return new ServerImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Server cutoverMigration(String resourceGroupName, String serverName, Context context) {
+ ServerInner inner = this.serviceClient().cutoverMigration(resourceGroupName, serverName, context);
+ if (inner != null) {
+ return new ServerImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private ServersMigrationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/Utils.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/Utils.java
index fa57faf36a08..a3cf7af7cc7f 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/Utils.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/Utils.java
@@ -20,6 +20,9 @@
import reactor.core.publisher.Flux;
final class Utils {
+ private Utils() {
+ }
+
static String getValueFromIdByName(String id, String name) {
if (id == null) {
return null;
@@ -60,7 +63,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
segments.add(idSegment);
idItrReverted.forEachRemaining(segments::add);
Collections.reverse(segments);
- if (segments.size() > 0 && segments.get(0).isEmpty()) {
+ if (!segments.isEmpty() && segments.get(0).isEmpty()) {
segments.remove(0);
}
return String.join("/", segments);
@@ -74,7 +77,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
}
static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
- return new PagedIterableImpl(pageIterable, mapper);
+ return new PagedIterableImpl<>(pageIterable, mapper);
}
private static final class PagedIterableImpl extends PagedIterable {
@@ -133,30 +136,27 @@ public Stream> streamByPage(String continuationToken, int prefe
@Override
public Iterator iterator() {
- return new IteratorImpl(pagedIterable.iterator(), mapper);
+ return new IteratorImpl<>(pagedIterable.iterator(), mapper);
}
@Override
public Iterable> iterableByPage() {
- return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper);
+ return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper);
}
@Override
public Iterable> iterableByPage(String continuationToken) {
- return new IterableImpl, PagedResponse>(
- pagedIterable.iterableByPage(continuationToken), pageMapper);
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper);
}
@Override
public Iterable> iterableByPage(int preferredPageSize) {
- return new IterableImpl, PagedResponse>(
- pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper);
}
@Override
public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
- return new IterableImpl, PagedResponse>(
- pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
}
}
@@ -198,7 +198,7 @@ private IterableImpl(Iterable iterable, Function mapper) {
@Override
public Iterator iterator() {
- return new IteratorImpl(iterable.iterator(), mapper);
+ return new IteratorImpl<>(iterable.iterator(), mapper);
}
}
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtection.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtection.java
new file mode 100644
index 000000000000..f6ed5485a4cb
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtection.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+import java.time.OffsetDateTime;
+
+/** An immutable client-side representation of AdvancedThreatProtection. */
+public interface AdvancedThreatProtection {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the creationTime property: Specifies the UTC creation time of the policy.
+ *
+ * @return the creationTime value.
+ */
+ OffsetDateTime creationTime();
+
+ /**
+ * Gets the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @return the state value.
+ */
+ AdvancedThreatProtectionState state();
+
+ /**
+ * Gets the provisioningState property: Provisioning state of the Threat Protection.
+ *
+ * @return the provisioningState value.
+ */
+ AdvancedThreatProtectionProvisioningState provisioningState();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner object.
+ *
+ * @return the inner object.
+ */
+ AdvancedThreatProtectionInner innerModel();
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionForUpdate.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionForUpdate.java
new file mode 100644
index 000000000000..a140396df7cf
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionForUpdate.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionUpdateProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Parameters allowed to update advanced threat protection for a server. */
+@Fluent
+public final class AdvancedThreatProtectionForUpdate {
+ /*
+ * Resource update properties.
+ */
+ @JsonProperty(value = "properties")
+ private AdvancedThreatProtectionUpdateProperties innerProperties;
+
+ /** Creates an instance of AdvancedThreatProtectionForUpdate class. */
+ public AdvancedThreatProtectionForUpdate() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource update properties.
+ *
+ * @return the innerProperties value.
+ */
+ private AdvancedThreatProtectionUpdateProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @return the state value.
+ */
+ public AdvancedThreatProtectionState state() {
+ return this.innerProperties() == null ? null : this.innerProperties().state();
+ }
+
+ /**
+ * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @param state the state value to set.
+ * @return the AdvancedThreatProtectionForUpdate object itself.
+ */
+ public AdvancedThreatProtectionForUpdate withState(AdvancedThreatProtectionState state) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdvancedThreatProtectionUpdateProperties();
+ }
+ this.innerProperties().withState(state);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionListResult.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionListResult.java
new file mode 100644
index 000000000000..41e22a007d3e
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionListResult.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of the server's Advanced Threat Protection configurations. */
+@Immutable
+public final class AdvancedThreatProtectionListResult {
+ /*
+ * Array of results.
+ */
+ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
+ private List value;
+
+ /*
+ * Link to retrieve next page of results.
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /** Creates an instance of AdvancedThreatProtectionListResult class. */
+ public AdvancedThreatProtectionListResult() {
+ }
+
+ /**
+ * Get the value property: Array of results.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: Link to retrieve next page of results.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionName.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionName.java
new file mode 100644
index 000000000000..790407361601
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionName.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for AdvancedThreatProtectionName. */
+public final class AdvancedThreatProtectionName extends ExpandableStringEnum {
+ /** Static value Default for AdvancedThreatProtectionName. */
+ public static final AdvancedThreatProtectionName DEFAULT = fromString("Default");
+
+ /**
+ * Creates a new instance of AdvancedThreatProtectionName value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public AdvancedThreatProtectionName() {
+ }
+
+ /**
+ * Creates or finds a AdvancedThreatProtectionName from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding AdvancedThreatProtectionName.
+ */
+ @JsonCreator
+ public static AdvancedThreatProtectionName fromString(String name) {
+ return fromString(name, AdvancedThreatProtectionName.class);
+ }
+
+ /**
+ * Gets known AdvancedThreatProtectionName values.
+ *
+ * @return known AdvancedThreatProtectionName values.
+ */
+ public static Collection values() {
+ return values(AdvancedThreatProtectionName.class);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionProvisioningState.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionProvisioningState.java
new file mode 100644
index 000000000000..137f085ce78f
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionProvisioningState.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** The current provisioning state. */
+public final class AdvancedThreatProtectionProvisioningState
+ extends ExpandableStringEnum {
+ /** Static value Succeeded for AdvancedThreatProtectionProvisioningState. */
+ public static final AdvancedThreatProtectionProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Updating for AdvancedThreatProtectionProvisioningState. */
+ public static final AdvancedThreatProtectionProvisioningState UPDATING = fromString("Updating");
+
+ /** Static value Canceled for AdvancedThreatProtectionProvisioningState. */
+ public static final AdvancedThreatProtectionProvisioningState CANCELED = fromString("Canceled");
+
+ /** Static value Failed for AdvancedThreatProtectionProvisioningState. */
+ public static final AdvancedThreatProtectionProvisioningState FAILED = fromString("Failed");
+
+ /**
+ * Creates a new instance of AdvancedThreatProtectionProvisioningState value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public AdvancedThreatProtectionProvisioningState() {
+ }
+
+ /**
+ * Creates or finds a AdvancedThreatProtectionProvisioningState from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding AdvancedThreatProtectionProvisioningState.
+ */
+ @JsonCreator
+ public static AdvancedThreatProtectionProvisioningState fromString(String name) {
+ return fromString(name, AdvancedThreatProtectionProvisioningState.class);
+ }
+
+ /**
+ * Gets known AdvancedThreatProtectionProvisioningState values.
+ *
+ * @return known AdvancedThreatProtectionProvisioningState values.
+ */
+ public static Collection values() {
+ return values(AdvancedThreatProtectionProvisioningState.class);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionSettings.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionSettings.java
new file mode 100644
index 000000000000..49c921837327
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionSettings.java
@@ -0,0 +1,107 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of AdvancedThreatProtectionSettings. */
+public interface AdvancedThreatProtectionSettings {
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state along with {@link Response}.
+ */
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ Context context);
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state.
+ */
+ AdvancedThreatProtection get(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ AdvancedThreatProtection update(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ AdvancedThreatProtection update(
+ String resourceGroupName,
+ String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters,
+ Context context);
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionState.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionState.java
new file mode 100644
index 000000000000..bd618b3ccf42
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AdvancedThreatProtectionState.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled on the server. */
+public final class AdvancedThreatProtectionState extends ExpandableStringEnum {
+ /** Static value Enabled for AdvancedThreatProtectionState. */
+ public static final AdvancedThreatProtectionState ENABLED = fromString("Enabled");
+
+ /** Static value Disabled for AdvancedThreatProtectionState. */
+ public static final AdvancedThreatProtectionState DISABLED = fromString("Disabled");
+
+ /**
+ * Creates a new instance of AdvancedThreatProtectionState value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public AdvancedThreatProtectionState() {
+ }
+
+ /**
+ * Creates or finds a AdvancedThreatProtectionState from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding AdvancedThreatProtectionState.
+ */
+ @JsonCreator
+ public static AdvancedThreatProtectionState fromString(String name) {
+ return fromString(name, AdvancedThreatProtectionState.class);
+ }
+
+ /**
+ * Gets known AdvancedThreatProtectionState values.
+ *
+ * @return known AdvancedThreatProtectionState values.
+ */
+ public static Collection