, 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/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..80b643d8e5e4 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
@@ -45,9 +45,7 @@ public final class BackupAndExportResponseInner extends ProxyResource {
private BackupAndExportResponseProperties innerProperties;
/*
- * Error Response
- *
- * The BackupAndExport operation error response.
+ * The error object.
*/
@JsonProperty(value = "error")
private ManagementError error;
@@ -146,9 +144,7 @@ private BackupAndExportResponseProperties innerProperties() {
}
/**
- * Get the error property: Error Response
- *
- * The BackupAndExport operation error response.
+ * Get the error property: The error object.
*
* @return the error value.
*/
@@ -157,9 +153,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..61fcdfa42f7e
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityInner.java
@@ -0,0 +1,73 @@
+// 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.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;
+
+ /** 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 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..542dedef230d 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
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
import com.azure.resourcemanager.mysqlflexibleserver.models.IsConfigPendingRestart;
import com.azure.resourcemanager.mysqlflexibleserver.models.IsDynamicConfig;
@@ -22,12 +21,6 @@ public final class ConfigurationInner extends ProxyResource {
@JsonProperty(value = "properties")
private ConfigurationProperties innerProperties;
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of ConfigurationInner class. */
public ConfigurationInner() {
}
@@ -41,15 +34,6 @@ private ConfigurationProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the value property: Value of the configuration.
*
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..2f35ec0c8214 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
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Represents a Database. */
@@ -18,12 +17,6 @@ public final class DatabaseInner extends ProxyResource {
@JsonProperty(value = "properties")
private DatabaseProperties innerProperties;
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of DatabaseInner class. */
public DatabaseInner() {
}
@@ -37,15 +30,6 @@ private DatabaseProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the charset property: The charset of the database.
*
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..5fdcb6f3e6d6 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
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -19,12 +18,6 @@ public final class FirewallRuleInner extends ProxyResource {
@JsonProperty(value = "properties", required = true)
private FirewallRuleProperties innerProperties = new FirewallRuleProperties();
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of FirewallRuleInner class. */
public FirewallRuleInner() {
}
@@ -38,15 +31,6 @@ private FirewallRuleProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
*
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..597650beb8e3 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
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
@@ -19,12 +18,6 @@ public final class LogFileInner extends ProxyResource {
@JsonProperty(value = "properties")
private LogFileProperties innerProperties;
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of LogFileInner class. */
public LogFileInner() {
}
@@ -38,15 +31,6 @@ private LogFileProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the sizeInKB property: The size in kb of the logFile.
*
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..c0e203cb6294 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
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
@@ -19,12 +18,6 @@ public final class ServerBackupInner extends ProxyResource {
@JsonProperty(value = "properties")
private ServerBackupProperties innerProperties;
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of ServerBackupInner class. */
public ServerBackupInner() {
}
@@ -38,15 +31,6 @@ private ServerBackupProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the backupType property: Backup type.
*
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..06e3c4e6aa2e 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,29 @@ 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();
+ }
+
+ /**
+ * Set the privateEndpointConnections property: PrivateEndpointConnections related properties of a server.
+ *
+ * @param privateEndpointConnections the privateEndpointConnections value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withPrivateEndpointConnections(List privateEndpointConnections) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withPrivateEndpointConnections(privateEndpointConnections);
+ return this;
+ }
+
/**
* Get the maintenanceWindow property: Maintenance window of a server.
*
@@ -481,6 +507,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..15dd8690ea21 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")
+ 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,26 @@ 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;
+ }
+
+ /**
+ * Set the privateEndpointConnections property: PrivateEndpointConnections related properties of a server.
+ *
+ * @param privateEndpointConnections the privateEndpointConnections value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withPrivateEndpointConnections(List privateEndpointConnections) {
+ this.privateEndpointConnections = privateEndpointConnections;
+ return this;
+ }
+
/**
* Get the maintenanceWindow property: Maintenance window of a server.
*
@@ -441,6 +476,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 +517,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/AzureADAdministratorsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorsClientImpl.java
index ec983c8ec867..b06d84764e33 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,6 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -191,7 +190,7 @@ private Mono>> createOrUpdateWithResponseAsync(
service
.createOrUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -250,13 +249,12 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.createOrUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -506,7 +504,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -514,7 +511,7 @@ private Mono>> deleteWithResponseAsync(
service
.delete(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -562,13 +559,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.delete(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -765,7 +761,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -773,7 +768,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -822,13 +817,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -923,7 +917,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -931,7 +924,7 @@ private Mono> listByServerSinglePageAsy
service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -983,13 +976,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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..e9ed8b20eeaa 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,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -136,7 +135,7 @@ private Mono>> createWithResponseAsync(
service
.create(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -186,13 +185,12 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.create(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -396,7 +394,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -404,7 +401,7 @@ private Mono> validateBackupWithResponseAs
service
.validateBackup(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -447,13 +444,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.validateBackup(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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..977c6a2f94fb 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,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -155,7 +154,7 @@ private Mono> putWithResponseAsync(
service
.put(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -202,13 +201,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.put(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -304,7 +302,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -312,7 +309,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -359,13 +356,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -457,7 +453,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -465,7 +460,7 @@ private Mono> listByServerSinglePageAsync(
service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -516,13 +511,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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..885a98a06d8d
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CapabilityImpl.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.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 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..2b47352e674e 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,6 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -113,7 +112,7 @@ private Mono> executeWithResponseAsync(
service
.execute(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
locationName,
nameAvailabilityRequest,
@@ -159,13 +158,12 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.execute(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
locationName,
nameAvailabilityRequest,
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..a8159467ed74 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,6 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -114,7 +113,7 @@ private Mono> executeWithResponseAsync(
service
.execute(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
nameAvailabilityRequest,
accept,
@@ -155,13 +154,12 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.execute(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
nameAvailabilityRequest,
accept,
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..915e23c4bec4 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,6 @@ private Mono> executeWithResponse
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -114,7 +113,7 @@ private Mono> executeWithResponse
service
.execute(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
locationName,
parameters,
@@ -158,13 +157,12 @@ private Mono> executeWithResponse
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.execute(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
locationName,
parameters,
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationImpl.java
index 6f167f8ec87a..c5887fb3c530 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.implementation;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner;
import com.azure.resourcemanager.mysqlflexibleserver.models.Configuration;
@@ -30,10 +29,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public String value() {
return this.innerModel().value();
}
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..9be30f02016b 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,6 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -208,7 +207,7 @@ private Mono>> createOrUpdateWithResponseAsync(
service
.createOrUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -267,13 +266,12 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.createOrUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -513,7 +511,6 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -521,7 +518,7 @@ private Mono>> updateWithResponseAsync(
service
.update(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -580,13 +577,12 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.update(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -819,7 +815,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -827,7 +822,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -876,13 +871,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -980,7 +974,6 @@ private Mono>> batchUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -988,7 +981,7 @@ private Mono>> batchUpdateWithResponseAsync(
service
.batchUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1037,13 +1030,12 @@ private Mono>> batchUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.batchUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1251,7 +1243,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -1259,7 +1250,7 @@ private Mono> listByServerSinglePageAsync(
service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1325,13 +1316,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/DatabaseImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/DatabaseImpl.java
index b67d39eb2e3a..ef04ab417f4a 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/DatabaseImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/DatabaseImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.implementation;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.DatabaseInner;
import com.azure.resourcemanager.mysqlflexibleserver.models.Database;
@@ -26,10 +25,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public String charset() {
return this.innerModel().charset();
}
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..b85c3918a549 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,6 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -185,7 +184,7 @@ private Mono>> createOrUpdateWithResponseAsync(
service
.createOrUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -239,13 +238,12 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.createOrUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -460,7 +458,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -468,7 +465,7 @@ private Mono>> deleteWithResponseAsync(
service
.delete(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -515,13 +512,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.delete(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -713,7 +709,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -721,7 +716,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -768,13 +763,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -866,7 +860,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -874,7 +867,7 @@ private Mono> listByServerSinglePageAsync(
service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -925,13 +918,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/FirewallRuleImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/FirewallRuleImpl.java
index 8bd2814040c5..7cf832181ebd 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/FirewallRuleImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/FirewallRuleImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.implementation;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.FirewallRuleInner;
import com.azure.resourcemanager.mysqlflexibleserver.models.FirewallRule;
@@ -26,10 +25,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public String startIpAddress() {
return this.innerModel().startIpAddress();
}
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..c7f469976077 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,6 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -186,7 +185,7 @@ private Mono>> createOrUpdateWithResponseAsync(
service
.createOrUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -245,13 +244,12 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.createOrUpdate(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -485,7 +483,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -493,7 +490,7 @@ private Mono>> deleteWithResponseAsync(
service
.delete(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -541,13 +538,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.delete(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -743,7 +739,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -751,7 +746,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -800,13 +795,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.get(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -898,7 +892,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -906,7 +899,7 @@ private Mono> listByServerSinglePageAsync(
service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -957,13 +950,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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..c97c952d3a74 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,10 +79,10 @@ private Mono> executeWithResponse
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.execute(this.client.getEndpoint(), apiVersion, accept, context))
+ .withContext(
+ context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -104,10 +104,9 @@ private Mono> executeWithResponse
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service.execute(this.client.getEndpoint(), apiVersion, accept, context);
+ return service.execute(this.client.getEndpoint(), this.client.getApiVersion(), 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..3a3801e67327 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,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -116,7 +115,7 @@ private Mono> listSinglePageAsync(Strin
service
.list(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
locationName,
accept,
@@ -161,11 +160,16 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), locationName, accept, context)
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ locationName,
+ accept,
+ context)
.map(
res ->
new PagedResponseBase<>(
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..1daff4414c25
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsClientImpl.java
@@ -0,0 +1,472 @@
+// 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 accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ 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 accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ 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 accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ 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 accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ 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/LogFileImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LogFileImpl.java
index e0b9fc6ffa02..4dee11b69ac6 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LogFileImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LogFileImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.implementation;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.LogFileInner;
import com.azure.resourcemanager.mysqlflexibleserver.models.LogFile;
import java.time.OffsetDateTime;
@@ -31,10 +30,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public Long sizeInKB() {
return this.innerModel().sizeInKB();
}
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..2fe893682420 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,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -119,7 +118,7 @@ private Mono> listByServerSinglePageAsync(String res
service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -170,13 +169,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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..4d240b754d5f 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
@@ -33,11 +33,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 +53,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.
*/
@@ -74,6 +77,18 @@ public String getEndpoint() {
return this.endpoint;
}
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
/** The HTTP pipeline to send requests through. */
private final HttpPipeline httpPipeline;
@@ -206,6 +221,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 +257,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 +305,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;
@@ -297,7 +348,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(
@@ -312,6 +363,7 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
+ this.apiVersion = "2023-06-01-preview";
this.azureADAdministrators = new AzureADAdministratorsClientImpl(this);
this.backups = new BackupsClientImpl(this);
this.backupAndExports = new BackupAndExportsClientImpl(this);
@@ -320,11 +372,14 @@ 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);
}
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..d04c7b7d6387
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsClientImpl.java
@@ -0,0 +1,209 @@
+// 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 accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ 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 accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ 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..a7a063a56d5b 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,10 +93,10 @@ private Mono> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context))
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
.>map(
res ->
new PagedResponseBase<>(
@@ -127,11 +127,10 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(this.client.getEndpoint(), apiVersion, accept, context)
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
.map(
res ->
new PagedResponseBase<>(
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..989d5404977d 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,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -119,7 +118,7 @@ private Mono> listByServerSinglePageAsync(String reso
service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -170,13 +169,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByServer(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerBackupImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerBackupImpl.java
index ca699a09753b..244fc4367533 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerBackupImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerBackupImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.implementation;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupInner;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackup;
import java.time.OffsetDateTime;
@@ -32,10 +31,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public String backupType() {
return this.innerModel().backupType();
}
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..9de43a2766b0 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,16 @@ public ServerImpl withNetwork(Network network) {
}
}
+ public ServerImpl withPrivateEndpointConnections(List privateEndpointConnections) {
+ this.innerModel().withPrivateEndpointConnections(privateEndpointConnections);
+ return this;
+ }
+
+ 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..a912f2aa28b4 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,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -289,7 +288,7 @@ private Mono>> createWithResponseAsync(
service
.create(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -338,13 +337,12 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.create(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -543,7 +541,6 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -551,7 +548,7 @@ private Mono>> updateWithResponseAsync(
service
.update(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -601,13 +598,12 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.update(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -807,7 +803,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -815,7 +810,7 @@ private Mono>> deleteWithResponseAsync(String resource
service
.delete(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -857,13 +852,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.delete(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1037,7 +1031,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -1045,7 +1038,7 @@ private Mono> getByResourceGroupWithResponseAsync(
service
.getByResourceGroup(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1087,13 +1080,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.getByResourceGroup(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1176,7 +1168,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -1184,7 +1175,7 @@ private Mono> listByResourceGroupSinglePageAsync(Stri
service
.listByResourceGroup(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
accept,
@@ -1230,13 +1221,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByResourceGroup(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
accept,
@@ -1335,13 +1325,17 @@ private Mono> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context))
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
.>map(
res ->
new PagedResponseBase<>(
@@ -1377,11 +1371,15 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
.map(
res ->
new PagedResponseBase<>(
@@ -1477,7 +1475,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -1485,7 +1482,7 @@ private Mono>> failoverWithResponseAsync(String resour
service
.failover(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1527,13 +1524,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.failover(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1713,7 +1709,6 @@ private Mono>> restartWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1721,7 +1716,7 @@ private Mono>> restartWithResponseAsync(
service
.restart(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1770,13 +1765,12 @@ private Mono>> restartWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.restart(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1965,7 +1959,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -1973,7 +1966,7 @@ private Mono>> startWithResponseAsync(String resourceG
service
.start(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -2015,13 +2008,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.start(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -2193,7 +2185,6 @@ 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 accept = "application/json";
return FluxUtil
.withContext(
@@ -2201,7 +2192,7 @@ private Mono>> stopWithResponseAsync(String resourceGr
service
.stop(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -2243,13 +2234,12 @@ 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 accept = "application/json";
context = this.client.mergeContext(context);
return service
.stop(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -2428,7 +2418,6 @@ private Mono>> resetGtidWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2436,7 +2425,7 @@ private Mono>> resetGtidWithResponseAsync(
service
.resetGtid(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -2485,13 +2474,12 @@ private Mono>> resetGtidWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.resetGtid(
this.client.getEndpoint(),
- apiVersion,
+ this.client.getApiVersion(),
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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..75edb987c0a7
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsClientImpl.java
@@ -0,0 +1,309 @@
+// 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 accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .cutoverMigration(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ 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 accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .cutoverMigration(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ 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/models/AzureADAdministrator.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AzureADAdministrator.java
index edd1a5c2df80..3ae9529684bc 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AzureADAdministrator.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/AzureADAdministrator.java
@@ -32,7 +32,7 @@ public interface AzureADAdministrator {
String type();
/**
- * Gets the systemData property: The system metadata relating to this resource.
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -91,11 +91,13 @@ public interface AzureADAdministrator {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The AzureADAdministrator definition stages. */
interface DefinitionStages {
/** The first stage of the AzureADAdministrator definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the AzureADAdministrator definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -107,6 +109,7 @@ interface WithParentResource {
*/
WithCreate withExistingFlexibleServer(String resourceGroupName, String serverName);
}
+
/**
* The stage of the AzureADAdministrator definition which contains all the minimum required properties for the
* resource to be created, but also allows for any other optional properties to be specified.
@@ -132,6 +135,7 @@ interface WithCreate
*/
AzureADAdministrator create(Context context);
}
+
/** The stage of the AzureADAdministrator definition allowing to specify administratorType. */
interface WithAdministratorType {
/**
@@ -142,6 +146,7 @@ interface WithAdministratorType {
*/
WithCreate withAdministratorType(AdministratorType administratorType);
}
+
/** The stage of the AzureADAdministrator definition allowing to specify login. */
interface WithLogin {
/**
@@ -152,6 +157,7 @@ interface WithLogin {
*/
WithCreate withLogin(String login);
}
+
/** The stage of the AzureADAdministrator definition allowing to specify sid. */
interface WithSid {
/**
@@ -162,6 +168,7 @@ interface WithSid {
*/
WithCreate withSid(String sid);
}
+
/** The stage of the AzureADAdministrator definition allowing to specify tenantId. */
interface WithTenantId {
/**
@@ -172,6 +179,7 @@ interface WithTenantId {
*/
WithCreate withTenantId(String tenantId);
}
+
/** The stage of the AzureADAdministrator definition allowing to specify identityResourceId. */
interface WithIdentityResourceId {
/**
@@ -183,6 +191,7 @@ interface WithIdentityResourceId {
WithCreate withIdentityResourceId(String identityResourceId);
}
}
+
/**
* Begins update for the AzureADAdministrator resource.
*
@@ -212,6 +221,7 @@ interface Update
*/
AzureADAdministrator apply(Context context);
}
+
/** The AzureADAdministrator update stages. */
interface UpdateStages {
/** The stage of the AzureADAdministrator update allowing to specify administratorType. */
@@ -224,6 +234,7 @@ interface WithAdministratorType {
*/
Update withAdministratorType(AdministratorType administratorType);
}
+
/** The stage of the AzureADAdministrator update allowing to specify login. */
interface WithLogin {
/**
@@ -234,6 +245,7 @@ interface WithLogin {
*/
Update withLogin(String login);
}
+
/** The stage of the AzureADAdministrator update allowing to specify sid. */
interface WithSid {
/**
@@ -244,6 +256,7 @@ interface WithSid {
*/
Update withSid(String sid);
}
+
/** The stage of the AzureADAdministrator update allowing to specify tenantId. */
interface WithTenantId {
/**
@@ -254,6 +267,7 @@ interface WithTenantId {
*/
Update withTenantId(String tenantId);
}
+
/** The stage of the AzureADAdministrator update allowing to specify identityResourceId. */
interface WithIdentityResourceId {
/**
@@ -265,6 +279,7 @@ interface WithIdentityResourceId {
Update withIdentityResourceId(String identityResourceId);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExportResponse.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExportResponse.java
index c07bb27739b4..8fad750a1997 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExportResponse.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExportResponse.java
@@ -60,9 +60,7 @@ public interface BackupAndExportResponse {
Double percentComplete();
/**
- * Gets the error property: Error Response
- *
- * The BackupAndExport operation error response.
+ * Gets the error property: The error object.
*
* @return the error value.
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupFormat.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupFormat.java
index 187596ecf784..ab876cfd297e 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupFormat.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupFormat.java
@@ -10,12 +10,12 @@
/** Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE). */
public final class BackupFormat extends ExpandableStringEnum {
- /** Static value None for BackupFormat. */
- public static final BackupFormat NONE = fromString("None");
-
/** Static value CollatedFormat for BackupFormat. */
public static final BackupFormat COLLATED_FORMAT = fromString("CollatedFormat");
+ /** Static value Raw for BackupFormat. */
+ public static final BackupFormat RAW = fromString("Raw");
+
/**
* Creates a new instance of BackupFormat value.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Capability.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Capability.java
new file mode 100644
index 000000000000..0e7eb131c7e2
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Capability.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.models;
+
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityInner;
+import java.util.List;
+
+/** An immutable client-side representation of Capability. */
+public interface Capability {
+ /**
+ * 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 supportedGeoBackupRegions property: supported geo backup regions.
+ *
+ * @return the supportedGeoBackupRegions value.
+ */
+ List supportedGeoBackupRegions();
+
+ /**
+ * Gets the supportedFlexibleServerEditions property: A list of supported flexible server editions.
+ *
+ * @return the supportedFlexibleServerEditions value.
+ */
+ List supportedFlexibleServerEditions();
+
+ /**
+ * Gets the supportedServerVersions property: A list of supported server versions.
+ *
+ * @return the supportedServerVersions value.
+ */
+ List supportedServerVersions();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityInner object.
+ *
+ * @return the inner object.
+ */
+ CapabilityInner innerModel();
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/CapabilitySetsList.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/CapabilitySetsList.java
new file mode 100644
index 000000000000..ec2411cf5353
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/CapabilitySetsList.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.CapabilityInner;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** location capability set. */
+@Immutable
+public final class CapabilitySetsList {
+ /*
+ * A list of supported capability sets.
+ */
+ @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 CapabilitySetsList class. */
+ public CapabilitySetsList() {
+ }
+
+ /**
+ * Get the value property: A list of supported capability sets.
+ *
+ * @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/Configuration.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Configuration.java
index 77190eb04a65..6020fadfd15c 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Configuration.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Configuration.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.models;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner;
@@ -31,13 +30,6 @@ public interface Configuration {
*/
String type();
- /**
- * Gets the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the value property: Value of the configuration.
*
@@ -133,11 +125,13 @@ public interface Configuration {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The Configuration definition stages. */
interface DefinitionStages {
/** The first stage of the Configuration definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the Configuration definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -149,6 +143,7 @@ interface WithParentResource {
*/
WithCreate withExistingFlexibleServer(String resourceGroupName, String serverName);
}
+
/**
* The stage of the Configuration definition which contains all the minimum required properties for the resource
* to be created, but also allows for any other optional properties to be specified.
@@ -170,6 +165,7 @@ interface WithCreate
*/
Configuration create(Context context);
}
+
/** The stage of the Configuration definition allowing to specify value. */
interface WithValue {
/**
@@ -180,6 +176,7 @@ interface WithValue {
*/
WithCreate withValue(String value);
}
+
/** The stage of the Configuration definition allowing to specify currentValue. */
interface WithCurrentValue {
/**
@@ -190,6 +187,7 @@ interface WithCurrentValue {
*/
WithCreate withCurrentValue(String currentValue);
}
+
/** The stage of the Configuration definition allowing to specify source. */
interface WithSource {
/**
@@ -201,6 +199,7 @@ interface WithSource {
WithCreate withSource(ConfigurationSource source);
}
}
+
/**
* Begins update for the Configuration resource.
*
@@ -225,6 +224,7 @@ interface Update extends UpdateStages.WithValue, UpdateStages.WithCurrentValue,
*/
Configuration apply(Context context);
}
+
/** The Configuration update stages. */
interface UpdateStages {
/** The stage of the Configuration update allowing to specify value. */
@@ -237,6 +237,7 @@ interface WithValue {
*/
Update withValue(String value);
}
+
/** The stage of the Configuration update allowing to specify currentValue. */
interface WithCurrentValue {
/**
@@ -247,6 +248,7 @@ interface WithCurrentValue {
*/
Update withCurrentValue(String currentValue);
}
+
/** The stage of the Configuration update allowing to specify source. */
interface WithSource {
/**
@@ -258,6 +260,7 @@ interface WithSource {
Update withSource(ConfigurationSource source);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Database.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Database.java
index be335b0e9d1f..40e8856dbf34 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Database.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Database.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.models;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.DatabaseInner;
@@ -31,13 +30,6 @@ public interface Database {
*/
String type();
- /**
- * Gets the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the charset property: The charset of the database.
*
@@ -70,11 +62,13 @@ public interface Database {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The Database definition stages. */
interface DefinitionStages {
/** The first stage of the Database definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the Database definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -86,6 +80,7 @@ interface WithParentResource {
*/
WithCreate withExistingFlexibleServer(String resourceGroupName, String serverName);
}
+
/**
* The stage of the Database definition which contains all the minimum required properties for the resource to
* be created, but also allows for any other optional properties to be specified.
@@ -106,6 +101,7 @@ interface WithCreate extends DefinitionStages.WithCharset, DefinitionStages.With
*/
Database create(Context context);
}
+
/** The stage of the Database definition allowing to specify charset. */
interface WithCharset {
/**
@@ -116,6 +112,7 @@ interface WithCharset {
*/
WithCreate withCharset(String charset);
}
+
/** The stage of the Database definition allowing to specify collation. */
interface WithCollation {
/**
@@ -127,6 +124,7 @@ interface WithCollation {
WithCreate withCollation(String collation);
}
}
+
/**
* Begins update for the Database resource.
*
@@ -151,6 +149,7 @@ interface Update extends UpdateStages.WithCharset, UpdateStages.WithCollation {
*/
Database apply(Context context);
}
+
/** The Database update stages. */
interface UpdateStages {
/** The stage of the Database update allowing to specify charset. */
@@ -163,6 +162,7 @@ interface WithCharset {
*/
Update withCharset(String charset);
}
+
/** The stage of the Database update allowing to specify collation. */
interface WithCollation {
/**
@@ -174,6 +174,7 @@ interface WithCollation {
Update withCollation(String collation);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/FirewallRule.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/FirewallRule.java
index 47a4966d1ca5..73dea2e4bf16 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/FirewallRule.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/FirewallRule.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.models;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.FirewallRuleInner;
@@ -31,13 +30,6 @@ public interface FirewallRule {
*/
String type();
- /**
- * Gets the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
*
@@ -74,11 +66,13 @@ interface Definition
DefinitionStages.WithEndIpAddress,
DefinitionStages.WithCreate {
}
+
/** The FirewallRule definition stages. */
interface DefinitionStages {
/** The first stage of the FirewallRule definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the FirewallRule definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -90,6 +84,7 @@ interface WithParentResource {
*/
WithStartIpAddress withExistingFlexibleServer(String resourceGroupName, String serverName);
}
+
/** The stage of the FirewallRule definition allowing to specify startIpAddress. */
interface WithStartIpAddress {
/**
@@ -101,6 +96,7 @@ interface WithStartIpAddress {
*/
WithEndIpAddress withStartIpAddress(String startIpAddress);
}
+
/** The stage of the FirewallRule definition allowing to specify endIpAddress. */
interface WithEndIpAddress {
/**
@@ -112,6 +108,7 @@ interface WithEndIpAddress {
*/
WithCreate withEndIpAddress(String endIpAddress);
}
+
/**
* The stage of the FirewallRule definition which contains all the minimum required properties for the resource
* to be created, but also allows for any other optional properties to be specified.
@@ -133,6 +130,7 @@ interface WithCreate {
FirewallRule create(Context context);
}
}
+
/**
* Begins update for the FirewallRule resource.
*
@@ -157,6 +155,7 @@ interface Update extends UpdateStages.WithStartIpAddress, UpdateStages.WithEndIp
*/
FirewallRule apply(Context context);
}
+
/** The FirewallRule update stages. */
interface UpdateStages {
/** The stage of the FirewallRule update allowing to specify startIpAddress. */
@@ -170,6 +169,7 @@ interface WithStartIpAddress {
*/
Update withStartIpAddress(String startIpAddress);
}
+
/** The stage of the FirewallRule update allowing to specify endIpAddress. */
interface WithEndIpAddress {
/**
@@ -182,6 +182,7 @@ interface WithEndIpAddress {
Update withEndIpAddress(String endIpAddress);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ImportSourceProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ImportSourceProperties.java
new file mode 100644
index 000000000000..d8c78a93a7aa
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ImportSourceProperties.java
@@ -0,0 +1,130 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+
+/** Import source related properties. */
+@Fluent
+public final class ImportSourceProperties {
+ /*
+ * Storage type of import source.
+ */
+ @JsonProperty(value = "storageType")
+ private ImportSourceStorageType storageType;
+
+ /*
+ * Uri of the import source storage.
+ */
+ @JsonProperty(value = "storageUrl")
+ private String storageUrl;
+
+ /*
+ * Sas token for accessing source storage. Read and list permissions are required for sas token.
+ */
+ @JsonProperty(value = "sasToken")
+ private String sasToken;
+
+ /*
+ * Relative path of data directory in storage.
+ */
+ @JsonProperty(value = "dataDirPath")
+ private String dataDirPath;
+
+ /** Creates an instance of ImportSourceProperties class. */
+ public ImportSourceProperties() {
+ }
+
+ /**
+ * Get the storageType property: Storage type of import source.
+ *
+ * @return the storageType value.
+ */
+ public ImportSourceStorageType storageType() {
+ return this.storageType;
+ }
+
+ /**
+ * Set the storageType property: Storage type of import source.
+ *
+ * @param storageType the storageType value to set.
+ * @return the ImportSourceProperties object itself.
+ */
+ public ImportSourceProperties withStorageType(ImportSourceStorageType storageType) {
+ this.storageType = storageType;
+ return this;
+ }
+
+ /**
+ * Get the storageUrl property: Uri of the import source storage.
+ *
+ * @return the storageUrl value.
+ */
+ public String storageUrl() {
+ return this.storageUrl;
+ }
+
+ /**
+ * Set the storageUrl property: Uri of the import source storage.
+ *
+ * @param storageUrl the storageUrl value to set.
+ * @return the ImportSourceProperties object itself.
+ */
+ public ImportSourceProperties withStorageUrl(String storageUrl) {
+ this.storageUrl = storageUrl;
+ return this;
+ }
+
+ /**
+ * Get the sasToken property: Sas token for accessing source storage. Read and list permissions are required for sas
+ * token.
+ *
+ * @return the sasToken value.
+ */
+ public String sasToken() {
+ return this.sasToken;
+ }
+
+ /**
+ * Set the sasToken property: Sas token for accessing source storage. Read and list permissions are required for sas
+ * token.
+ *
+ * @param sasToken the sasToken value to set.
+ * @return the ImportSourceProperties object itself.
+ */
+ public ImportSourceProperties withSasToken(String sasToken) {
+ this.sasToken = sasToken;
+ return this;
+ }
+
+ /**
+ * Get the dataDirPath property: Relative path of data directory in storage.
+ *
+ * @return the dataDirPath value.
+ */
+ public String dataDirPath() {
+ return this.dataDirPath;
+ }
+
+ /**
+ * Set the dataDirPath property: Relative path of data directory in storage.
+ *
+ * @param dataDirPath the dataDirPath value to set.
+ * @return the ImportSourceProperties object itself.
+ */
+ public ImportSourceProperties withDataDirPath(String dataDirPath) {
+ this.dataDirPath = dataDirPath;
+ return this;
+ }
+
+ /**
+ * 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/models/ImportSourceStorageType.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ImportSourceStorageType.java
new file mode 100644
index 000000000000..d1b6a392eac3
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ImportSourceStorageType.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;
+
+/** Storage type of import source. */
+public final class ImportSourceStorageType extends ExpandableStringEnum {
+ /** Static value AzureBlob for ImportSourceStorageType. */
+ public static final ImportSourceStorageType AZURE_BLOB = fromString("AzureBlob");
+
+ /**
+ * Creates a new instance of ImportSourceStorageType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ImportSourceStorageType() {
+ }
+
+ /**
+ * Creates or finds a ImportSourceStorageType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ImportSourceStorageType.
+ */
+ @JsonCreator
+ public static ImportSourceStorageType fromString(String name) {
+ return fromString(name, ImportSourceStorageType.class);
+ }
+
+ /**
+ * Gets known ImportSourceStorageType values.
+ *
+ * @return known ImportSourceStorageType values.
+ */
+ public static Collection values() {
+ return values(ImportSourceStorageType.class);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/LocationBasedCapabilitySets.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/LocationBasedCapabilitySets.java
new file mode 100644
index 000000000000..68ce3f349b71
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/LocationBasedCapabilitySets.java
@@ -0,0 +1,62 @@
+// 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 LocationBasedCapabilitySets. */
+public interface LocationBasedCapabilitySets {
+ /**
+ * 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 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 capabilities at specified location in a given subscription as paginated response with {@link
+ * PagedIterable}.
+ */
+ PagedIterable list(String 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 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 capabilities at specified location in a given subscription as paginated response with {@link
+ * PagedIterable}.
+ */
+ PagedIterable list(String locationName, Context context);
+
+ /**
+ * 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 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 capabilities at specified location in a given subscription along with {@link Response}.
+ */
+ Response getWithResponse(String locationName, String capabilitySetName, Context 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 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 capabilities at specified location in a given subscription.
+ */
+ Capability get(String locationName, String capabilitySetName);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/LogFile.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/LogFile.java
index c76a9d25a7c1..f3aec89f75cb 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/LogFile.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/LogFile.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.models;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.LogFileInner;
import java.time.OffsetDateTime;
@@ -31,13 +30,6 @@ public interface LogFile {
*/
String type();
- /**
- * Gets the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the sizeInKB property: The size in kb of the logFile.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Identity.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/MySqlServerIdentity.java
similarity index 86%
rename from sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Identity.java
rename to sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/MySqlServerIdentity.java
index c46b12ed9533..2ebaed6454f3 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Identity.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/MySqlServerIdentity.java
@@ -11,7 +11,7 @@
/** Properties to configure Identity for Bring your Own Keys. */
@Fluent
-public final class Identity {
+public final class MySqlServerIdentity {
/*
* ObjectId from the KeyVault
*/
@@ -37,8 +37,8 @@ public final class Identity {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map userAssignedIdentities;
- /** Creates an instance of Identity class. */
- public Identity() {
+ /** Creates an instance of MySqlServerIdentity class. */
+ public MySqlServerIdentity() {
}
/**
@@ -72,9 +72,9 @@ public ManagedServiceIdentityType type() {
* Set the type property: Type of managed service identity.
*
* @param type the type value to set.
- * @return the Identity object itself.
+ * @return the MySqlServerIdentity object itself.
*/
- public Identity withType(ManagedServiceIdentityType type) {
+ public MySqlServerIdentity withType(ManagedServiceIdentityType type) {
this.type = type;
return this;
}
@@ -92,9 +92,9 @@ public Map userAssignedIdentities() {
* Set the userAssignedIdentities property: Metadata of user assigned identity.
*
* @param userAssignedIdentities the userAssignedIdentities value to set.
- * @return the Identity object itself.
+ * @return the MySqlServerIdentity object itself.
*/
- public Identity withUserAssignedIdentities(Map userAssignedIdentities) {
+ public MySqlServerIdentity withUserAssignedIdentities(Map userAssignedIdentities) {
this.userAssignedIdentities = userAssignedIdentities;
return this;
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Sku.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/MySqlServerSku.java
similarity index 71%
rename from sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Sku.java
rename to sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/MySqlServerSku.java
index cfab9ff4e5e2..f97797db0d41 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Sku.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/MySqlServerSku.java
@@ -10,7 +10,7 @@
/** Billing information related properties of a server. */
@Fluent
-public final class Sku {
+public final class MySqlServerSku {
/*
* The name of the sku, e.g. Standard_D32s_v3.
*/
@@ -21,10 +21,10 @@ public final class Sku {
* The tier of the particular SKU, e.g. GeneralPurpose.
*/
@JsonProperty(value = "tier", required = true)
- private SkuTier tier;
+ private ServerSkuTier tier;
- /** Creates an instance of Sku class. */
- public Sku() {
+ /** Creates an instance of MySqlServerSku class. */
+ public MySqlServerSku() {
}
/**
@@ -40,9 +40,9 @@ public String name() {
* Set the name property: The name of the sku, e.g. Standard_D32s_v3.
*
* @param name the name value to set.
- * @return the Sku object itself.
+ * @return the MySqlServerSku object itself.
*/
- public Sku withName(String name) {
+ public MySqlServerSku withName(String name) {
this.name = name;
return this;
}
@@ -52,7 +52,7 @@ public Sku withName(String name) {
*
* @return the tier value.
*/
- public SkuTier tier() {
+ public ServerSkuTier tier() {
return this.tier;
}
@@ -60,9 +60,9 @@ public SkuTier tier() {
* Set the tier property: The tier of the particular SKU, e.g. GeneralPurpose.
*
* @param tier the tier value to set.
- * @return the Sku object itself.
+ * @return the MySqlServerSku object itself.
*/
- public Sku withTier(SkuTier tier) {
+ public MySqlServerSku withTier(ServerSkuTier tier) {
this.tier = tier;
return this;
}
@@ -75,13 +75,15 @@ public Sku withTier(SkuTier tier) {
public void validate() {
if (name() == null) {
throw LOGGER
- .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku"));
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property name in model MySqlServerSku"));
}
if (tier() == null) {
throw LOGGER
- .logExceptionAsError(new IllegalArgumentException("Missing required property tier in model Sku"));
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property tier in model MySqlServerSku"));
}
}
- private static final ClientLogger LOGGER = new ClientLogger(Sku.class);
+ private static final ClientLogger LOGGER = new ClientLogger(MySqlServerSku.class);
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationResults.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationResults.java
new file mode 100644
index 000000000000..dd2f94a7e14d
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationResults.java
@@ -0,0 +1,36 @@
+// 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.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of OperationResults. */
+public interface OperationResults {
+ /**
+ * 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 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 the operation result for a long running operation along with {@link Response}.
+ */
+ Response getWithResponse(String locationName, String operationId, 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 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 the operation result for a long running operation.
+ */
+ OperationStatusExtendedResult get(String locationName, String operationId);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationStatusExtendedResult.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationStatusExtendedResult.java
new file mode 100644
index 000000000000..14decb749d0e
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationStatusExtendedResult.java
@@ -0,0 +1,93 @@
+// 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.exception.ManagementError;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationStatusExtendedResultInner;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+
+/** An immutable client-side representation of OperationStatusExtendedResult. */
+public interface OperationStatusExtendedResult {
+ /**
+ * Gets the id property: Fully qualified ID for the async operation.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was
+ * started.
+ *
+ * @return the resourceId value.
+ */
+ String resourceId();
+
+ /**
+ * Gets the name property: Name of the async operation.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the status property: Operation status.
+ *
+ * @return the status value.
+ */
+ String status();
+
+ /**
+ * Gets the percentComplete property: Percent of the operation that is complete.
+ *
+ * @return the percentComplete value.
+ */
+ Float percentComplete();
+
+ /**
+ * Gets the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ OffsetDateTime startTime();
+
+ /**
+ * Gets the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ OffsetDateTime endTime();
+
+ /**
+ * Gets the operations property: The operations list.
+ *
+ * @return the operations value.
+ */
+ List operations();
+
+ /**
+ * Gets the error property: If present, details of the operation error.
+ *
+ * @return the error value.
+ */
+ ManagementError error();
+
+ /**
+ * Gets the properties property: The extended properties of Operation Results.
+ *
+ * @return the properties value.
+ */
+ Map properties();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationStatusExtendedResultInner
+ * object.
+ *
+ * @return the inner object.
+ */
+ OperationStatusExtendedResultInner innerModel();
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationStatusResult.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationStatusResult.java
new file mode 100644
index 000000000000..e4fbf610e636
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationStatusResult.java
@@ -0,0 +1,262 @@
+// 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.core.management.exception.ManagementError;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** The current status of an async operation. */
+@Fluent
+public class OperationStatusResult {
+ /*
+ * Fully qualified ID for the async operation.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Fully qualified ID of the resource against which the original async operation was started.
+ */
+ @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceId;
+
+ /*
+ * Name of the async operation.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Operation status.
+ */
+ @JsonProperty(value = "status", required = true)
+ private String status;
+
+ /*
+ * Percent of the operation that is complete.
+ */
+ @JsonProperty(value = "percentComplete")
+ private Float percentComplete;
+
+ /*
+ * The start time of the operation.
+ */
+ @JsonProperty(value = "startTime")
+ private OffsetDateTime startTime;
+
+ /*
+ * The end time of the operation.
+ */
+ @JsonProperty(value = "endTime")
+ private OffsetDateTime endTime;
+
+ /*
+ * The operations list.
+ */
+ @JsonProperty(value = "operations")
+ private List operations;
+
+ /*
+ * If present, details of the operation error.
+ */
+ @JsonProperty(value = "error")
+ private ManagementError error;
+
+ /** Creates an instance of OperationStatusResult class. */
+ public OperationStatusResult() {
+ }
+
+ /**
+ * Get the id property: Fully qualified ID for the async operation.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Fully qualified ID for the async operation.
+ *
+ * @param id the id value to set.
+ * @return the OperationStatusResult object itself.
+ */
+ public OperationStatusResult withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was
+ * started.
+ *
+ * @return the resourceId value.
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Get the name property: Name of the async operation.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name of the async operation.
+ *
+ * @param name the name value to set.
+ * @return the OperationStatusResult object itself.
+ */
+ public OperationStatusResult withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the status property: Operation status.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Operation status.
+ *
+ * @param status the status value to set.
+ * @return the OperationStatusResult object itself.
+ */
+ public OperationStatusResult withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the percentComplete property: Percent of the operation that is complete.
+ *
+ * @return the percentComplete value.
+ */
+ public Float percentComplete() {
+ return this.percentComplete;
+ }
+
+ /**
+ * Set the percentComplete property: Percent of the operation that is complete.
+ *
+ * @param percentComplete the percentComplete value to set.
+ * @return the OperationStatusResult object itself.
+ */
+ public OperationStatusResult withPercentComplete(Float percentComplete) {
+ this.percentComplete = percentComplete;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: The start time of the operation.
+ *
+ * @param startTime the startTime value to set.
+ * @return the OperationStatusResult object itself.
+ */
+ public OperationStatusResult withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: The end time of the operation.
+ *
+ * @param endTime the endTime value to set.
+ * @return the OperationStatusResult object itself.
+ */
+ public OperationStatusResult withEndTime(OffsetDateTime endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the operations property: The operations list.
+ *
+ * @return the operations value.
+ */
+ public List operations() {
+ return this.operations;
+ }
+
+ /**
+ * Set the operations property: The operations list.
+ *
+ * @param operations the operations value to set.
+ * @return the OperationStatusResult object itself.
+ */
+ public OperationStatusResult withOperations(List operations) {
+ this.operations = operations;
+ return this;
+ }
+
+ /**
+ * Get the error property: If present, details of the operation error.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: If present, details of the operation error.
+ *
+ * @param error the error value to set.
+ * @return the OperationStatusResult object itself.
+ */
+ public OperationStatusResult withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (status() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property status in model OperationStatusResult"));
+ }
+ if (operations() != null) {
+ operations().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResult.class);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpoint.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpoint.java
new file mode 100644
index 000000000000..92d493cc1bb6
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpoint.java
@@ -0,0 +1,39 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+
+/** The private endpoint resource. */
+@Immutable
+public final class PrivateEndpoint {
+ /*
+ * The ARM identifier for private endpoint.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /** Creates an instance of PrivateEndpoint class. */
+ public PrivateEndpoint() {
+ }
+
+ /**
+ * Get the id property: The ARM identifier for private endpoint.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * 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/models/PrivateEndpointConnection.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpointConnection.java
new file mode 100644
index 000000000000..0b321cca21ea
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpointConnection.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.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.PrivateEndpointConnectionProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The private endpoint connection resource. */
+@Fluent
+public final class PrivateEndpointConnection extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties 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 PrivateEndpointConnection class. */
+ public PrivateEndpointConnection() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties 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 groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupIds();
+ }
+
+ /**
+ * Get the privateEndpoint property: The private endpoint resource.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: The private endpoint resource.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnection object itself.
+ */
+ public PrivateEndpointConnection withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(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.innerProperties() == null ? null : this.innerProperties().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 PrivateEndpointConnection object itself.
+ */
+ public PrivateEndpointConnection withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(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.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/models/PrivateEndpointConnectionProvisioningState.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpointConnectionProvisioningState.java
new file mode 100644
index 000000000000..743ffdfa3198
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpointConnectionProvisioningState.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 PrivateEndpointConnectionProvisioningState
+ extends ExpandableStringEnum {
+ /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */
+ public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Creating for PrivateEndpointConnectionProvisioningState. */
+ public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating");
+
+ /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */
+ public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Failed for PrivateEndpointConnectionProvisioningState. */
+ public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed");
+
+ /**
+ * Creates a new instance of PrivateEndpointConnectionProvisioningState value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public PrivateEndpointConnectionProvisioningState() {
+ }
+
+ /**
+ * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding PrivateEndpointConnectionProvisioningState.
+ */
+ @JsonCreator
+ public static PrivateEndpointConnectionProvisioningState fromString(String name) {
+ return fromString(name, PrivateEndpointConnectionProvisioningState.class);
+ }
+
+ /**
+ * Gets known PrivateEndpointConnectionProvisioningState values.
+ *
+ * @return known PrivateEndpointConnectionProvisioningState values.
+ */
+ public static Collection values() {
+ return values(PrivateEndpointConnectionProvisioningState.class);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpointServiceConnectionStatus.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpointServiceConnectionStatus.java
new file mode 100644
index 000000000000..5da0888a86a0
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateEndpointServiceConnectionStatus.java
@@ -0,0 +1,51 @@
+// 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 private endpoint connection status. */
+public final class PrivateEndpointServiceConnectionStatus
+ extends ExpandableStringEnum {
+ /** Static value Pending for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending");
+
+ /** Static value Approved for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved");
+
+ /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected");
+
+ /**
+ * Creates a new instance of PrivateEndpointServiceConnectionStatus value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public PrivateEndpointServiceConnectionStatus() {
+ }
+
+ /**
+ * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding PrivateEndpointServiceConnectionStatus.
+ */
+ @JsonCreator
+ public static PrivateEndpointServiceConnectionStatus fromString(String name) {
+ return fromString(name, PrivateEndpointServiceConnectionStatus.class);
+ }
+
+ /**
+ * Gets known PrivateEndpointServiceConnectionStatus values.
+ *
+ * @return known PrivateEndpointServiceConnectionStatus values.
+ */
+ public static Collection values() {
+ return values(PrivateEndpointServiceConnectionStatus.class);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateLinkServiceConnectionState.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateLinkServiceConnectionState.java
new file mode 100644
index 000000000000..14cf8b7a05b5
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/PrivateLinkServiceConnectionState.java
@@ -0,0 +1,106 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+
+/** A collection of information about the state of the connection between service consumer and provider. */
+@Fluent
+public final class PrivateLinkServiceConnectionState {
+ /*
+ * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
+ */
+ @JsonProperty(value = "status")
+ private PrivateEndpointServiceConnectionStatus status;
+
+ /*
+ * The reason for approval/rejection of the connection.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * A message indicating if changes on the service provider require any updates on the consumer.
+ */
+ @JsonProperty(value = "actionsRequired")
+ private String actionsRequired;
+
+ /** Creates an instance of PrivateLinkServiceConnectionState class. */
+ public PrivateLinkServiceConnectionState() {
+ }
+
+ /**
+ * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
+ * service.
+ *
+ * @return the status value.
+ */
+ public PrivateEndpointServiceConnectionStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
+ * service.
+ *
+ * @param status the status value to set.
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the description property: The reason for approval/rejection of the connection.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The reason for approval/rejection of the connection.
+ *
+ * @param description the description value to set.
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on
+ * the consumer.
+ *
+ * @return the actionsRequired value.
+ */
+ public String actionsRequired() {
+ return this.actionsRequired;
+ }
+
+ /**
+ * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on
+ * the consumer.
+ *
+ * @param actionsRequired the actionsRequired value to set.
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) {
+ this.actionsRequired = actionsRequired;
+ return this;
+ }
+
+ /**
+ * 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/models/Server.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Server.java
index 0defb712482f..19036961b4a6 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Server.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Server.java
@@ -9,6 +9,7 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner;
import java.time.OffsetDateTime;
+import java.util.List;
import java.util.Map;
/** An immutable client-side representation of Server. */
@@ -53,17 +54,17 @@ public interface Server {
*
* @return the identity value.
*/
- Identity identity();
+ MySqlServerIdentity identity();
/**
* Gets the sku property: The SKU (pricing tier) of the server.
*
* @return the sku value.
*/
- Sku sku();
+ MySqlServerSku sku();
/**
- * Gets the systemData property: The system metadata relating to this resource.
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -184,6 +185,13 @@ public interface Server {
*/
Network network();
+ /**
+ * Gets the privateEndpointConnections property: PrivateEndpointConnections related properties of a server.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ List privateEndpointConnections();
+
/**
* Gets the maintenanceWindow property: Maintenance window of a server.
*
@@ -191,6 +199,13 @@ public interface Server {
*/
MaintenanceWindow maintenanceWindow();
+ /**
+ * Gets the importSourceProperties property: Source properties for import from storage.
+ *
+ * @return the importSourceProperties value.
+ */
+ ImportSourceProperties importSourceProperties();
+
/**
* Gets the region of the resource.
*
@@ -226,11 +241,13 @@ interface Definition
DefinitionStages.WithResourceGroup,
DefinitionStages.WithCreate {
}
+
/** The Server definition stages. */
interface DefinitionStages {
/** The first stage of the Server definition. */
interface Blank extends WithLocation {
}
+
/** The stage of the Server definition allowing to specify location. */
interface WithLocation {
/**
@@ -249,6 +266,7 @@ interface WithLocation {
*/
WithResourceGroup withRegion(String location);
}
+
/** The stage of the Server definition allowing to specify parent resource. */
interface WithResourceGroup {
/**
@@ -259,6 +277,7 @@ interface WithResourceGroup {
*/
WithCreate withExistingResourceGroup(String resourceGroupName);
}
+
/**
* The stage of the Server definition which contains all the minimum required properties for the resource to be
* created, but also allows for any other optional properties to be specified.
@@ -279,7 +298,9 @@ interface WithCreate
DefinitionStages.WithStorage,
DefinitionStages.WithBackup,
DefinitionStages.WithHighAvailability,
- DefinitionStages.WithNetwork {
+ DefinitionStages.WithNetwork,
+ DefinitionStages.WithPrivateEndpointConnections,
+ DefinitionStages.WithImportSourceProperties {
/**
* Executes the create request.
*
@@ -295,6 +316,7 @@ interface WithCreate
*/
Server create(Context context);
}
+
/** The stage of the Server definition allowing to specify tags. */
interface WithTags {
/**
@@ -305,6 +327,7 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+
/** The stage of the Server definition allowing to specify identity. */
interface WithIdentity {
/**
@@ -313,8 +336,9 @@ interface WithIdentity {
* @param identity The cmk identity for the server.
* @return the next definition stage.
*/
- WithCreate withIdentity(Identity identity);
+ WithCreate withIdentity(MySqlServerIdentity identity);
}
+
/** The stage of the Server definition allowing to specify sku. */
interface WithSku {
/**
@@ -323,8 +347,9 @@ interface WithSku {
* @param sku The SKU (pricing tier) of the server.
* @return the next definition stage.
*/
- WithCreate withSku(Sku sku);
+ WithCreate withSku(MySqlServerSku sku);
}
+
/** The stage of the Server definition allowing to specify administratorLogin. */
interface WithAdministratorLogin {
/**
@@ -337,6 +362,7 @@ interface WithAdministratorLogin {
*/
WithCreate withAdministratorLogin(String administratorLogin);
}
+
/** The stage of the Server definition allowing to specify administratorLoginPassword. */
interface WithAdministratorLoginPassword {
/**
@@ -348,6 +374,7 @@ interface WithAdministratorLoginPassword {
*/
WithCreate withAdministratorLoginPassword(String administratorLoginPassword);
}
+
/** The stage of the Server definition allowing to specify version. */
interface WithVersion {
/**
@@ -358,6 +385,7 @@ interface WithVersion {
*/
WithCreate withVersion(ServerVersion version);
}
+
/** The stage of the Server definition allowing to specify availabilityZone. */
interface WithAvailabilityZone {
/**
@@ -368,6 +396,7 @@ interface WithAvailabilityZone {
*/
WithCreate withAvailabilityZone(String availabilityZone);
}
+
/** The stage of the Server definition allowing to specify createMode. */
interface WithCreateMode {
/**
@@ -378,6 +407,7 @@ interface WithCreateMode {
*/
WithCreate withCreateMode(CreateMode createMode);
}
+
/** The stage of the Server definition allowing to specify sourceServerResourceId. */
interface WithSourceServerResourceId {
/**
@@ -388,6 +418,7 @@ interface WithSourceServerResourceId {
*/
WithCreate withSourceServerResourceId(String sourceServerResourceId);
}
+
/** The stage of the Server definition allowing to specify restorePointInTime. */
interface WithRestorePointInTime {
/**
@@ -400,6 +431,7 @@ interface WithRestorePointInTime {
*/
WithCreate withRestorePointInTime(OffsetDateTime restorePointInTime);
}
+
/** The stage of the Server definition allowing to specify replicationRole. */
interface WithReplicationRole {
/**
@@ -410,6 +442,7 @@ interface WithReplicationRole {
*/
WithCreate withReplicationRole(ReplicationRole replicationRole);
}
+
/** The stage of the Server definition allowing to specify dataEncryption. */
interface WithDataEncryption {
/**
@@ -420,6 +453,7 @@ interface WithDataEncryption {
*/
WithCreate withDataEncryption(DataEncryption dataEncryption);
}
+
/** The stage of the Server definition allowing to specify storage. */
interface WithStorage {
/**
@@ -430,6 +464,7 @@ interface WithStorage {
*/
WithCreate withStorage(Storage storage);
}
+
/** The stage of the Server definition allowing to specify backup. */
interface WithBackup {
/**
@@ -440,6 +475,7 @@ interface WithBackup {
*/
WithCreate withBackup(Backup backup);
}
+
/** The stage of the Server definition allowing to specify highAvailability. */
interface WithHighAvailability {
/**
@@ -450,6 +486,7 @@ interface WithHighAvailability {
*/
WithCreate withHighAvailability(HighAvailability highAvailability);
}
+
/** The stage of the Server definition allowing to specify network. */
interface WithNetwork {
/**
@@ -460,7 +497,31 @@ interface WithNetwork {
*/
WithCreate withNetwork(Network network);
}
+
+ /** The stage of the Server definition allowing to specify privateEndpointConnections. */
+ interface WithPrivateEndpointConnections {
+ /**
+ * Specifies the privateEndpointConnections property: PrivateEndpointConnections related properties of a
+ * server..
+ *
+ * @param privateEndpointConnections PrivateEndpointConnections related properties of a server.
+ * @return the next definition stage.
+ */
+ WithCreate withPrivateEndpointConnections(List privateEndpointConnections);
+ }
+
+ /** The stage of the Server definition allowing to specify importSourceProperties. */
+ interface WithImportSourceProperties {
+ /**
+ * Specifies the importSourceProperties property: Source properties for import from storage..
+ *
+ * @param importSourceProperties Source properties for import from storage.
+ * @return the next definition stage.
+ */
+ WithCreate withImportSourceProperties(ImportSourceProperties importSourceProperties);
+ }
}
+
/**
* Begins update for the Server resource.
*
@@ -497,6 +558,7 @@ interface Update
*/
Server apply(Context context);
}
+
/** The Server update stages. */
interface UpdateStages {
/** The stage of the Server update allowing to specify tags. */
@@ -509,6 +571,7 @@ interface WithTags {
*/
Update withTags(Map tags);
}
+
/** The stage of the Server update allowing to specify identity. */
interface WithIdentity {
/**
@@ -517,8 +580,9 @@ interface WithIdentity {
* @param identity The cmk identity for the server.
* @return the next definition stage.
*/
- Update withIdentity(Identity identity);
+ Update withIdentity(MySqlServerIdentity identity);
}
+
/** The stage of the Server update allowing to specify sku. */
interface WithSku {
/**
@@ -527,8 +591,9 @@ interface WithSku {
* @param sku The SKU (pricing tier) of the server.
* @return the next definition stage.
*/
- Update withSku(Sku sku);
+ Update withSku(MySqlServerSku sku);
}
+
/** The stage of the Server update allowing to specify administratorLoginPassword. */
interface WithAdministratorLoginPassword {
/**
@@ -539,6 +604,7 @@ interface WithAdministratorLoginPassword {
*/
Update withAdministratorLoginPassword(String administratorLoginPassword);
}
+
/** The stage of the Server update allowing to specify version. */
interface WithVersion {
/**
@@ -549,6 +615,7 @@ interface WithVersion {
*/
Update withVersion(ServerVersion version);
}
+
/** The stage of the Server update allowing to specify storage. */
interface WithStorage {
/**
@@ -559,6 +626,7 @@ interface WithStorage {
*/
Update withStorage(Storage storage);
}
+
/** The stage of the Server update allowing to specify backup. */
interface WithBackup {
/**
@@ -569,6 +637,7 @@ interface WithBackup {
*/
Update withBackup(Backup backup);
}
+
/** The stage of the Server update allowing to specify highAvailability. */
interface WithHighAvailability {
/**
@@ -579,6 +648,7 @@ interface WithHighAvailability {
*/
Update withHighAvailability(HighAvailability highAvailability);
}
+
/** The stage of the Server update allowing to specify maintenanceWindow. */
interface WithMaintenanceWindow {
/**
@@ -589,6 +659,7 @@ interface WithMaintenanceWindow {
*/
Update withMaintenanceWindow(MaintenanceWindow maintenanceWindow);
}
+
/** The stage of the Server update allowing to specify replicationRole. */
interface WithReplicationRole {
/**
@@ -599,6 +670,7 @@ interface WithReplicationRole {
*/
Update withReplicationRole(ReplicationRole replicationRole);
}
+
/** The stage of the Server update allowing to specify dataEncryption. */
interface WithDataEncryption {
/**
@@ -609,6 +681,7 @@ interface WithDataEncryption {
*/
Update withDataEncryption(DataEncryption dataEncryption);
}
+
/** The stage of the Server update allowing to specify network. */
interface WithNetwork {
/**
@@ -620,6 +693,7 @@ interface WithNetwork {
Update withNetwork(Network network);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerBackup.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerBackup.java
index 60f3877a3447..03994205d0fb 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerBackup.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerBackup.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.mysqlflexibleserver.models;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupInner;
import java.time.OffsetDateTime;
@@ -31,13 +30,6 @@ public interface ServerBackup {
*/
String type();
- /**
- * Gets the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the backupType property: Backup type.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerEditionCapabilityV2.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerEditionCapabilityV2.java
new file mode 100644
index 000000000000..aa075d2bae7b
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerEditionCapabilityV2.java
@@ -0,0 +1,106 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Server edition capabilities. */
+@Immutable
+public final class ServerEditionCapabilityV2 {
+ /*
+ * Server edition name
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Default Sku name
+ */
+ @JsonProperty(value = "defaultSku", access = JsonProperty.Access.WRITE_ONLY)
+ private String defaultSku;
+
+ /*
+ * Default storage size
+ */
+ @JsonProperty(value = "defaultStorageSize", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer defaultStorageSize;
+
+ /*
+ * A list of supported storage editions
+ */
+ @JsonProperty(value = "supportedStorageEditions", access = JsonProperty.Access.WRITE_ONLY)
+ private List supportedStorageEditions;
+
+ /*
+ * A list of supported Skus
+ */
+ @JsonProperty(value = "supportedSkus", access = JsonProperty.Access.WRITE_ONLY)
+ private List supportedSkus;
+
+ /** Creates an instance of ServerEditionCapabilityV2 class. */
+ public ServerEditionCapabilityV2() {
+ }
+
+ /**
+ * Get the name property: Server edition name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the defaultSku property: Default Sku name.
+ *
+ * @return the defaultSku value.
+ */
+ public String defaultSku() {
+ return this.defaultSku;
+ }
+
+ /**
+ * Get the defaultStorageSize property: Default storage size.
+ *
+ * @return the defaultStorageSize value.
+ */
+ public Integer defaultStorageSize() {
+ return this.defaultStorageSize;
+ }
+
+ /**
+ * Get the supportedStorageEditions property: A list of supported storage editions.
+ *
+ * @return the supportedStorageEditions value.
+ */
+ public List supportedStorageEditions() {
+ return this.supportedStorageEditions;
+ }
+
+ /**
+ * Get the supportedSkus property: A list of supported Skus.
+ *
+ * @return the supportedSkus value.
+ */
+ public List supportedSkus() {
+ return this.supportedSkus;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (supportedStorageEditions() != null) {
+ supportedStorageEditions().forEach(e -> e.validate());
+ }
+ if (supportedSkus() != null) {
+ supportedSkus().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerForUpdate.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerForUpdate.java
index a1a61efddc3e..0c078c9b56e2 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerForUpdate.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerForUpdate.java
@@ -17,13 +17,13 @@ public final class ServerForUpdate {
* 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;
/*
* The properties that can be updated for a server.
@@ -47,7 +47,7 @@ public ServerForUpdate() {
*
* @return the identity value.
*/
- public Identity identity() {
+ public MySqlServerIdentity identity() {
return this.identity;
}
@@ -57,7 +57,7 @@ public Identity identity() {
* @param identity the identity value to set.
* @return the ServerForUpdate object itself.
*/
- public ServerForUpdate withIdentity(Identity identity) {
+ public ServerForUpdate withIdentity(MySqlServerIdentity identity) {
this.identity = identity;
return this;
}
@@ -67,7 +67,7 @@ public ServerForUpdate withIdentity(Identity identity) {
*
* @return the sku value.
*/
- public Sku sku() {
+ public MySqlServerSku sku() {
return this.sku;
}
@@ -77,7 +77,7 @@ public Sku sku() {
* @param sku the sku value to set.
* @return the ServerForUpdate object itself.
*/
- public ServerForUpdate withSku(Sku sku) {
+ public ServerForUpdate withSku(MySqlServerSku sku) {
this.sku = sku;
return this;
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerGtidSetParameter.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerGtidSetParameter.java
index 43a2f4535117..a197da44bc3f 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerGtidSetParameter.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerGtidSetParameter.java
@@ -7,11 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** Server gtid set parameters. */
+/** Server Gtid set parameters. */
@Fluent
public final class ServerGtidSetParameter {
/*
- * The gtid set of server.
+ * The Gtid set of server.
*/
@JsonProperty(value = "gtidSet")
private String gtidSet;
@@ -21,7 +21,7 @@ public ServerGtidSetParameter() {
}
/**
- * Get the gtidSet property: The gtid set of server.
+ * Get the gtidSet property: The Gtid set of server.
*
* @return the gtidSet value.
*/
@@ -30,7 +30,7 @@ public String gtidSet() {
}
/**
- * Set the gtidSet property: The gtid set of server.
+ * Set the gtidSet property: The Gtid set of server.
*
* @param gtidSet the gtidSet value to set.
* @return the ServerGtidSetParameter object itself.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerSkuTier.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerSkuTier.java
new file mode 100644
index 000000000000..000d96e967e0
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerSkuTier.java
@@ -0,0 +1,50 @@
+// 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 tier of the particular SKU, e.g. GeneralPurpose. */
+public final class ServerSkuTier extends ExpandableStringEnum {
+ /** Static value Burstable for ServerSkuTier. */
+ public static final ServerSkuTier BURSTABLE = fromString("Burstable");
+
+ /** Static value GeneralPurpose for ServerSkuTier. */
+ public static final ServerSkuTier GENERAL_PURPOSE = fromString("GeneralPurpose");
+
+ /** Static value MemoryOptimized for ServerSkuTier. */
+ public static final ServerSkuTier MEMORY_OPTIMIZED = fromString("MemoryOptimized");
+
+ /**
+ * Creates a new instance of ServerSkuTier value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ServerSkuTier() {
+ }
+
+ /**
+ * Creates or finds a ServerSkuTier from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ServerSkuTier.
+ */
+ @JsonCreator
+ public static ServerSkuTier fromString(String name) {
+ return fromString(name, ServerSkuTier.class);
+ }
+
+ /**
+ * Gets known ServerSkuTier values.
+ *
+ * @return known ServerSkuTier values.
+ */
+ public static Collection