, Void> beginResetGtid(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context);
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void resetGtid(String resourceGroupName, String serverName, ServerGtidSetParameter parameters);
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void resetGtid(String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context);
}
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
new file mode 100644
index 0000000000000..0a0e178a7ee53
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseInner.java
@@ -0,0 +1,253 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Represents BackupAndExport API Response. */
+@Fluent
+public final class BackupAndExportResponseInner extends ProxyResource {
+ /*
+ * The operation status
+ */
+ @JsonProperty(value = "status")
+ private OperationStatus status;
+
+ /*
+ * Start time
+ */
+ @JsonProperty(value = "startTime")
+ private OffsetDateTime startTime;
+
+ /*
+ * End time
+ */
+ @JsonProperty(value = "endTime")
+ private OffsetDateTime endTime;
+
+ /*
+ * Operation progress (0-100).
+ */
+ @JsonProperty(value = "percentComplete")
+ private Double percentComplete;
+
+ /*
+ * The response properties of a backup and export operation.
+ */
+ @JsonProperty(value = "properties")
+ private BackupAndExportResponseProperties innerProperties;
+
+ /*
+ * Error Response
+ *
+ * The BackupAndExport operation error response.
+ */
+ @JsonProperty(value = "error")
+ private ManagementError error;
+
+ /** Creates an instance of BackupAndExportResponseInner class. */
+ public BackupAndExportResponseInner() {
+ }
+
+ /**
+ * Get the status property: The operation status.
+ *
+ * @return the status value.
+ */
+ public OperationStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The operation status.
+ *
+ * @param status the status value to set.
+ * @return the BackupAndExportResponseInner object itself.
+ */
+ public BackupAndExportResponseInner withStatus(OperationStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: Start time.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: Start time.
+ *
+ * @param startTime the startTime value to set.
+ * @return the BackupAndExportResponseInner object itself.
+ */
+ public BackupAndExportResponseInner withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: End time.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: End time.
+ *
+ * @param endTime the endTime value to set.
+ * @return the BackupAndExportResponseInner object itself.
+ */
+ public BackupAndExportResponseInner withEndTime(OffsetDateTime endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the percentComplete property: Operation progress (0-100).
+ *
+ * @return the percentComplete value.
+ */
+ public Double percentComplete() {
+ return this.percentComplete;
+ }
+
+ /**
+ * Set the percentComplete property: Operation progress (0-100).
+ *
+ * @param percentComplete the percentComplete value to set.
+ * @return the BackupAndExportResponseInner object itself.
+ */
+ public BackupAndExportResponseInner withPercentComplete(Double percentComplete) {
+ this.percentComplete = percentComplete;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: The response properties of a backup and export operation.
+ *
+ * @return the innerProperties value.
+ */
+ private BackupAndExportResponseProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the error property: Error Response
+ *
+ * The BackupAndExport operation error response.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: Error Response
+ *
+ *
The BackupAndExport operation error response.
+ *
+ * @param error the error value to set.
+ * @return the BackupAndExportResponseInner object itself.
+ */
+ public BackupAndExportResponseInner withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Get the datasourceSizeInBytes property: Size of datasource in bytes.
+ *
+ * @return the datasourceSizeInBytes value.
+ */
+ public Long datasourceSizeInBytes() {
+ return this.innerProperties() == null ? null : this.innerProperties().datasourceSizeInBytes();
+ }
+
+ /**
+ * Set the datasourceSizeInBytes property: Size of datasource in bytes.
+ *
+ * @param datasourceSizeInBytes the datasourceSizeInBytes value to set.
+ * @return the BackupAndExportResponseInner object itself.
+ */
+ public BackupAndExportResponseInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BackupAndExportResponseProperties();
+ }
+ this.innerProperties().withDatasourceSizeInBytes(datasourceSizeInBytes);
+ return this;
+ }
+
+ /**
+ * Get the dataTransferredInBytes property: Data transferred in bytes.
+ *
+ * @return the dataTransferredInBytes value.
+ */
+ public Long dataTransferredInBytes() {
+ return this.innerProperties() == null ? null : this.innerProperties().dataTransferredInBytes();
+ }
+
+ /**
+ * Set the dataTransferredInBytes property: Data transferred in bytes.
+ *
+ * @param dataTransferredInBytes the dataTransferredInBytes value to set.
+ * @return the BackupAndExportResponseInner object itself.
+ */
+ public BackupAndExportResponseInner withDataTransferredInBytes(Long dataTransferredInBytes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BackupAndExportResponseProperties();
+ }
+ this.innerProperties().withDataTransferredInBytes(dataTransferredInBytes);
+ return this;
+ }
+
+ /**
+ * Get the backupMetadata property: Metadata related to backup to be stored for restoring resource in key-value
+ * pairs.
+ *
+ * @return the backupMetadata value.
+ */
+ public String backupMetadata() {
+ return this.innerProperties() == null ? null : this.innerProperties().backupMetadata();
+ }
+
+ /**
+ * Set the backupMetadata property: Metadata related to backup to be stored for restoring resource in key-value
+ * pairs.
+ *
+ * @param backupMetadata the backupMetadata value to set.
+ * @return the BackupAndExportResponseInner object itself.
+ */
+ public BackupAndExportResponseInner withBackupMetadata(String backupMetadata) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BackupAndExportResponseProperties();
+ }
+ this.innerProperties().withBackupMetadata(backupMetadata);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseProperties.java
new file mode 100644
index 0000000000000..0f556bdc7b3d6
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseProperties.java
@@ -0,0 +1,104 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+
+/** BackupAndExport Response Properties. */
+@Fluent
+public final class BackupAndExportResponseProperties {
+ /*
+ * Size of datasource in bytes
+ */
+ @JsonProperty(value = "datasourceSizeInBytes")
+ private Long datasourceSizeInBytes;
+
+ /*
+ * Data transferred in bytes
+ */
+ @JsonProperty(value = "dataTransferredInBytes")
+ private Long dataTransferredInBytes;
+
+ /*
+ * Metadata related to backup to be stored for restoring resource in key-value pairs.
+ */
+ @JsonProperty(value = "backupMetadata")
+ private String backupMetadata;
+
+ /** Creates an instance of BackupAndExportResponseProperties class. */
+ public BackupAndExportResponseProperties() {
+ }
+
+ /**
+ * Get the datasourceSizeInBytes property: Size of datasource in bytes.
+ *
+ * @return the datasourceSizeInBytes value.
+ */
+ public Long datasourceSizeInBytes() {
+ return this.datasourceSizeInBytes;
+ }
+
+ /**
+ * Set the datasourceSizeInBytes property: Size of datasource in bytes.
+ *
+ * @param datasourceSizeInBytes the datasourceSizeInBytes value to set.
+ * @return the BackupAndExportResponseProperties object itself.
+ */
+ public BackupAndExportResponseProperties withDatasourceSizeInBytes(Long datasourceSizeInBytes) {
+ this.datasourceSizeInBytes = datasourceSizeInBytes;
+ return this;
+ }
+
+ /**
+ * Get the dataTransferredInBytes property: Data transferred in bytes.
+ *
+ * @return the dataTransferredInBytes value.
+ */
+ public Long dataTransferredInBytes() {
+ return this.dataTransferredInBytes;
+ }
+
+ /**
+ * Set the dataTransferredInBytes property: Data transferred in bytes.
+ *
+ * @param dataTransferredInBytes the dataTransferredInBytes value to set.
+ * @return the BackupAndExportResponseProperties object itself.
+ */
+ public BackupAndExportResponseProperties withDataTransferredInBytes(Long dataTransferredInBytes) {
+ this.dataTransferredInBytes = dataTransferredInBytes;
+ return this;
+ }
+
+ /**
+ * Get the backupMetadata property: Metadata related to backup to be stored for restoring resource in key-value
+ * pairs.
+ *
+ * @return the backupMetadata value.
+ */
+ public String backupMetadata() {
+ return this.backupMetadata;
+ }
+
+ /**
+ * Set the backupMetadata property: Metadata related to backup to be stored for restoring resource in key-value
+ * pairs.
+ *
+ * @param backupMetadata the backupMetadata value to set.
+ * @return the BackupAndExportResponseProperties object itself.
+ */
+ public BackupAndExportResponseProperties withBackupMetadata(String backupMetadata) {
+ this.backupMetadata = backupMetadata;
+ 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/fluent/models/ConfigurationInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationInner.java
index c7d61a08e0f44..4357c0385ca3b 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
@@ -73,6 +73,29 @@ public ConfigurationInner withValue(String value) {
return this;
}
+ /**
+ * Get the currentValue property: Current value of the configuration.
+ *
+ * @return the currentValue value.
+ */
+ public String currentValue() {
+ return this.innerProperties() == null ? null : this.innerProperties().currentValue();
+ }
+
+ /**
+ * Set the currentValue property: Current value of the configuration.
+ *
+ * @param currentValue the currentValue value to set.
+ * @return the ConfigurationInner object itself.
+ */
+ public ConfigurationInner withCurrentValue(String currentValue) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConfigurationProperties();
+ }
+ this.innerProperties().withCurrentValue(currentValue);
+ return this;
+ }
+
/**
* Get the description property: Description of the configuration.
*
@@ -82,6 +105,15 @@ public String description() {
return this.innerProperties() == null ? null : this.innerProperties().description();
}
+ /**
+ * Get the documentationLink property: The link used to get the document from community or Azure site.
+ *
+ * @return the documentationLink value.
+ */
+ public String documentationLink() {
+ return this.innerProperties() == null ? null : this.innerProperties().documentationLink();
+ }
+
/**
* Get the defaultValue property: Default value of the configuration.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationProperties.java
index 9c9b3e63a94a6..4b487b154913e 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationProperties.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationProperties.java
@@ -20,12 +20,24 @@ public final class ConfigurationProperties {
@JsonProperty(value = "value")
private String value;
+ /*
+ * Current value of the configuration.
+ */
+ @JsonProperty(value = "currentValue")
+ private String currentValue;
+
/*
* Description of the configuration.
*/
@JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
private String description;
+ /*
+ * The link used to get the document from community or Azure site.
+ */
+ @JsonProperty(value = "documentationLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String documentationLink;
+
/*
* Default value of the configuration.
*/
@@ -92,6 +104,26 @@ public ConfigurationProperties withValue(String value) {
return this;
}
+ /**
+ * Get the currentValue property: Current value of the configuration.
+ *
+ * @return the currentValue value.
+ */
+ public String currentValue() {
+ return this.currentValue;
+ }
+
+ /**
+ * Set the currentValue property: Current value of the configuration.
+ *
+ * @param currentValue the currentValue value to set.
+ * @return the ConfigurationProperties object itself.
+ */
+ public ConfigurationProperties withCurrentValue(String currentValue) {
+ this.currentValue = currentValue;
+ return this;
+ }
+
/**
* Get the description property: Description of the configuration.
*
@@ -101,6 +133,15 @@ public String description() {
return this.description;
}
+ /**
+ * Get the documentationLink property: The link used to get the document from community or Azure site.
+ *
+ * @return the documentationLink value.
+ */
+ public String documentationLink() {
+ return this.documentationLink;
+ }
+
/**
* Get the defaultValue property: Default value of the configuration.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
index ef4edd8f530dc..09caef06d7bc9 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
@@ -9,6 +9,7 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryption;
import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailability;
import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceWindow;
+import com.azure.resourcemanager.mysqlflexibleserver.models.Network;
import com.azure.resourcemanager.mysqlflexibleserver.models.ReplicationRole;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersion;
import com.azure.resourcemanager.mysqlflexibleserver.models.Storage;
@@ -65,6 +66,12 @@ public final class ServerPropertiesForUpdate {
@JsonProperty(value = "dataEncryption")
private DataEncryption dataEncryption;
+ /*
+ * Network related properties of a server
+ */
+ @JsonProperty(value = "network")
+ private Network network;
+
/** Creates an instance of ServerPropertiesForUpdate class. */
public ServerPropertiesForUpdate() {
}
@@ -229,6 +236,26 @@ public ServerPropertiesForUpdate withDataEncryption(DataEncryption dataEncryptio
return this;
}
+ /**
+ * Get the network property: Network related properties of a server.
+ *
+ * @return the network value.
+ */
+ public Network network() {
+ return this.network;
+ }
+
+ /**
+ * Set the network property: Network related properties of a server.
+ *
+ * @param network the network value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withNetwork(Network network) {
+ this.network = network;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -250,5 +277,8 @@ public void validate() {
if (dataEncryption() != null) {
dataEncryption().validate();
}
+ if (network() != null) {
+ network().validate();
+ }
}
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ValidateBackupResponseInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ValidateBackupResponseInner.java
new file mode 100644
index 0000000000000..e64b2d25e0e16
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ValidateBackupResponseInner.java
@@ -0,0 +1,67 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents ValidateBackup API Response. */
+@Fluent
+public final class ValidateBackupResponseInner {
+ /*
+ * The response properties of a pre backup operation.
+ */
+ @JsonProperty(value = "properties")
+ private ValidateBackupResponseProperties innerProperties;
+
+ /** Creates an instance of ValidateBackupResponseInner class. */
+ public ValidateBackupResponseInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The response properties of a pre backup operation.
+ *
+ * @return the innerProperties value.
+ */
+ private ValidateBackupResponseProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the numberOfContainers property: Estimated no of storage containers required for resource data to be backed
+ * up.
+ *
+ * @return the numberOfContainers value.
+ */
+ public Integer numberOfContainers() {
+ return this.innerProperties() == null ? null : this.innerProperties().numberOfContainers();
+ }
+
+ /**
+ * Set the numberOfContainers property: Estimated no of storage containers required for resource data to be backed
+ * up.
+ *
+ * @param numberOfContainers the numberOfContainers value to set.
+ * @return the ValidateBackupResponseInner object itself.
+ */
+ public ValidateBackupResponseInner withNumberOfContainers(Integer numberOfContainers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ValidateBackupResponseProperties();
+ }
+ this.innerProperties().withNumberOfContainers(numberOfContainers);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ValidateBackupResponseProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ValidateBackupResponseProperties.java
new file mode 100644
index 0000000000000..dfa9984ee305d
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ValidateBackupResponseProperties.java
@@ -0,0 +1,52 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+
+/** ValidateBackup Response Properties. */
+@Fluent
+public final class ValidateBackupResponseProperties {
+ /*
+ * Estimated no of storage containers required for resource data to be backed up.
+ */
+ @JsonProperty(value = "numberOfContainers")
+ private Integer numberOfContainers;
+
+ /** Creates an instance of ValidateBackupResponseProperties class. */
+ public ValidateBackupResponseProperties() {
+ }
+
+ /**
+ * Get the numberOfContainers property: Estimated no of storage containers required for resource data to be backed
+ * up.
+ *
+ * @return the numberOfContainers value.
+ */
+ public Integer numberOfContainers() {
+ return this.numberOfContainers;
+ }
+
+ /**
+ * Set the numberOfContainers property: Estimated no of storage containers required for resource data to be backed
+ * up.
+ *
+ * @param numberOfContainers the numberOfContainers value to set.
+ * @return the ValidateBackupResponseProperties object itself.
+ */
+ public ValidateBackupResponseProperties withNumberOfContainers(Integer numberOfContainers) {
+ this.numberOfContainers = numberOfContainers;
+ 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/implementation/AzureADAdministratorsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorsClientImpl.java
index 4f6cce352a313..ec983c8ec8674 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
@@ -68,8 +68,7 @@ public final class AzureADAdministratorsClientImpl implements AzureADAdministrat
public interface AzureADAdministratorsService {
@Headers({"Content-Type: application/json"})
@Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/administrators/{administratorName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}")
@ExpectedResponses({200, 201, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> createOrUpdate(
@@ -85,8 +84,7 @@ Mono>> createOrUpdate(
@Headers({"Content-Type: application/json"})
@Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/administrators/{administratorName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@@ -101,8 +99,7 @@ Mono>> delete(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/administrators/{administratorName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -117,8 +114,7 @@ Mono> get(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/administrators")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByServer(
@@ -187,6 +183,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -194,7 +191,7 @@ private Mono>> createOrUpdateWithResponseAsync(
service
.createOrUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -253,12 +250,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -508,6 +506,7 @@ private Mono>> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter administratorName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -515,7 +514,7 @@ private Mono>> deleteWithResponseAsync(
service
.delete(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -563,12 +562,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -765,6 +765,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter administratorName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -772,7 +773,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -821,12 +822,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -921,6 +923,7 @@ private Mono> listByServerSinglePageAsy
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -928,7 +931,7 @@ private Mono> listByServerSinglePageAsy
service
.listByServer(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -980,12 +983,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportResponseImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportResponseImpl.java
new file mode 100644
index 0000000000000..6200fdecdb31c
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportResponseImpl.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportResponse;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatus;
+import java.time.OffsetDateTime;
+
+public final class BackupAndExportResponseImpl implements BackupAndExportResponse {
+ private BackupAndExportResponseInner innerObject;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ BackupAndExportResponseImpl(
+ BackupAndExportResponseInner 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 OperationStatus status() {
+ return this.innerModel().status();
+ }
+
+ public OffsetDateTime startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public OffsetDateTime endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public Double percentComplete() {
+ return this.innerModel().percentComplete();
+ }
+
+ public ManagementError error() {
+ return this.innerModel().error();
+ }
+
+ public Long datasourceSizeInBytes() {
+ return this.innerModel().datasourceSizeInBytes();
+ }
+
+ public Long dataTransferredInBytes() {
+ return this.innerModel().dataTransferredInBytes();
+ }
+
+ public String backupMetadata() {
+ return this.innerModel().backupMetadata();
+ }
+
+ public BackupAndExportResponseInner 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/BackupAndExportsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportsClientImpl.java
new file mode 100644
index 0000000000000..6eb944a5fa103
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportsClientImpl.java
@@ -0,0 +1,511 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.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.BackupAndExportsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseInner;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ValidateBackupResponseInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportRequest;
+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 BackupAndExportsClient. */
+public final class BackupAndExportsClientImpl implements BackupAndExportsClient {
+ /** The proxy service used to perform REST calls. */
+ private final BackupAndExportsService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupAndExportsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupAndExportsClientImpl(MySqlManagementClientImpl client) {
+ this.service =
+ RestProxy.create(BackupAndExportsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientBackupAndExports to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ public interface BackupAndExportsService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupAndExport")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @BodyParam("application/json") BackupAndExportRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateBackup")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> validateBackup(
+ @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);
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters) {
+ 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."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2022-09-30-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters, 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."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } 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.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, BackupAndExportResponseInner> beginCreateAsync(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ BackupAndExportResponseInner.class,
+ BackupAndExportResponseInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, BackupAndExportResponseInner> beginCreateAsync(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, serverName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ BackupAndExportResponseInner.class,
+ BackupAndExportResponseInner.class,
+ context);
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, BackupAndExportResponseInner> beginCreate(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters) {
+ return this.beginCreateAsync(resourceGroupName, serverName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, BackupAndExportResponseInner> beginCreate(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters, Context context) {
+ return this.beginCreateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters) {
+ return beginCreateAsync(resourceGroupName, serverName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters, Context context) {
+ return beginCreateAsync(resourceGroupName, serverName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupAndExportResponseInner create(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters) {
+ return createAsync(resourceGroupName, serverName, parameters).block();
+ }
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupAndExportResponseInner create(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters, Context context) {
+ return createAsync(resourceGroupName, serverName, parameters, context).block();
+ }
+
+ /**
+ * Validates if backup can be performed for given 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 ValidateBackup API Response along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> validateBackupWithResponseAsync(
+ String resourceGroupName, String serverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2022-09-30-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .validateBackup(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Validates if backup can be performed for given 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 ValidateBackup API Response along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> validateBackupWithResponseAsync(
+ String resourceGroupName, String serverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2022-09-30-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .validateBackup(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context);
+ }
+
+ /**
+ * Validates if backup can be performed for given 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 ValidateBackup API Response on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono validateBackupAsync(String resourceGroupName, String serverName) {
+ return validateBackupWithResponseAsync(resourceGroupName, serverName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Validates if backup can be performed for given 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 ValidateBackup API Response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response validateBackupWithResponse(
+ String resourceGroupName, String serverName, Context context) {
+ return validateBackupWithResponseAsync(resourceGroupName, serverName, context).block();
+ }
+
+ /**
+ * Validates if backup can be performed for given 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 ValidateBackup API Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ValidateBackupResponseInner validateBackup(String resourceGroupName, String serverName) {
+ return validateBackupWithResponse(resourceGroupName, serverName, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportsImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportsImpl.java
new file mode 100644
index 0000000000000..4f71540a67e92
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupAndExportsImpl.java
@@ -0,0 +1,84 @@
+// 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.BackupAndExportsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseInner;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ValidateBackupResponseInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportRequest;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportResponse;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExports;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ValidateBackupResponse;
+
+public final class BackupAndExportsImpl implements BackupAndExports {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupAndExportsImpl.class);
+
+ private final BackupAndExportsClient innerClient;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ public BackupAndExportsImpl(
+ BackupAndExportsClient innerClient, com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public BackupAndExportResponse create(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters) {
+ BackupAndExportResponseInner inner = this.serviceClient().create(resourceGroupName, serverName, parameters);
+ if (inner != null) {
+ return new BackupAndExportResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public BackupAndExportResponse create(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters, Context context) {
+ BackupAndExportResponseInner inner =
+ this.serviceClient().create(resourceGroupName, serverName, parameters, context);
+ if (inner != null) {
+ return new BackupAndExportResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response validateBackupWithResponse(
+ String resourceGroupName, String serverName, Context context) {
+ Response inner =
+ this.serviceClient().validateBackupWithResponse(resourceGroupName, serverName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ValidateBackupResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ValidateBackupResponse validateBackup(String resourceGroupName, String serverName) {
+ ValidateBackupResponseInner inner = this.serviceClient().validateBackup(resourceGroupName, serverName);
+ if (inner != null) {
+ return new ValidateBackupResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private BackupAndExportsClient 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/BackupsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/BackupsClientImpl.java
index af9a1d509833f..e3426f53af401 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
@@ -58,8 +58,7 @@ public final class BackupsClientImpl implements BackupsClient {
public interface BackupsService {
@Headers({"Content-Type: application/json"})
@Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/backups/{backupName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backups/{backupName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> put(
@@ -74,8 +73,7 @@ Mono> put(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/backups/{backupName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backups/{backupName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -90,8 +88,7 @@ Mono> get(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/backups")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backups")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByServer(
@@ -150,6 +147,7 @@ private Mono> putWithResponseAsync(
if (backupName == null) {
return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -157,7 +155,7 @@ private Mono> putWithResponseAsync(
service
.put(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -204,12 +202,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -305,6 +304,7 @@ private Mono> getWithResponseAsync(
if (backupName == null) {
return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -312,7 +312,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -359,12 +359,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -456,6 +457,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -463,7 +465,7 @@ private Mono> listByServerSinglePageAsync(
service
.listByServer(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -514,12 +516,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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 a39962596e67f..e8ade0c132261 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
@@ -56,8 +56,7 @@ public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailab
public interface CheckNameAvailabilitiesService {
@Headers({"Content-Type: application/json"})
@Post(
- "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}"
- + "/checkNameAvailability")
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkNameAvailability")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> execute(
@@ -106,6 +105,7 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -113,7 +113,7 @@ private Mono> executeWithResponseAsync(
service
.execute(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
locationName,
nameAvailabilityRequest,
@@ -159,12 +159,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
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 a8159467ed746..1d771a3629cbc 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,6 +106,7 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -113,7 +114,7 @@ private Mono> executeWithResponseAsync(
service
.execute(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
nameAvailabilityRequest,
accept,
@@ -154,12 +155,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
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 f5febdb08187b..4f32ae9315d0d 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
@@ -59,8 +59,7 @@ public final class CheckVirtualNetworkSubnetUsagesClientImpl implements CheckVir
public interface CheckVirtualNetworkSubnetUsagesService {
@Headers({"Content-Type: application/json"})
@Post(
- "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}"
- + "/checkVirtualNetworkSubnetUsage")
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> execute(
@@ -107,6 +106,7 @@ private Mono> executeWithResponse
} else {
parameters.validate();
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -114,7 +114,7 @@ private Mono> executeWithResponse
service
.execute(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
locationName,
parameters,
@@ -158,12 +158,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
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 b101069b493cc..6f167f8ec87ab 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
@@ -5,6 +5,7 @@
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;
import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
@@ -12,17 +13,11 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.IsDynamicConfig;
import com.azure.resourcemanager.mysqlflexibleserver.models.IsReadOnly;
-public final class ConfigurationImpl implements Configuration {
+public final class ConfigurationImpl implements Configuration, Configuration.Definition, Configuration.Update {
private ConfigurationInner innerObject;
private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
- ConfigurationImpl(
- ConfigurationInner innerObject, com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
public String id() {
return this.innerModel().id();
}
@@ -43,10 +38,18 @@ public String value() {
return this.innerModel().value();
}
+ public String currentValue() {
+ return this.innerModel().currentValue();
+ }
+
public String description() {
return this.innerModel().description();
}
+ public String documentationLink() {
+ return this.innerModel().documentationLink();
+ }
+
public String defaultValue() {
return this.innerModel().defaultValue();
}
@@ -75,6 +78,10 @@ public IsDynamicConfig isDynamicConfig() {
return this.innerModel().isDynamicConfig();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public ConfigurationInner innerModel() {
return this.innerObject;
}
@@ -82,4 +89,106 @@ public ConfigurationInner innerModel() {
private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
return this.serviceManager;
}
+
+ private String resourceGroupName;
+
+ private String serverName;
+
+ private String configurationName;
+
+ public ConfigurationImpl withExistingFlexibleServer(String resourceGroupName, String serverName) {
+ this.resourceGroupName = resourceGroupName;
+ this.serverName = serverName;
+ return this;
+ }
+
+ public Configuration create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Configuration create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), context);
+ return this;
+ }
+
+ ConfigurationImpl(String name, com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerObject = new ConfigurationInner();
+ this.serviceManager = serviceManager;
+ this.configurationName = name;
+ }
+
+ public ConfigurationImpl update() {
+ return this;
+ }
+
+ public Configuration apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .update(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Configuration apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .update(resourceGroupName, serverName, configurationName, this.innerModel(), context);
+ return this;
+ }
+
+ ConfigurationImpl(
+ ConfigurationInner innerObject, com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.serverName = Utils.getValueFromIdByName(innerObject.id(), "flexibleServers");
+ this.configurationName = Utils.getValueFromIdByName(innerObject.id(), "configurations");
+ }
+
+ public Configuration refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .getWithResponse(resourceGroupName, serverName, configurationName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Configuration refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .getWithResponse(resourceGroupName, serverName, configurationName, context)
+ .getValue();
+ return this;
+ }
+
+ public ConfigurationImpl withValue(String value) {
+ this.innerModel().withValue(value);
+ return this;
+ }
+
+ public ConfigurationImpl withCurrentValue(String currentValue) {
+ this.innerModel().withCurrentValue(currentValue);
+ return this;
+ }
+
+ public ConfigurationImpl withSource(ConfigurationSource source) {
+ this.innerModel().withSource(source);
+ return this;
+ }
}
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 4a43d07b3dc53..ea282327b1ca4 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
@@ -14,6 +14,7 @@
import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
@@ -65,10 +66,25 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient {
@Host("{$host}")
@ServiceInterface(name = "MySqlManagementClien")
public interface ConfigurationsService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/configurations/{configurationName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("configurationName") String configurationName,
+ @BodyParam("application/json") ConfigurationInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Patch(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/configurations/{configurationName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/configurations/{configurationName}")
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> update(
@@ -84,8 +100,7 @@ Mono>> update(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/configurations/{configurationName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/configurations/{configurationName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -100,8 +115,7 @@ Mono> get(
@Headers({"Content-Type: application/json"})
@Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/updateConfigurations")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations")
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> batchUpdate(
@@ -116,8 +130,7 @@ Mono>> batchUpdate(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/configurations")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/configurations")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByServer(
@@ -144,6 +157,319 @@ Mono> listByServerNext(
Context context);
}
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ 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."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2021-12-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ configurationName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ 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."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2021-12-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ configurationName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ConfigurationInner.class,
+ ConfigurationInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, context);
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters)
+ .getSyncPoller();
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfigurationInner createOrUpdate(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters).block();
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfigurationInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context).block();
+ }
+
/**
* Updates a configuration of a server.
*
@@ -187,6 +513,7 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -194,7 +521,7 @@ private Mono>> updateWithResponseAsync(
service
.update(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -253,12 +580,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -491,6 +819,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -498,7 +827,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -547,12 +876,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -650,6 +980,7 @@ private Mono>> batchUpdateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -657,7 +988,7 @@ private Mono>> batchUpdateWithResponseAsync(
service
.batchUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -706,12 +1037,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -919,6 +1251,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -926,7 +1259,7 @@ private Mono> listByServerSinglePageAsync(
service
.listByServer(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -992,12 +1325,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationsImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationsImpl.java
index 07b4897e779ee..7691bc15217ae 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationsImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationsImpl.java
@@ -30,32 +30,6 @@ public ConfigurationsImpl(
this.serviceManager = serviceManager;
}
- public Configuration update(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- ConfigurationInner inner =
- this.serviceClient().update(resourceGroupName, serverName, configurationName, parameters);
- if (inner != null) {
- return new ConfigurationImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public Configuration update(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- ConfigurationInner inner =
- this.serviceClient().update(resourceGroupName, serverName, configurationName, parameters, context);
- if (inner != null) {
- return new ConfigurationImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName, String serverName, String configurationName, Context context) {
Response inner =
@@ -120,6 +94,62 @@ public PagedIterable listByServer(
return Utils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager()));
}
+ public Configuration getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "flexibleServers");
+ if (serverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id)));
+ }
+ String configurationName = Utils.getValueFromIdByName(id, "configurations");
+ if (configurationName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, serverName, configurationName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "flexibleServers");
+ if (serverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id)));
+ }
+ String configurationName = Utils.getValueFromIdByName(id, "configurations");
+ if (configurationName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, serverName, configurationName, context);
+ }
+
private ConfigurationsClient serviceClient() {
return this.innerClient;
}
@@ -127,4 +157,8 @@ private ConfigurationsClient serviceClient() {
private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
return this.serviceManager;
}
+
+ public ConfigurationImpl define(String name) {
+ return new ConfigurationImpl(name, this.manager());
+ }
}
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 18906f44c8dc1..53bb088a30832 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
@@ -66,8 +66,7 @@ public final class DatabasesClientImpl implements DatabasesClient {
public interface DatabasesService {
@Headers({"Content-Type: application/json"})
@Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/databases/{databaseName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/databases/{databaseName}")
@ExpectedResponses({200, 201, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> createOrUpdate(
@@ -83,8 +82,7 @@ Mono>> createOrUpdate(
@Headers({"Content-Type: application/json"})
@Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/databases/{databaseName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/databases/{databaseName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@@ -99,8 +97,7 @@ Mono>> delete(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/databases/{databaseName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/databases/{databaseName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -115,8 +112,7 @@ Mono> get(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/databases")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/databases")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByServer(
@@ -181,6 +177,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -188,7 +185,7 @@ private Mono>> createOrUpdateWithResponseAsync(
service
.createOrUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -242,12 +239,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -462,6 +460,7 @@ private Mono>> deleteWithResponseAsync(
if (databaseName == null) {
return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -469,7 +468,7 @@ private Mono>> deleteWithResponseAsync(
service
.delete(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -516,12 +515,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -713,6 +713,7 @@ private Mono> getWithResponseAsync(
if (databaseName == null) {
return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -720,7 +721,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -767,12 +768,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -864,6 +866,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -871,7 +874,7 @@ private Mono> listByServerSinglePageAsync(
service
.listByServer(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -922,12 +925,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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 f8f002cc9ff72..df8ca09c2eceb 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
@@ -66,8 +66,7 @@ public final class FirewallRulesClientImpl implements FirewallRulesClient {
public interface FirewallRulesService {
@Headers({"Content-Type: application/json"})
@Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/firewallRules/{firewallRuleName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}")
@ExpectedResponses({200, 201, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> createOrUpdate(
@@ -83,8 +82,7 @@ Mono>> createOrUpdate(
@Headers({"Content-Type: application/json"})
@Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/firewallRules/{firewallRuleName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@@ -99,8 +97,7 @@ Mono>> delete(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/firewallRules/{firewallRuleName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -115,8 +112,7 @@ Mono> get(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/firewallRules")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/firewallRules")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByServer(
@@ -182,6 +178,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -189,7 +186,7 @@ private Mono>> createOrUpdateWithResponseAsync(
service
.createOrUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -248,12 +245,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -487,6 +485,7 @@ private Mono>> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -494,7 +493,7 @@ private Mono>> deleteWithResponseAsync(
service
.delete(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -542,12 +541,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -743,6 +743,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -750,7 +751,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -799,12 +800,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -896,6 +898,7 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -903,7 +906,7 @@ private Mono> listByServerSinglePageAsync(
service
.listByServer(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -954,12 +957,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
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 c97c952d3a74f..d2e657c1d9f66 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(), this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.execute(this.client.getEndpoint(), apiVersion, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -104,9 +104,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";
context = this.client.mergeContext(context);
- return service.execute(this.client.getEndpoint(), this.client.getApiVersion(), accept, context);
+ return service.execute(this.client.getEndpoint(), apiVersion, accept, context);
}
/**
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java
index 3a3801e673277..8c0c04a24a47e 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,6 +108,7 @@ private Mono> listSinglePageAsync(Strin
if (locationName == null) {
return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -115,7 +116,7 @@ private Mono> listSinglePageAsync(Strin
service
.list(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
locationName,
accept,
@@ -160,16 +161,11 @@ 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(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- locationName,
- accept,
- context)
+ .list(this.client.getEndpoint(), apiVersion, 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/LogFilesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LogFilesClientImpl.java
index 2e12e6a129dd9..b0ee993e1081a 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
@@ -57,8 +57,7 @@ public final class LogFilesClientImpl implements LogFilesClient {
public interface LogFilesService {
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/logFiles")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/logFiles")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByServer(
@@ -112,6 +111,7 @@ private Mono> listByServerSinglePageAsync(String res
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2021-12-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -119,7 +119,7 @@ private Mono> listByServerSinglePageAsync(String res
service
.listByServer(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -170,12 +170,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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 60037af3ed1ca..d342a6137625a 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
@@ -23,6 +23,7 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.AzureADAdministratorsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.BackupAndExportsClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.BackupsClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.CheckNameAvailabilitiesClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.CheckNameAvailabilityWithoutLocationsClient;
@@ -73,18 +74,6 @@ 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;
@@ -121,6 +110,18 @@ public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
+ /** The AzureADAdministratorsClient object to access its operations. */
+ private final AzureADAdministratorsClient azureADAdministrators;
+
+ /**
+ * Gets the AzureADAdministratorsClient object to access its operations.
+ *
+ * @return the AzureADAdministratorsClient object.
+ */
+ public AzureADAdministratorsClient getAzureADAdministrators() {
+ return this.azureADAdministrators;
+ }
+
/** The BackupsClient object to access its operations. */
private final BackupsClient backups;
@@ -133,6 +134,18 @@ public BackupsClient getBackups() {
return this.backups;
}
+ /** The BackupAndExportsClient object to access its operations. */
+ private final BackupAndExportsClient backupAndExports;
+
+ /**
+ * Gets the BackupAndExportsClient object to access its operations.
+ *
+ * @return the BackupAndExportsClient object.
+ */
+ public BackupAndExportsClient getBackupAndExports() {
+ return this.backupAndExports;
+ }
+
/** The ConfigurationsClient object to access its operations. */
private final ConfigurationsClient configurations;
@@ -277,18 +290,6 @@ public OperationsClient getOperations() {
return this.operations;
}
- /** The AzureADAdministratorsClient object to access its operations. */
- private final AzureADAdministratorsClient azureADAdministrators;
-
- /**
- * Gets the AzureADAdministratorsClient object to access its operations.
- *
- * @return the AzureADAdministratorsClient object.
- */
- public AzureADAdministratorsClient getAzureADAdministrators() {
- return this.azureADAdministrators;
- }
-
/**
* Initializes an instance of MySqlManagementClient client.
*
@@ -311,8 +312,9 @@ public AzureADAdministratorsClient getAzureADAdministrators() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-12-01-preview";
+ this.azureADAdministrators = new AzureADAdministratorsClientImpl(this);
this.backups = new BackupsClientImpl(this);
+ this.backupAndExports = new BackupAndExportsClientImpl(this);
this.configurations = new ConfigurationsClientImpl(this);
this.databases = new DatabasesClientImpl(this);
this.firewallRules = new FirewallRulesClientImpl(this);
@@ -325,7 +327,6 @@ public AzureADAdministratorsClient getAzureADAdministrators() {
this.checkNameAvailabilityWithoutLocations = new CheckNameAvailabilityWithoutLocationsClientImpl(this);
this.getPrivateDnsZoneSuffixes = new GetPrivateDnsZoneSuffixesClientImpl(this);
this.operations = new OperationsClientImpl(this);
- this.azureADAdministrators = new AzureADAdministratorsClientImpl(this);
}
/**
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 a7a063a56d5b5..0421db5b1224f 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(), this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context))
.>map(
res ->
new PagedResponseBase<>(
@@ -127,10 +127,11 @@ 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(), this.client.getApiVersion(), accept, context)
+ .list(this.client.getEndpoint(), apiVersion, 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 e944f5c211590..ca2ddd3f5ef8b 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
@@ -57,8 +57,7 @@ public final class ReplicasClientImpl implements ReplicasClient {
public interface ReplicasService {
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/replicas")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/replicas")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByServer(
@@ -112,6 +111,7 @@ private Mono> listByServerSinglePageAsync(String reso
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -119,7 +119,7 @@ private Mono> listByServerSinglePageAsync(String reso
service
.listByServer(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -170,12 +170,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
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 1c5fc65c9e2d1..6a239ccf4957a 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
@@ -18,6 +18,7 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.ReplicationRole;
import com.azure.resourcemanager.mysqlflexibleserver.models.Server;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerForUpdate;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParameter;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerState;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersion;
@@ -274,6 +275,14 @@ public void stop(Context context) {
serviceManager.servers().stop(resourceGroupName, serverName, context);
}
+ public void resetGtid(ServerGtidSetParameter parameters) {
+ serviceManager.servers().resetGtid(resourceGroupName, serverName, parameters);
+ }
+
+ public void resetGtid(ServerGtidSetParameter parameters, Context context) {
+ serviceManager.servers().resetGtid(resourceGroupName, serverName, parameters, context);
+ }
+
public ServerImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
@@ -410,8 +419,13 @@ public ServerImpl withHighAvailability(HighAvailability highAvailability) {
}
public ServerImpl withNetwork(Network network) {
- this.innerModel().withNetwork(network);
- return this;
+ if (isInCreateMode()) {
+ this.innerModel().withNetwork(network);
+ return this;
+ } else {
+ this.updateParameters.withNetwork(network);
+ return this;
+ }
}
public ServerImpl withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
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 69e63c3f27c59..170838e9d66af 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
@@ -36,6 +36,7 @@
import com.azure.resourcemanager.mysqlflexibleserver.fluent.ServersClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerForUpdate;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerListResult;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParameter;
import java.nio.ByteBuffer;
@@ -69,8 +70,7 @@ public final class ServersClientImpl implements ServersClient {
public interface ServersService {
@Headers({"Content-Type: application/json"})
@Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}")
@ExpectedResponses({200, 201, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> create(
@@ -85,8 +85,7 @@ Mono>> create(
@Headers({"Content-Type: application/json"})
@Patch(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}")
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> update(
@@ -101,8 +100,7 @@ Mono>> update(
@Headers({"Content-Type: application/json"})
@Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@@ -116,8 +114,7 @@ Mono>> delete(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getByResourceGroup(
@@ -131,8 +128,7 @@ Mono> getByResourceGroup(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByResourceGroup(
@@ -156,8 +152,7 @@ Mono> list(
@Headers({"Content-Type: application/json"})
@Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/failover")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover")
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> failover(
@@ -171,8 +166,7 @@ Mono>> failover(
@Headers({"Content-Type: application/json"})
@Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/restart")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart")
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> restart(
@@ -187,8 +181,7 @@ Mono>> restart(
@Headers({"Content-Type: application/json"})
@Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/start")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start")
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> start(
@@ -202,8 +195,7 @@ Mono>> start(
@Headers({"Content-Type: application/json"})
@Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL"
- + "/flexibleServers/{serverName}/stop")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop")
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> stop(
@@ -215,6 +207,21 @@ Mono>> stop(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> resetGtid(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @BodyParam("application/json") ServerGtidSetParameter parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -274,6 +281,7 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -281,7 +289,7 @@ private Mono>> createWithResponseAsync(
service
.create(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -330,12 +338,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -534,6 +543,7 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -541,7 +551,7 @@ private Mono>> updateWithResponseAsync(
service
.update(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -591,12 +601,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -796,6 +807,7 @@ private Mono>> deleteWithResponseAsync(String resource
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -803,7 +815,7 @@ private Mono>> deleteWithResponseAsync(String resource
service
.delete(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -845,12 +857,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1024,6 +1037,7 @@ private Mono> getByResourceGroupWithResponseAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1031,7 +1045,7 @@ private Mono> getByResourceGroupWithResponseAsync(
service
.getByResourceGroup(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1073,12 +1087,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1161,6 +1176,7 @@ private Mono> listByResourceGroupSinglePageAsync(Stri
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1168,7 +1184,7 @@ private Mono> listByResourceGroupSinglePageAsync(Stri
service
.listByResourceGroup(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
accept,
@@ -1214,12 +1230,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
accept,
@@ -1318,17 +1335,13 @@ 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(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- accept,
- context))
+ .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context))
.>map(
res ->
new PagedResponseBase<>(
@@ -1364,15 +1377,11 @@ 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(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- accept,
- context)
+ .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)
.map(
res ->
new PagedResponseBase<>(
@@ -1468,6 +1477,7 @@ private Mono>> failoverWithResponseAsync(String resour
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1475,7 +1485,7 @@ private Mono>> failoverWithResponseAsync(String resour
service
.failover(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1517,12 +1527,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1702,6 +1713,7 @@ private Mono>> restartWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1709,7 +1721,7 @@ private Mono>> restartWithResponseAsync(
service
.restart(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1758,12 +1770,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -1952,6 +1965,7 @@ private Mono>> startWithResponseAsync(String resourceG
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1959,7 +1973,7 @@ private Mono>> startWithResponseAsync(String resourceG
service
.start(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -2001,12 +2015,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -2178,6 +2193,7 @@ private Mono>> stopWithResponseAsync(String resourceGr
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ final String apiVersion = "2022-09-30-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2185,7 +2201,7 @@ private Mono>> stopWithResponseAsync(String resourceGr
service
.stop(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -2227,12 +2243,13 @@ 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(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -2373,6 +2390,265 @@ public void stop(String resourceGroupName, String serverName, Context context) {
stopAsync(resourceGroupName, serverName, context).block();
}
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> resetGtidWithResponseAsync(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters) {
+ 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."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2022-09-30-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .resetGtid(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> resetGtidWithResponseAsync(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters, 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."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } 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.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginResetGtidAsync(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters) {
+ Mono>> mono = resetGtidWithResponseAsync(resourceGroupName, serverName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginResetGtidAsync(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ resetGtidWithResponseAsync(resourceGroupName, serverName, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginResetGtid(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters) {
+ return this.beginResetGtidAsync(resourceGroupName, serverName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginResetGtid(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context) {
+ return this.beginResetGtidAsync(resourceGroupName, serverName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono resetGtidAsync(String resourceGroupName, String serverName, ServerGtidSetParameter parameters) {
+ return beginResetGtidAsync(resourceGroupName, serverName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono resetGtidAsync(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context) {
+ return beginResetGtidAsync(resourceGroupName, serverName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void resetGtid(String resourceGroupName, String serverName, ServerGtidSetParameter parameters) {
+ resetGtidAsync(resourceGroupName, serverName, parameters).block();
+ }
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void resetGtid(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context) {
+ resetGtidAsync(resourceGroupName, serverName, parameters, context).block();
+ }
+
/**
* Get the next page of items.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersImpl.java
index 358e7ec50bf34..66d4598822e7c 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersImpl.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersImpl.java
@@ -12,6 +12,7 @@
import com.azure.resourcemanager.mysqlflexibleserver.fluent.ServersClient;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner;
import com.azure.resourcemanager.mysqlflexibleserver.models.Server;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter;
import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParameter;
import com.azure.resourcemanager.mysqlflexibleserver.models.Servers;
@@ -113,6 +114,15 @@ public void stop(String resourceGroupName, String serverName, Context context) {
this.serviceClient().stop(resourceGroupName, serverName, context);
}
+ public void resetGtid(String resourceGroupName, String serverName, ServerGtidSetParameter parameters) {
+ this.serviceClient().resetGtid(resourceGroupName, serverName, parameters);
+ }
+
+ public void resetGtid(
+ String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context) {
+ this.serviceClient().resetGtid(resourceGroupName, serverName, parameters, context);
+ }
+
public Server getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ValidateBackupResponseImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ValidateBackupResponseImpl.java
new file mode 100644
index 0000000000000..b2892c8a5a954
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ValidateBackupResponseImpl.java
@@ -0,0 +1,33 @@
+// 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.ValidateBackupResponseInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ValidateBackupResponse;
+
+public final class ValidateBackupResponseImpl implements ValidateBackupResponse {
+ private ValidateBackupResponseInner innerObject;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ ValidateBackupResponseImpl(
+ ValidateBackupResponseInner innerObject,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Integer numberOfContainers() {
+ return this.innerModel().numberOfContainers();
+ }
+
+ public ValidateBackupResponseInner 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/models/BackupAndExportRequest.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExportRequest.java
new file mode 100644
index 0000000000000..e333e601153e1
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExportRequest.java
@@ -0,0 +1,70 @@
+// 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.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** BackupAndExport API Request. */
+@Fluent
+public final class BackupAndExportRequest extends BackupRequestBase {
+ /*
+ * Backup Target Store Details
+ */
+ @JsonProperty(value = "targetDetails", required = true)
+ private BackupStoreDetails targetDetails;
+
+ /** Creates an instance of BackupAndExportRequest class. */
+ public BackupAndExportRequest() {
+ }
+
+ /**
+ * Get the targetDetails property: Backup Target Store Details.
+ *
+ * @return the targetDetails value.
+ */
+ public BackupStoreDetails targetDetails() {
+ return this.targetDetails;
+ }
+
+ /**
+ * Set the targetDetails property: Backup Target Store Details.
+ *
+ * @param targetDetails the targetDetails value to set.
+ * @return the BackupAndExportRequest object itself.
+ */
+ public BackupAndExportRequest withTargetDetails(BackupStoreDetails targetDetails) {
+ this.targetDetails = targetDetails;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public BackupAndExportRequest withBackupSettings(BackupSettings backupSettings) {
+ super.withBackupSettings(backupSettings);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (targetDetails() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property targetDetails in model BackupAndExportRequest"));
+ } else {
+ targetDetails().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(BackupAndExportRequest.class);
+}
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
new file mode 100644
index 0000000000000..c07bb27739b4b
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExportResponse.java
@@ -0,0 +1,99 @@
+// 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.BackupAndExportResponseInner;
+import java.time.OffsetDateTime;
+
+/** An immutable client-side representation of BackupAndExportResponse. */
+public interface BackupAndExportResponse {
+ /**
+ * 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 status property: The operation status.
+ *
+ * @return the status value.
+ */
+ OperationStatus status();
+
+ /**
+ * Gets the startTime property: Start time.
+ *
+ * @return the startTime value.
+ */
+ OffsetDateTime startTime();
+
+ /**
+ * Gets the endTime property: End time.
+ *
+ * @return the endTime value.
+ */
+ OffsetDateTime endTime();
+
+ /**
+ * Gets the percentComplete property: Operation progress (0-100).
+ *
+ * @return the percentComplete value.
+ */
+ Double percentComplete();
+
+ /**
+ * Gets the error property: Error Response
+ *
+ * The BackupAndExport operation error response.
+ *
+ * @return the error value.
+ */
+ ManagementError error();
+
+ /**
+ * Gets the datasourceSizeInBytes property: Size of datasource in bytes.
+ *
+ * @return the datasourceSizeInBytes value.
+ */
+ Long datasourceSizeInBytes();
+
+ /**
+ * Gets the dataTransferredInBytes property: Data transferred in bytes.
+ *
+ * @return the dataTransferredInBytes value.
+ */
+ Long dataTransferredInBytes();
+
+ /**
+ * Gets the backupMetadata property: Metadata related to backup to be stored for restoring resource in key-value
+ * pairs.
+ *
+ * @return the backupMetadata value.
+ */
+ String backupMetadata();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseInner object.
+ *
+ * @return the inner object.
+ */
+ BackupAndExportResponseInner innerModel();
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExports.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExports.java
new file mode 100644
index 0000000000000..12f58ea42bbe6
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupAndExports.java
@@ -0,0 +1,65 @@
+// 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 BackupAndExports. */
+public interface BackupAndExports {
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response.
+ */
+ BackupAndExportResponse create(String resourceGroupName, String serverName, BackupAndExportRequest parameters);
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 BackupAndExport API Response.
+ */
+ BackupAndExportResponse create(
+ String resourceGroupName, String serverName, BackupAndExportRequest parameters, Context context);
+
+ /**
+ * Validates if backup can be performed for given 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 ValidateBackup API Response along with {@link Response}.
+ */
+ Response validateBackupWithResponse(
+ String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Validates if backup can be performed for given 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 ValidateBackup API Response.
+ */
+ ValidateBackupResponse validateBackup(String resourceGroupName, String serverName);
+}
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
new file mode 100644
index 0000000000000..187596ecf784c
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupFormat.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** 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");
+
+ /**
+ * Creates a new instance of BackupFormat value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public BackupFormat() {
+ }
+
+ /**
+ * Creates or finds a BackupFormat from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding BackupFormat.
+ */
+ @JsonCreator
+ public static BackupFormat fromString(String name) {
+ return fromString(name, BackupFormat.class);
+ }
+
+ /**
+ * Gets known BackupFormat values.
+ *
+ * @return known BackupFormat values.
+ */
+ public static Collection values() {
+ return values(BackupFormat.class);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupRequestBase.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupRequestBase.java
new file mode 100644
index 0000000000000..6449d602d0f84
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupRequestBase.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** BackupRequestBase is the base for all backup request. */
+@Fluent
+public class BackupRequestBase {
+ /*
+ * Backup Settings
+ */
+ @JsonProperty(value = "backupSettings", required = true)
+ private BackupSettings backupSettings;
+
+ /** Creates an instance of BackupRequestBase class. */
+ public BackupRequestBase() {
+ }
+
+ /**
+ * Get the backupSettings property: Backup Settings.
+ *
+ * @return the backupSettings value.
+ */
+ public BackupSettings backupSettings() {
+ return this.backupSettings;
+ }
+
+ /**
+ * Set the backupSettings property: Backup Settings.
+ *
+ * @param backupSettings the backupSettings value to set.
+ * @return the BackupRequestBase object itself.
+ */
+ public BackupRequestBase withBackupSettings(BackupSettings backupSettings) {
+ this.backupSettings = backupSettings;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (backupSettings() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property backupSettings in model BackupRequestBase"));
+ } else {
+ backupSettings().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(BackupRequestBase.class);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupSettings.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupSettings.java
new file mode 100644
index 0000000000000..42de6bf4329f6
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupSettings.java
@@ -0,0 +1,84 @@
+// 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.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Backup Settings. */
+@Fluent
+public final class BackupSettings {
+ /*
+ * The name of the backup.
+ */
+ @JsonProperty(value = "backupName", required = true)
+ private String backupName;
+
+ /*
+ * Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE)
+ */
+ @JsonProperty(value = "backupFormat")
+ private BackupFormat backupFormat;
+
+ /** Creates an instance of BackupSettings class. */
+ public BackupSettings() {
+ }
+
+ /**
+ * Get the backupName property: The name of the backup.
+ *
+ * @return the backupName value.
+ */
+ public String backupName() {
+ return this.backupName;
+ }
+
+ /**
+ * Set the backupName property: The name of the backup.
+ *
+ * @param backupName the backupName value to set.
+ * @return the BackupSettings object itself.
+ */
+ public BackupSettings withBackupName(String backupName) {
+ this.backupName = backupName;
+ return this;
+ }
+
+ /**
+ * Get the backupFormat property: Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE).
+ *
+ * @return the backupFormat value.
+ */
+ public BackupFormat backupFormat() {
+ return this.backupFormat;
+ }
+
+ /**
+ * Set the backupFormat property: Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE).
+ *
+ * @param backupFormat the backupFormat value to set.
+ * @return the BackupSettings object itself.
+ */
+ public BackupSettings withBackupFormat(BackupFormat backupFormat) {
+ this.backupFormat = backupFormat;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (backupName() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property backupName in model BackupSettings"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(BackupSettings.class);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupStoreDetails.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupStoreDetails.java
new file mode 100644
index 0000000000000..87e5313d32dba
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/BackupStoreDetails.java
@@ -0,0 +1,33 @@
+// 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.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** Details about the target where the backup content will be stored. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "objectType",
+ defaultImpl = BackupStoreDetails.class)
+@JsonTypeName("BackupStoreDetails")
+@JsonSubTypes({@JsonSubTypes.Type(name = "FullBackupStoreDetails", value = FullBackupStoreDetails.class)})
+@Immutable
+public class BackupStoreDetails {
+ /** Creates an instance of BackupStoreDetails class. */
+ public BackupStoreDetails() {
+ }
+
+ /**
+ * 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/Configuration.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Configuration.java
index 78e62044cf8ac..77190eb04a656 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
@@ -5,6 +5,7 @@
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;
/** An immutable client-side representation of Configuration. */
@@ -44,6 +45,13 @@ public interface Configuration {
*/
String value();
+ /**
+ * Gets the currentValue property: Current value of the configuration.
+ *
+ * @return the currentValue value.
+ */
+ String currentValue();
+
/**
* Gets the description property: Description of the configuration.
*
@@ -51,6 +59,13 @@ public interface Configuration {
*/
String description();
+ /**
+ * Gets the documentationLink property: The link used to get the document from community or Azure site.
+ *
+ * @return the documentationLink value.
+ */
+ String documentationLink();
+
/**
* Gets the defaultValue property: Default value of the configuration.
*
@@ -100,10 +115,161 @@ public interface Configuration {
*/
IsDynamicConfig isDynamicConfig();
+ /**
+ * Gets the name of the resource group.
+ *
+ * @return the name of the resource group.
+ */
+ String resourceGroupName();
+
/**
* Gets the inner com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner object.
*
* @return the inner object.
*/
ConfigurationInner innerModel();
+
+ /** The entirety of the Configuration definition. */
+ 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 {
+ /**
+ * Specifies resourceGroupName, serverName.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @return the next definition stage.
+ */
+ 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.
+ */
+ interface WithCreate
+ extends DefinitionStages.WithValue, DefinitionStages.WithCurrentValue, DefinitionStages.WithSource {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ Configuration create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ Configuration create(Context context);
+ }
+ /** The stage of the Configuration definition allowing to specify value. */
+ interface WithValue {
+ /**
+ * Specifies the value property: Value of the configuration..
+ *
+ * @param value Value of the configuration.
+ * @return the next definition stage.
+ */
+ WithCreate withValue(String value);
+ }
+ /** The stage of the Configuration definition allowing to specify currentValue. */
+ interface WithCurrentValue {
+ /**
+ * Specifies the currentValue property: Current value of the configuration..
+ *
+ * @param currentValue Current value of the configuration.
+ * @return the next definition stage.
+ */
+ WithCreate withCurrentValue(String currentValue);
+ }
+ /** The stage of the Configuration definition allowing to specify source. */
+ interface WithSource {
+ /**
+ * Specifies the source property: Source of the configuration..
+ *
+ * @param source Source of the configuration.
+ * @return the next definition stage.
+ */
+ WithCreate withSource(ConfigurationSource source);
+ }
+ }
+ /**
+ * Begins update for the Configuration resource.
+ *
+ * @return the stage of resource update.
+ */
+ Configuration.Update update();
+
+ /** The template for Configuration update. */
+ interface Update extends UpdateStages.WithValue, UpdateStages.WithCurrentValue, UpdateStages.WithSource {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ Configuration apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ Configuration apply(Context context);
+ }
+ /** The Configuration update stages. */
+ interface UpdateStages {
+ /** The stage of the Configuration update allowing to specify value. */
+ interface WithValue {
+ /**
+ * Specifies the value property: Value of the configuration..
+ *
+ * @param value Value of the configuration.
+ * @return the next definition stage.
+ */
+ Update withValue(String value);
+ }
+ /** The stage of the Configuration update allowing to specify currentValue. */
+ interface WithCurrentValue {
+ /**
+ * Specifies the currentValue property: Current value of the configuration..
+ *
+ * @param currentValue Current value of the configuration.
+ * @return the next definition stage.
+ */
+ Update withCurrentValue(String currentValue);
+ }
+ /** The stage of the Configuration update allowing to specify source. */
+ interface WithSource {
+ /**
+ * Specifies the source property: Source of the configuration..
+ *
+ * @param source Source of the configuration.
+ * @return the next definition stage.
+ */
+ Update withSource(ConfigurationSource source);
+ }
+ }
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @return the refreshed resource.
+ */
+ Configuration refresh();
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @param context The context to associate with this operation.
+ * @return the refreshed resource.
+ */
+ Configuration refresh(Context context);
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Configurations.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Configurations.java
index e24da8faab4bd..cbd8114e46c08 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Configurations.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Configurations.java
@@ -7,45 +7,9 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner;
/** Resource collection API of Configurations. */
public interface Configurations {
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @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 Configuration.
- */
- Configuration update(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @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 Configuration.
- */
- Configuration update(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context);
-
/**
* Gets information about a configuration of server.
*
@@ -138,4 +102,35 @@ PagedIterable listByServer(
Integer page,
Integer pageSize,
Context context);
+
+ /**
+ * Gets information about a configuration of server.
+ *
+ * @param id the resource 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 information about a configuration of server along with {@link Response}.
+ */
+ Configuration getById(String id);
+
+ /**
+ * Gets information about a configuration of server.
+ *
+ * @param id the resource 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 information about a configuration of server along with {@link Response}.
+ */
+ Response getByIdWithResponse(String id, Context context);
+
+ /**
+ * Begins definition for a new Configuration resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new Configuration definition.
+ */
+ Configuration.DefinitionStages.Blank define(String name);
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/FullBackupStoreDetails.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/FullBackupStoreDetails.java
new file mode 100644
index 0000000000000..182a5e2e43db7
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/FullBackupStoreDetails.java
@@ -0,0 +1,66 @@
+// 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.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.util.List;
+
+/** FullBackupStoreDetails is used for scenarios where backup data is streamed/copied over to a storage destination. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
+@JsonTypeName("FullBackupStoreDetails")
+@Fluent
+public final class FullBackupStoreDetails extends BackupStoreDetails {
+ /*
+ * SASUriList of storage containers where backup data is to be streamed/copied.
+ */
+ @JsonProperty(value = "sasUriList", required = true)
+ private List sasUriList;
+
+ /** Creates an instance of FullBackupStoreDetails class. */
+ public FullBackupStoreDetails() {
+ }
+
+ /**
+ * Get the sasUriList property: SASUriList of storage containers where backup data is to be streamed/copied.
+ *
+ * @return the sasUriList value.
+ */
+ public List sasUriList() {
+ return this.sasUriList;
+ }
+
+ /**
+ * Set the sasUriList property: SASUriList of storage containers where backup data is to be streamed/copied.
+ *
+ * @param sasUriList the sasUriList value to set.
+ * @return the FullBackupStoreDetails object itself.
+ */
+ public FullBackupStoreDetails withSasUriList(List sasUriList) {
+ this.sasUriList = sasUriList;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (sasUriList() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sasUriList in model FullBackupStoreDetails"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(FullBackupStoreDetails.class);
+}
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/Identity.java
index 3aa3845afae3d..c46b12ed9533e 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/Identity.java
@@ -11,7 +11,7 @@
/** Properties to configure Identity for Bring your Own Keys. */
@Fluent
-public class Identity {
+public final class Identity {
/*
* ObjectId from the KeyVault
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ManagedServiceIdentityType.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ManagedServiceIdentityType.java
index 4ad17630fa06d..e380c8ad335be 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ManagedServiceIdentityType.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ManagedServiceIdentityType.java
@@ -4,45 +4,41 @@
package com.azure.resourcemanager.mysqlflexibleserver.models;
+import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.Collection;
/** Type of managed service identity. */
-public enum ManagedServiceIdentityType {
- /** Enum value UserAssigned. */
- USER_ASSIGNED("UserAssigned");
+public final class ManagedServiceIdentityType extends ExpandableStringEnum {
+ /** Static value UserAssigned for ManagedServiceIdentityType. */
+ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned");
- /** The actual serialized value for a ManagedServiceIdentityType instance. */
- private final String value;
-
- ManagedServiceIdentityType(String value) {
- this.value = value;
+ /**
+ * Creates a new instance of ManagedServiceIdentityType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ManagedServiceIdentityType() {
}
/**
- * Parses a serialized value to a ManagedServiceIdentityType instance.
+ * Creates or finds a ManagedServiceIdentityType from its string representation.
*
- * @param value the serialized value to parse.
- * @return the parsed ManagedServiceIdentityType object, or null if unable to parse.
+ * @param name a name to look for.
+ * @return the corresponding ManagedServiceIdentityType.
*/
@JsonCreator
- public static ManagedServiceIdentityType fromString(String value) {
- if (value == null) {
- return null;
- }
- ManagedServiceIdentityType[] items = ManagedServiceIdentityType.values();
- for (ManagedServiceIdentityType item : items) {
- if (item.toString().equalsIgnoreCase(value)) {
- return item;
- }
- }
- return null;
+ public static ManagedServiceIdentityType fromString(String name) {
+ return fromString(name, ManagedServiceIdentityType.class);
}
- /** {@inheritDoc} */
- @JsonValue
- @Override
- public String toString() {
- return this.value;
+ /**
+ * Gets known ManagedServiceIdentityType values.
+ *
+ * @return known ManagedServiceIdentityType values.
+ */
+ public static Collection values() {
+ return values(ManagedServiceIdentityType.class);
}
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Network.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Network.java
index 7b5e50e9d4afd..c74292906286c 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Network.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Network.java
@@ -14,7 +14,7 @@ public final class Network {
* Whether or not public network access is allowed for this server. Value is 'Disabled' when server has VNet
* integration.
*/
- @JsonProperty(value = "publicNetworkAccess", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonProperty(value = "publicNetworkAccess")
private EnableStatusEnum publicNetworkAccess;
/*
@@ -43,6 +43,18 @@ public EnableStatusEnum publicNetworkAccess() {
return this.publicNetworkAccess;
}
+ /**
+ * Set the publicNetworkAccess property: Whether or not public network access is allowed for this server. Value is
+ * 'Disabled' when server has VNet integration.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the Network object itself.
+ */
+ public Network withPublicNetworkAccess(EnableStatusEnum publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
/**
* Get the delegatedSubnetResourceId property: Delegated subnet resource id used to setup vnet for a server.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationStatus.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationStatus.java
new file mode 100644
index 0000000000000..1132804a454cd
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/OperationStatus.java
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/** The operation status. */
+public enum OperationStatus {
+ /** Enum value Pending. */
+ PENDING("Pending"),
+
+ /** Enum value InProgress. */
+ IN_PROGRESS("InProgress"),
+
+ /** Enum value Succeeded. */
+ SUCCEEDED("Succeeded"),
+
+ /** Enum value Failed. */
+ FAILED("Failed"),
+
+ /** Enum value CancelInProgress. */
+ CANCEL_IN_PROGRESS("CancelInProgress"),
+
+ /** Enum value Canceled. */
+ CANCELED("Canceled");
+
+ /** The actual serialized value for a OperationStatus instance. */
+ private final String value;
+
+ OperationStatus(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a OperationStatus instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed OperationStatus object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static OperationStatus fromString(String value) {
+ if (value == null) {
+ return null;
+ }
+ OperationStatus[] items = OperationStatus.values();
+ for (OperationStatus item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
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 43f7efe88b29c..0defb712482f3 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
@@ -480,7 +480,8 @@ interface Update
UpdateStages.WithHighAvailability,
UpdateStages.WithMaintenanceWindow,
UpdateStages.WithReplicationRole,
- UpdateStages.WithDataEncryption {
+ UpdateStages.WithDataEncryption,
+ UpdateStages.WithNetwork {
/**
* Executes the update request.
*
@@ -608,6 +609,16 @@ interface WithDataEncryption {
*/
Update withDataEncryption(DataEncryption dataEncryption);
}
+ /** The stage of the Server update allowing to specify network. */
+ interface WithNetwork {
+ /**
+ * Specifies the network property: Network related properties of a server.
+ *
+ * @param network Network related properties of a server.
+ * @return the next definition stage.
+ */
+ Update withNetwork(Network network);
+ }
}
/**
* Refreshes the resource to sync with Azure.
@@ -698,4 +709,25 @@ interface WithDataEncryption {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
void stop(Context context);
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param parameters The required parameters for resetting GTID on a 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.
+ */
+ void resetGtid(ServerGtidSetParameter parameters);
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param parameters The required parameters for resetting GTID on a 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.
+ */
+ void resetGtid(ServerGtidSetParameter parameters, Context context);
}
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 01dcdbabafc8d..a1a61efddc3e2 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
@@ -295,6 +295,29 @@ public ServerForUpdate withDataEncryption(DataEncryption dataEncryption) {
return this;
}
+ /**
+ * Get the network property: Network related properties of a server.
+ *
+ * @return the network value.
+ */
+ public Network network() {
+ return this.innerProperties() == null ? null : this.innerProperties().network();
+ }
+
+ /**
+ * Set the network property: Network related properties of a server.
+ *
+ * @param network the network value to set.
+ * @return the ServerForUpdate object itself.
+ */
+ public ServerForUpdate withNetwork(Network network) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerPropertiesForUpdate();
+ }
+ this.innerProperties().withNetwork(network);
+ return this;
+ }
+
/**
* Validates the instance.
*
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
new file mode 100644
index 0000000000000..43a2f45351179
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerGtidSetParameter.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.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Server gtid set parameters. */
+@Fluent
+public final class ServerGtidSetParameter {
+ /*
+ * The gtid set of server.
+ */
+ @JsonProperty(value = "gtidSet")
+ private String gtidSet;
+
+ /** Creates an instance of ServerGtidSetParameter class. */
+ public ServerGtidSetParameter() {
+ }
+
+ /**
+ * Get the gtidSet property: The gtid set of server.
+ *
+ * @return the gtidSet value.
+ */
+ public String gtidSet() {
+ return this.gtidSet;
+ }
+
+ /**
+ * Set the gtidSet property: The gtid set of server.
+ *
+ * @param gtidSet the gtidSet value to set.
+ * @return the ServerGtidSetParameter object itself.
+ */
+ public ServerGtidSetParameter withGtidSet(String gtidSet) {
+ this.gtidSet = gtidSet;
+ 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/Servers.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Servers.java
index 2c5de8093a34b..c7d65da81a6b4 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Servers.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Servers.java
@@ -195,6 +195,31 @@ public interface Servers {
*/
void stop(String resourceGroupName, String serverName, Context context);
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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.
+ */
+ void resetGtid(String resourceGroupName, String serverName, ServerGtidSetParameter parameters);
+
+ /**
+ * Resets GTID on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for resetting GTID on a 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.
+ */
+ void resetGtid(String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context);
+
/**
* Gets information about a server.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Storage.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Storage.java
index 9f4b6f69a9873..8567c348df707 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Storage.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Storage.java
@@ -28,6 +28,12 @@ public final class Storage {
@JsonProperty(value = "autoGrow")
private EnableStatusEnum autoGrow;
+ /*
+ * Enable Log On Disk or not.
+ */
+ @JsonProperty(value = "logOnDisk")
+ private EnableStatusEnum logOnDisk;
+
/*
* The sku name of the server storage.
*/
@@ -104,6 +110,26 @@ public Storage withAutoGrow(EnableStatusEnum autoGrow) {
return this;
}
+ /**
+ * Get the logOnDisk property: Enable Log On Disk or not.
+ *
+ * @return the logOnDisk value.
+ */
+ public EnableStatusEnum logOnDisk() {
+ return this.logOnDisk;
+ }
+
+ /**
+ * Set the logOnDisk property: Enable Log On Disk or not.
+ *
+ * @param logOnDisk the logOnDisk value to set.
+ * @return the Storage object itself.
+ */
+ public Storage withLogOnDisk(EnableStatusEnum logOnDisk) {
+ this.logOnDisk = logOnDisk;
+ return this;
+ }
+
/**
* Get the storageSku property: The sku name of the server storage.
*
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ValidateBackupResponse.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ValidateBackupResponse.java
new file mode 100644
index 0000000000000..f88803502a0b2
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ValidateBackupResponse.java
@@ -0,0 +1,25 @@
+// 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.ValidateBackupResponseInner;
+
+/** An immutable client-side representation of ValidateBackupResponse. */
+public interface ValidateBackupResponse {
+ /**
+ * Gets the numberOfContainers property: Estimated no of storage containers required for resource data to be backed
+ * up.
+ *
+ * @return the numberOfContainers value.
+ */
+ Integer numberOfContainers();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ValidateBackupResponseInner object.
+ *
+ * @return the inner object.
+ */
+ ValidateBackupResponseInner innerModel();
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateSamples.java
index 5db566be47594..60d686e6cba1f 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateSamples.java
@@ -10,7 +10,7 @@
/** Samples for AzureADAdministrators CreateOrUpdate. */
public final class AzureADAdministratorsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/AzureADAdministratorCreate.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorCreate.json
*/
/**
* Sample code: Create an azure ad administrator.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteSamples.java
index 2e7f65c35e37f..abb971dbfb546 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteSamples.java
@@ -9,7 +9,7 @@
/** Samples for AzureADAdministrators Delete. */
public final class AzureADAdministratorsDeleteSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/AzureADAdministratorDelete.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorDelete.json
*/
/**
* Sample code: Delete an azure ad administrator.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetSamples.java
index 569c915a2efc3..d4fb98587e0d3 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetSamples.java
@@ -9,7 +9,7 @@
/** Samples for AzureADAdministrators Get. */
public final class AzureADAdministratorsGetSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/AzureADAdministratorGet.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorGet.json
*/
/**
* Sample code: Get an azure ad administrator.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerSamples.java
index 83760ad5071a6..956453d8bda36 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerSamples.java
@@ -7,7 +7,7 @@
/** Samples for AzureADAdministrators ListByServer. */
public final class AzureADAdministratorsListByServerSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/AzureADAdministratorsListByServer.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorsListByServer.json
*/
/**
* Sample code: List Azure AD administrators in a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportCreateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportCreateSamples.java
new file mode 100644
index 0000000000000..fbb01d91eb1db
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportCreateSamples.java
@@ -0,0 +1,34 @@
+// 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.generated;
+
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportRequest;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupSettings;
+import com.azure.resourcemanager.mysqlflexibleserver.models.FullBackupStoreDetails;
+import java.util.Arrays;
+
+/** Samples for BackupAndExport Create. */
+public final class BackupAndExportCreateSamples {
+ /*
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupAndExport.json
+ */
+ /**
+ * Sample code: Create and Export Backup.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void createAndExportBackup(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager
+ .backupAndExports()
+ .create(
+ "TestGroup",
+ "mysqltestserver",
+ new BackupAndExportRequest()
+ .withBackupSettings(new BackupSettings().withBackupName("customer-backup-name"))
+ .withTargetDetails(
+ new FullBackupStoreDetails().withSasUriList(Arrays.asList("sasuri1", "sasuri2"))),
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportValidateBackupSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportValidateBackupSamples.java
new file mode 100644
index 0000000000000..4f4c7cee72adc
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportValidateBackupSamples.java
@@ -0,0 +1,22 @@
+// 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.generated;
+
+/** Samples for BackupAndExport ValidateBackup. */
+public final class BackupAndExportValidateBackupSamples {
+ /*
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/ValidateBackup.json
+ */
+ /**
+ * Sample code: Validate Backup.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void validateBackup(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager
+ .backupAndExports()
+ .validateBackupWithResponse("TestGroup", "mysqltestserver", com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetSamples.java
index e4a8b3a5b300f..5108efd68a111 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Backups Get. */
public final class BackupsGetSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/BackupGet.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupGet.json
*/
/**
* Sample code: Get a backup for a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerSamples.java
index 8130282dba5cf..e3246d23dfb77 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerSamples.java
@@ -7,7 +7,7 @@
/** Samples for Backups ListByServer. */
public final class BackupsListByServerSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/BackupsListByServer.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupsListByServer.json
*/
/**
* Sample code: List backups for a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutSamples.java
index b336758be6d0e..b2e49f72cf080 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutSamples.java
@@ -7,7 +7,7 @@
/** Samples for Backups Put. */
public final class BackupsPutSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/BackupPut.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupPut.json
*/
/**
* Sample code: Create backup for a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java
index b5fec7ae0cdbb..1b4d85575b47e 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java
@@ -9,7 +9,7 @@
/** Samples for CheckNameAvailability Execute. */
public final class CheckNameAvailabilityExecuteSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/CheckNameAvailability.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json
*/
/**
* Sample code: Check name availability.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationExecuteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationExecuteSamples.java
index 085bcdc4f5fb1..a6c68f9eed147 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationExecuteSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationExecuteSamples.java
@@ -9,7 +9,7 @@
/** Samples for CheckNameAvailabilityWithoutLocation Execute. */
public final class CheckNameAvailabilityWithoutLocationExecuteSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/CheckNameAvailability.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json
*/
/**
* Sample code: Check name availability.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsageExecuteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsageExecuteSamples.java
index bfa7712e7e767..aceed539d542e 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsageExecuteSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsageExecuteSamples.java
@@ -9,7 +9,7 @@
/** Samples for CheckVirtualNetworkSubnetUsage Execute. */
public final class CheckVirtualNetworkSubnetUsageExecuteSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json
*/
/**
* Sample code: CheckVirtualNetworkSubnetUsage.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateSamples.java
index 2a356d033faf3..159cdf8e709a5 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateSamples.java
@@ -12,7 +12,7 @@
/** Samples for Configurations BatchUpdate. */
public final class ConfigurationsBatchUpdateSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ConfigurationsBatchUpdate.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsBatchUpdate.json
*/
/**
* Sample code: ConfigurationList.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsCreateOrUpdateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsCreateOrUpdateSamples.java
new file mode 100644
index 0000000000000..224db98d89536
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsCreateOrUpdateSamples.java
@@ -0,0 +1,28 @@
+// 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.generated;
+
+import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
+
+/** Samples for Configurations CreateOrUpdate. */
+public final class ConfigurationsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationCreateOrUpdate.json
+ */
+ /**
+ * Sample code: ConfigurationCreateOrUpdate.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void configurationCreateOrUpdate(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager
+ .configurations()
+ .define("event_scheduler")
+ .withExistingFlexibleServer("TestGroup", "testserver")
+ .withValue("off")
+ .withSource(ConfigurationSource.USER_OVERRIDE)
+ .create();
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetSamples.java
index 93565cd2dc024..2b2cbe872d5b1 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Configurations Get. */
public final class ConfigurationsGetSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ConfigurationGet.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationGet.json
*/
/**
* Sample code: Get a configuration.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerSamples.java
index 7160d7f9ade9b..00b9fc9391a04 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerSamples.java
@@ -7,7 +7,7 @@
/** Samples for Configurations ListByServer. */
public final class ConfigurationsListByServerSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ConfigurationsListByServer.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsListByServer.json
*/
/**
* Sample code: List all configurations for a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsUpdateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsUpdateSamples.java
index eb4bf7c4891c4..a5900438681be 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsUpdateSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsUpdateSamples.java
@@ -4,13 +4,13 @@
package com.azure.resourcemanager.mysqlflexibleserver.generated;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.Configuration;
import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
/** Samples for Configurations Update. */
public final class ConfigurationsUpdateSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ConfigurationUpdate.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationUpdate.json
*/
/**
* Sample code: Update a user configuration.
@@ -18,13 +18,11 @@ public final class ConfigurationsUpdateSamples {
* @param manager Entry point to MySqlManager.
*/
public static void updateAUserConfiguration(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager
- .configurations()
- .update(
- "testrg",
- "testserver",
- "event_scheduler",
- new ConfigurationInner().withValue("on").withSource(ConfigurationSource.USER_OVERRIDE),
- com.azure.core.util.Context.NONE);
+ Configuration resource =
+ manager
+ .configurations()
+ .getWithResponse("testrg", "testserver", "event_scheduler", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update().withValue("on").withSource(ConfigurationSource.USER_OVERRIDE).apply();
}
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateSamples.java
index de2c91220cb0f..90661cded5603 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateSamples.java
@@ -7,7 +7,7 @@
/** Samples for Databases CreateOrUpdate. */
public final class DatabasesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/DatabaseCreate.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseCreate.json
*/
/**
* Sample code: Create a database.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesDeleteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesDeleteSamples.java
index 3e297d5dbc4e6..f01b8aa2696dc 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesDeleteSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Databases Delete. */
public final class DatabasesDeleteSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/DatabaseDelete.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseDelete.json
*/
/**
* Sample code: Delete a database.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesGetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesGetSamples.java
index 4cda33dda59eb..4d3c65bca5aec 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesGetSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Databases Get. */
public final class DatabasesGetSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/DatabaseGet.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseGet.json
*/
/**
* Sample code: Get a database.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesListByServerSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesListByServerSamples.java
index dda3e685769e2..bb91f676dc8f8 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesListByServerSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesListByServerSamples.java
@@ -7,7 +7,7 @@
/** Samples for Databases ListByServer. */
public final class DatabasesListByServerSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/DatabasesListByServer.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabasesListByServer.json
*/
/**
* Sample code: List databases in a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java
index de91d27b062c1..84ecda3c44954 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java
@@ -7,7 +7,7 @@
/** Samples for FirewallRules CreateOrUpdate. */
public final class FirewallRulesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/FirewallRuleCreate.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleCreate.json
*/
/**
* Sample code: Create a firewall rule.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesDeleteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesDeleteSamples.java
index 1c40bc8d531b7..77e5e69ca4a3f 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesDeleteSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for FirewallRules Delete. */
public final class FirewallRulesDeleteSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/FirewallRuleDelete.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleDelete.json
*/
/**
* Sample code: Delete a firewall rule.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesGetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesGetSamples.java
index 1a8a0e66a1859..853bfe5a56f97 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesGetSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for FirewallRules Get. */
public final class FirewallRulesGetSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/FirewallRuleGet.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleGet.json
*/
/**
* Sample code: Get a firewall rule.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesListByServerSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesListByServerSamples.java
index 5711621b3030c..fd00664fab19f 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesListByServerSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesListByServerSamples.java
@@ -7,7 +7,7 @@
/** Samples for FirewallRules ListByServer. */
public final class FirewallRulesListByServerSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/FirewallRulesListByServer.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRulesListByServer.json
*/
/**
* Sample code: List all firewall rules in a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java
index 2f05463211ba8..d38883b660733 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java
@@ -7,7 +7,7 @@
/** Samples for GetPrivateDnsZoneSuffix Execute. */
public final class GetPrivateDnsZoneSuffixExecuteSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/GetPrivateDnsZoneSuffix.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/GetPrivateDnsZoneSuffix.json
*/
/**
* Sample code: GetPrivateDnsZoneSuffix.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListSamples.java
index 675eeff7d851f..a71984ac15fe4 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for LocationBasedCapabilities List. */
public final class LocationBasedCapabilitiesListSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/CapabilitiesByLocationList.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CapabilitiesByLocationList.json
*/
/**
* Sample code: CapabilitiesList.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilesListByServerSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilesListByServerSamples.java
index 3169f8a93f5d1..ba4d000715f48 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilesListByServerSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilesListByServerSamples.java
@@ -7,7 +7,7 @@
/** Samples for LogFiles ListByServer. */
public final class LogFilesListByServerSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/LogFilesListByServer.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2021-12-01-preview/examples/LogFilesListByServer.json
*/
/**
* Sample code: List all server log files for a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListSamples.java
index 09ea68f131494..6c9412e341660 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/OperationsList.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/OperationsList.json
*/
/**
* Sample code: OperationList.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ReplicasListByServerSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ReplicasListByServerSamples.java
index 9133c1e2969d2..ae11afaf78b6f 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ReplicasListByServerSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ReplicasListByServerSamples.java
@@ -7,7 +7,7 @@
/** Samples for Replicas ListByServer. */
public final class ReplicasListByServerSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ReplicasListByServer.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ReplicasListByServer.json
*/
/**
* Sample code: List replicas for a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersCreateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersCreateSamples.java
index f59e3982b5b8a..3cbba0731a774 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersCreateSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersCreateSamples.java
@@ -27,7 +27,7 @@
/** Samples for Servers Create. */
public final class ServersCreateSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerCreateReplica.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreateReplica.json
*/
/**
* Sample code: Create a replica server.
@@ -47,7 +47,7 @@ public static void createAReplicaServer(com.azure.resourcemanager.mysqlflexibles
}
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerCreate.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreate.json
*/
/**
* Sample code: Create a new server.
@@ -75,7 +75,7 @@ public static void createANewServer(com.azure.resourcemanager.mysqlflexibleserve
}
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerCreateWithBYOK.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreateWithBYOK.json
*/
/**
* Sample code: Create a server with byok.
@@ -122,7 +122,7 @@ public static void createAServerWithByok(com.azure.resourcemanager.mysqlflexible
}
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerCreateWithPointInTimeRestore.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreateWithPointInTimeRestore.json
*/
/**
* Sample code: Create a server as a point in time restore.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteSamples.java
index db2ba7bc9ce1f..8b1976e48c45b 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Servers Delete. */
public final class ServersDeleteSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerDelete.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerDelete.json
*/
/**
* Sample code: Delete a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverSamples.java
index 7ff1fe7c410d7..e88d37df85c6e 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverSamples.java
@@ -7,7 +7,7 @@
/** Samples for Servers Failover. */
public final class ServersFailoverSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerFailover.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerFailover.json
*/
/**
* Sample code: Restart a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersGetByResourceGroupSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersGetByResourceGroupSamples.java
index e99794f1473ef..077beb7a1c2ab 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersGetByResourceGroupSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for Servers GetByResourceGroup. */
public final class ServersGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerGetWithVnet.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerGetWithVnet.json
*/
/**
* Sample code: Get a server with vnet.
@@ -19,7 +19,7 @@ public static void getAServerWithVnet(com.azure.resourcemanager.mysqlflexibleser
}
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerGet.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerGet.json
*/
/**
* Sample code: Get a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListByResourceGroupSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListByResourceGroupSamples.java
index 39d70321d3d78..e7681a57173fd 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListByResourceGroupSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for Servers ListByResourceGroup. */
public final class ServersListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServersListByResourceGroup.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServersListByResourceGroup.json
*/
/**
* Sample code: List servers in a resource group.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListSamples.java
index d5a0b358fd290..26654ceac75f4 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Servers List. */
public final class ServersListSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServersList.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServersList.json
*/
/**
* Sample code: List servers in a subscription.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidSamples.java
new file mode 100644
index 0000000000000..b9c14cb05698b
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidSamples.java
@@ -0,0 +1,28 @@
+// 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.generated;
+
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter;
+
+/** Samples for Servers ResetGtid. */
+public final class ServersResetGtidSamples {
+ /*
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerResetGtid.json
+ */
+ /**
+ * Sample code: Reset GTID on a server.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void resetGTIDOnAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager
+ .servers()
+ .resetGtid(
+ "TestGroup",
+ "testserver",
+ new ServerGtidSetParameter().withGtidSet("4aff5b51-97ba-11ed-a955-002248036acc:1-16"),
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartSamples.java
index 7a8970044e9c1..f2a73a6fd27fa 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartSamples.java
@@ -10,7 +10,7 @@
/** Samples for Servers Restart. */
public final class ServersRestartSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerRestart.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerRestart.json
*/
/**
* Sample code: Restart a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartSamples.java
index 6f385b62fc995..96d9bbee285f0 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartSamples.java
@@ -7,7 +7,7 @@
/** Samples for Servers Start. */
public final class ServersStartSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerStart.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerStart.json
*/
/**
* Sample code: Start a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopSamples.java
index f72ac6b3776b4..5ae8062333809 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopSamples.java
@@ -7,7 +7,7 @@
/** Samples for Servers Stop. */
public final class ServersStopSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerStop.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerStop.json
*/
/**
* Sample code: Stop a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersUpdateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersUpdateSamples.java
index 1e8eaf3bb9712..1bcbeeccb91bd 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersUpdateSamples.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersUpdateSamples.java
@@ -21,7 +21,7 @@
/** Samples for Servers Update. */
public final class ServersUpdateSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json
*/
/**
* Sample code: Update server customer maintenance window.
@@ -47,7 +47,7 @@ public static void updateServerCustomerMaintenanceWindow(
}
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerUpdateWithBYOK.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdateWithBYOK.json
*/
/**
* Sample code: Update server with byok.
@@ -85,7 +85,7 @@ public static void updateServerWithByok(com.azure.resourcemanager.mysqlflexibles
}
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2021-12-01-preview/examples/ServerUpdate.json
+ * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdate.json
*/
/**
* Sample code: Update a server.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorListResultTests.java
deleted file mode 100644
index a0cc7069c359d..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorListResultTests.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AzureADAdministratorInner;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorListResult;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdministratorListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdministratorListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"zxbzpfzabglc\",\"sid\":\"xwtctyqiklbbovpl\",\"tenantId\":\"bhvgy\",\"identityResourceId\":\"uosvmkfssxqukk\"},\"id\":\"l\",\"name\":\"mg\",\"type\":\"xnkjzkdesl\"},{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"wiyighxpkdw\",\"sid\":\"aiuebbaumnyqu\",\"tenantId\":\"deoj\",\"identityResourceId\":\"bckhsmtxpsi\"},\"id\":\"tfhvpesapskrdqmh\",\"name\":\"jdhtldwkyzxu\",\"type\":\"tkncwsc\"}],\"nextLink\":\"vlxotogtwrupqsx\"}")
- .toObject(AdministratorListResult.class);
- Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.value().get(0).administratorType());
- Assertions.assertEquals("zxbzpfzabglc", model.value().get(0).login());
- Assertions.assertEquals("xwtctyqiklbbovpl", model.value().get(0).sid());
- Assertions.assertEquals("bhvgy", model.value().get(0).tenantId());
- Assertions.assertEquals("uosvmkfssxqukk", model.value().get(0).identityResourceId());
- Assertions.assertEquals("vlxotogtwrupqsx", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdministratorListResult model =
- new AdministratorListResult()
- .withValue(
- Arrays
- .asList(
- new AzureADAdministratorInner()
- .withAdministratorType(AdministratorType.ACTIVE_DIRECTORY)
- .withLogin("zxbzpfzabglc")
- .withSid("xwtctyqiklbbovpl")
- .withTenantId("bhvgy")
- .withIdentityResourceId("uosvmkfssxqukk"),
- new AzureADAdministratorInner()
- .withAdministratorType(AdministratorType.ACTIVE_DIRECTORY)
- .withLogin("wiyighxpkdw")
- .withSid("aiuebbaumnyqu")
- .withTenantId("deoj")
- .withIdentityResourceId("bckhsmtxpsi")))
- .withNextLink("vlxotogtwrupqsx");
- model = BinaryData.fromObject(model).toObject(AdministratorListResult.class);
- Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.value().get(0).administratorType());
- Assertions.assertEquals("zxbzpfzabglc", model.value().get(0).login());
- Assertions.assertEquals("xwtctyqiklbbovpl", model.value().get(0).sid());
- Assertions.assertEquals("bhvgy", model.value().get(0).tenantId());
- Assertions.assertEquals("uosvmkfssxqukk", model.value().get(0).identityResourceId());
- Assertions.assertEquals("vlxotogtwrupqsx", model.nextLink());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorPropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorPropertiesTests.java
deleted file mode 100644
index b88b793612137..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorPropertiesTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdministratorProperties;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdministratorPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdministratorProperties model =
- BinaryData
- .fromString(
- "{\"administratorType\":\"ActiveDirectory\",\"login\":\"bhqwalmuzyoxa\",\"sid\":\"dkzjancuxrh\",\"tenantId\":\"bavxbniwdjswzt\",\"identityResourceId\":\"bpg\"}")
- .toObject(AdministratorProperties.class);
- Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.administratorType());
- Assertions.assertEquals("bhqwalmuzyoxa", model.login());
- Assertions.assertEquals("dkzjancuxrh", model.sid());
- Assertions.assertEquals("bavxbniwdjswzt", model.tenantId());
- Assertions.assertEquals("bpg", model.identityResourceId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdministratorProperties model =
- new AdministratorProperties()
- .withAdministratorType(AdministratorType.ACTIVE_DIRECTORY)
- .withLogin("bhqwalmuzyoxa")
- .withSid("dkzjancuxrh")
- .withTenantId("bavxbniwdjswzt")
- .withIdentityResourceId("bpg");
- model = BinaryData.fromObject(model).toObject(AdministratorProperties.class);
- Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.administratorType());
- Assertions.assertEquals("bhqwalmuzyoxa", model.login());
- Assertions.assertEquals("dkzjancuxrh", model.sid());
- Assertions.assertEquals("bavxbniwdjswzt", model.tenantId());
- Assertions.assertEquals("bpg", model.identityResourceId());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorInnerTests.java
deleted file mode 100644
index 4b9647625faa9..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorInnerTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AzureADAdministratorInner;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureADAdministratorInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureADAdministratorInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"qidybyx\",\"sid\":\"fclhaaxdbabphlwr\",\"tenantId\":\"fkts\",\"identityResourceId\":\"sucocmnyyazttbtw\"},\"id\":\"qpuedckzywbiex\",\"name\":\"fey\",\"type\":\"eaxib\"}")
- .toObject(AzureADAdministratorInner.class);
- Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.administratorType());
- Assertions.assertEquals("qidybyx", model.login());
- Assertions.assertEquals("fclhaaxdbabphlwr", model.sid());
- Assertions.assertEquals("fkts", model.tenantId());
- Assertions.assertEquals("sucocmnyyazttbtw", model.identityResourceId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureADAdministratorInner model =
- new AzureADAdministratorInner()
- .withAdministratorType(AdministratorType.ACTIVE_DIRECTORY)
- .withLogin("qidybyx")
- .withSid("fclhaaxdbabphlwr")
- .withTenantId("fkts")
- .withIdentityResourceId("sucocmnyyazttbtw");
- model = BinaryData.fromObject(model).toObject(AzureADAdministratorInner.class);
- Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.administratorType());
- Assertions.assertEquals("qidybyx", model.login());
- Assertions.assertEquals("fclhaaxdbabphlwr", model.sid());
- Assertions.assertEquals("fkts", model.tenantId());
- Assertions.assertEquals("sucocmnyyazttbtw", model.identityResourceId());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateMockTests.java
deleted file mode 100644
index d7895baf97774..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrator;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AzureADAdministratorsCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"ubpaxhe\",\"sid\":\"i\",\"tenantId\":\"vpdtiirqtdqoa\",\"identityResourceId\":\"r\"},\"id\":\"fgsqu\",\"name\":\"fxrxxle\",\"type\":\"tramxjez\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AzureADAdministrator response =
- manager
- .azureADAdministrators()
- .define(AdministratorName.ACTIVE_DIRECTORY)
- .withExistingFlexibleServer("cqqudf", "byxbaaabjy")
- .withAdministratorType(AdministratorType.ACTIVE_DIRECTORY)
- .withLogin("m")
- .withSid("rtuzqogs")
- .withTenantId("nevfdnw")
- .withIdentityResourceId("mewzsyyc")
- .create();
-
- Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, response.administratorType());
- Assertions.assertEquals("ubpaxhe", response.login());
- Assertions.assertEquals("i", response.sid());
- Assertions.assertEquals("vpdtiirqtdqoa", response.tenantId());
- Assertions.assertEquals("r", response.identityResourceId());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteMockTests.java
deleted file mode 100644
index fc30c9573ec75..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AzureADAdministratorsDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .azureADAdministrators()
- .delete("wneaiv", "wczelpci", AdministratorName.ACTIVE_DIRECTORY, com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetWithResponseMockTests.java
deleted file mode 100644
index 8327523807bba..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrator;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AzureADAdministratorsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"rvxaglrvimjwosy\",\"sid\":\"itc\",\"tenantId\":\"fcktqumiekke\",\"identityResourceId\":\"ikh\"},\"id\":\"fjhdg\",\"name\":\"gge\",\"type\":\"dunyg\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AzureADAdministrator response =
- manager
- .azureADAdministrators()
- .getWithResponse(
- "lsfeaenwabfatkld",
- "xbjhwuaanozjosph",
- AdministratorName.ACTIVE_DIRECTORY,
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, response.administratorType());
- Assertions.assertEquals("rvxaglrvimjwosy", response.login());
- Assertions.assertEquals("itc", response.sid());
- Assertions.assertEquals("fcktqumiekke", response.tenantId());
- Assertions.assertEquals("ikh", response.identityResourceId());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerMockTests.java
deleted file mode 100644
index cad08d5c96cfa..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
-import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrator;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AzureADAdministratorsListByServerMockTests {
- @Test
- public void testListByServer() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"oadsuvar\",\"sid\":\"wdmjsjqbjhhyx\",\"tenantId\":\"wlycoduhpkxkg\",\"identityResourceId\":\"areqna\"},\"id\":\"qugjhkycube\",\"name\":\"dgssofwqmzqal\",\"type\":\"rmnjijpx\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.azureADAdministrators().listByServer("eqidbqfatpx", "lr", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, response.iterator().next().administratorType());
- Assertions.assertEquals("oadsuvar", response.iterator().next().login());
- Assertions.assertEquals("wdmjsjqbjhhyx", response.iterator().next().sid());
- Assertions.assertEquals("wlycoduhpkxkg", response.iterator().next().tenantId());
- Assertions.assertEquals("areqna", response.iterator().next().identityResourceId());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupTests.java
deleted file mode 100644
index bef1740f862b0..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.models.Backup;
-import com.azure.resourcemanager.mysqlflexibleserver.models.EnableStatusEnum;
-import org.junit.jupiter.api.Assertions;
-
-public final class BackupTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Backup model =
- BinaryData
- .fromString(
- "{\"backupRetentionDays\":969861111,\"geoRedundantBackup\":\"Enabled\",\"earliestRestoreDate\":\"2021-01-31T18:34:57Z\"}")
- .toObject(Backup.class);
- Assertions.assertEquals(969861111, model.backupRetentionDays());
- Assertions.assertEquals(EnableStatusEnum.ENABLED, model.geoRedundantBackup());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Backup model = new Backup().withBackupRetentionDays(969861111).withGeoRedundantBackup(EnableStatusEnum.ENABLED);
- model = BinaryData.fromObject(model).toObject(Backup.class);
- Assertions.assertEquals(969861111, model.backupRetentionDays());
- Assertions.assertEquals(EnableStatusEnum.ENABLED, model.geoRedundantBackup());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetWithResponseMockTests.java
deleted file mode 100644
index efdf94dc04875..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackup;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"backupType\":\"xtccmg\",\"completedTime\":\"2021-02-11T06:40:02Z\",\"source\":\"ytlmoyrxvwfud\"},\"id\":\"zntxhdz\",\"name\":\"lrqjbhckfr\",\"type\":\"hrxsbk\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ServerBackup response =
- manager
- .backups()
- .getWithResponse("tazqugxywpmueefj", "wfqkquj", "dsuyonobgla", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("xtccmg", response.backupType());
- Assertions.assertEquals(OffsetDateTime.parse("2021-02-11T06:40:02Z"), response.completedTime());
- Assertions.assertEquals("ytlmoyrxvwfud", response.source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerMockTests.java
deleted file mode 100644
index f92baf769d35e..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackup;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupsListByServerMockTests {
- @Test
- public void testListByServer() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"backupType\":\"seyvj\",\"completedTime\":\"2021-09-13T12:12:28Z\",\"source\":\"slhs\"},\"id\":\"deemao\",\"name\":\"mx\",\"type\":\"gkvtmelmqkrhah\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.backups().listByServer("vpycanuzbp", "kafkuwbcrnwbm", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("seyvj", response.iterator().next().backupType());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-09-13T12:12:28Z"), response.iterator().next().completedTime());
- Assertions.assertEquals("slhs", response.iterator().next().source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutWithResponseMockTests.java
deleted file mode 100644
index 8bb5728fc220b..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutWithResponseMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackup;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupsPutWithResponseMockTests {
- @Test
- public void testPutWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"backupType\":\"nxdhbt\",\"completedTime\":\"2020-12-23T07:25:08Z\",\"source\":\"ywpnvjt\"},\"id\":\"nermcl\",\"name\":\"plpho\",\"type\":\"uscrpabgyepsb\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ServerBackup response =
- manager
- .backups()
- .putWithResponse("nmic", "kvceoveilovnotyf", "fcnj", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("nxdhbt", response.backupType());
- Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T07:25:08Z"), response.completedTime());
- Assertions.assertEquals("ywpnvjt", response.source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilitiesListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilitiesListResultTests.java
deleted file mode 100644
index c584835beb56e..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilitiesListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.models.CapabilitiesListResult;
-
-public final class CapabilitiesListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CapabilitiesListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"zone\":\"wxrjfeallnwsub\",\"supportedHAMode\":[\"jampmngnzscxaqw\",\"ochcbonqvpkvl\"],\"supportedGeoBackupRegions\":[\"jease\",\"pheoflokeyy\",\"enjbdlwtgrhp\",\"jp\"],\"supportedFlexibleServerEditions\":[]}],\"nextLink\":\"sxazjpq\"}")
- .toObject(CapabilitiesListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CapabilitiesListResult model = new CapabilitiesListResult();
- model = BinaryData.fromObject(model).toObject(CapabilitiesListResult.class);
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityPropertiesInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityPropertiesInnerTests.java
deleted file mode 100644
index 4c83c08768b71..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityPropertiesInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityPropertiesInner;
-
-public final class CapabilityPropertiesInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CapabilityPropertiesInner model =
- BinaryData
- .fromString(
- "{\"zone\":\"gual\",\"supportedHAMode\":[\"xhejjzzvdud\",\"wdslfhotwmcy\",\"pwlbjnpg\"],\"supportedGeoBackupRegions\":[\"tadehxnltyfsopp\",\"suesnzw\",\"ej\",\"avo\"],\"supportedFlexibleServerEditions\":[{\"name\":\"mohctb\",\"supportedStorageEditions\":[],\"supportedServerVersions\":[]},{\"name\":\"dndnvow\",\"supportedStorageEditions\":[],\"supportedServerVersions\":[]},{\"name\":\"wdkcglhsl\",\"supportedStorageEditions\":[],\"supportedServerVersions\":[]}]}")
- .toObject(CapabilityPropertiesInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CapabilityPropertiesInner model = new CapabilityPropertiesInner();
- model = BinaryData.fromObject(model).toObject(CapabilityPropertiesInner.class);
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java
deleted file mode 100644
index bd27e5a7e5ed0..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailability;
-import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailabilityRequest;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CheckNameAvailabilitiesExecuteWithResponseMockTests {
- @Test
- public void testExecuteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"message\":\"crkvcikhnv\",\"nameAvailable\":false,\"reason\":\"gxqquezik\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- NameAvailability response =
- manager
- .checkNameAvailabilities()
- .executeWithResponse(
- "ncvokotllxdyhg",
- new NameAvailabilityRequest().withName("y").withType("ogjltdtbnnhad"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("crkvcikhnv", response.message());
- Assertions.assertEquals(false, response.nameAvailable());
- Assertions.assertEquals("gxqquezik", response.reason());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationsExecuteWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationsExecuteWithResponseMockTests.java
deleted file mode 100644
index 0cffb43a8c45d..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationsExecuteWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailability;
-import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailabilityRequest;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CheckNameAvailabilityWithoutLocationsExecuteWithResponseMockTests {
- @Test
- public void testExecuteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"message\":\"cjzkzivgvvcna\",\"nameAvailable\":false,\"reason\":\"rnxxmueed\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- NameAvailability response =
- manager
- .checkNameAvailabilityWithoutLocations()
- .executeWithResponse(
- new NameAvailabilityRequest().withName("wggxkallat").withType("lwuip"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("cjzkzivgvvcna", response.message());
- Assertions.assertEquals(false, response.nameAvailable());
- Assertions.assertEquals("rnxxmueed", response.reason());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java
deleted file mode 100644
index 4266ae0b71412..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.VirtualNetworkSubnetUsageParameter;
-import com.azure.resourcemanager.mysqlflexibleserver.models.VirtualNetworkSubnetUsageResult;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CheckVirtualNetworkSubnetUsagesExecuteWithResponseMockTests {
- @Test
- public void testExecuteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"location\":\"ypyynpcdpumnzg\",\"subscriptionId\":\"z\",\"delegatedSubnetsUsage\":[{\"subnetName\":\"iknsorgjh\",\"usage\":7538220819901034139},{\"subnetName\":\"lwwrl\",\"usage\":214616296495894801}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- VirtualNetworkSubnetUsageResult response =
- manager
- .checkVirtualNetworkSubnetUsages()
- .executeWithResponse(
- "ynkedyatrwyhqmib",
- new VirtualNetworkSubnetUsageParameter().withVirtualNetworkResourceId("hwit"),
- com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdatePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdatePropertiesTests.java
deleted file mode 100644
index 4ff531d1f70fe..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdatePropertiesTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationForBatchUpdateProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConfigurationForBatchUpdatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConfigurationForBatchUpdateProperties model =
- BinaryData
- .fromString("{\"value\":\"ipjoxzjnchgejs\",\"source\":\"dmailzydehojw\"}")
- .toObject(ConfigurationForBatchUpdateProperties.class);
- Assertions.assertEquals("ipjoxzjnchgejs", model.value());
- Assertions.assertEquals("dmailzydehojw", model.source());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConfigurationForBatchUpdateProperties model =
- new ConfigurationForBatchUpdateProperties().withValue("ipjoxzjnchgejs").withSource("dmailzydehojw");
- model = BinaryData.fromObject(model).toObject(ConfigurationForBatchUpdateProperties.class);
- Assertions.assertEquals("ipjoxzjnchgejs", model.value());
- Assertions.assertEquals("dmailzydehojw", model.source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdateTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdateTests.java
deleted file mode 100644
index 922bcef56c2a1..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdateTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationForBatchUpdate;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConfigurationForBatchUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConfigurationForBatchUpdate model =
- BinaryData
- .fromString("{\"name\":\"hkryhtn\",\"properties\":{\"value\":\"zw\",\"source\":\"kjyemkk\"}}")
- .toObject(ConfigurationForBatchUpdate.class);
- Assertions.assertEquals("hkryhtn", model.name());
- Assertions.assertEquals("zw", model.value());
- Assertions.assertEquals("kjyemkk", model.source());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConfigurationForBatchUpdate model =
- new ConfigurationForBatchUpdate().withName("hkryhtn").withValue("zw").withSource("kjyemkk");
- model = BinaryData.fromObject(model).toObject(ConfigurationForBatchUpdate.class);
- Assertions.assertEquals("hkryhtn", model.name());
- Assertions.assertEquals("zw", model.value());
- Assertions.assertEquals("kjyemkk", model.source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationInnerTests.java
deleted file mode 100644
index a632c02cb8184..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationInnerTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConfigurationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConfigurationInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"value\":\"ouajpsqucmpoyf\",\"description\":\"fogknygjofjdde\",\"defaultValue\":\"rd\",\"dataType\":\"pewnw\",\"allowedValues\":\"itjz\",\"source\":\"system-default\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"True\"},\"id\":\"fcqhsmyurkd\",\"name\":\"mlxhekuksjtxukcd\",\"type\":\"parcry\"}")
- .toObject(ConfigurationInner.class);
- Assertions.assertEquals("ouajpsqucmpoyf", model.value());
- Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.source());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConfigurationInner model =
- new ConfigurationInner().withValue("ouajpsqucmpoyf").withSource(ConfigurationSource.SYSTEM_DEFAULT);
- model = BinaryData.fromObject(model).toObject(ConfigurationInner.class);
- Assertions.assertEquals("ouajpsqucmpoyf", model.value());
- Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListForBatchUpdateTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListForBatchUpdateTests.java
deleted file mode 100644
index 8be2b1bb3c8c6..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListForBatchUpdateTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationForBatchUpdate;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationListForBatchUpdate;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ResetAllToDefault;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConfigurationListForBatchUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConfigurationListForBatchUpdate model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"hanufhfcbjysagi\",\"properties\":{\"value\":\"qhabifpikxwcz\",\"source\":\"scnpqxuhivy\"}},{\"name\":\"iwbybrkxvdumjg\",\"properties\":{\"value\":\"wvukx\",\"source\":\"udccsnhsjc\"}}],\"resetAllToDefault\":\"True\"}")
- .toObject(ConfigurationListForBatchUpdate.class);
- Assertions.assertEquals("hanufhfcbjysagi", model.value().get(0).name());
- Assertions.assertEquals("qhabifpikxwcz", model.value().get(0).value());
- Assertions.assertEquals("scnpqxuhivy", model.value().get(0).source());
- Assertions.assertEquals(ResetAllToDefault.TRUE, model.resetAllToDefault());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConfigurationListForBatchUpdate model =
- new ConfigurationListForBatchUpdate()
- .withValue(
- Arrays
- .asList(
- new ConfigurationForBatchUpdate()
- .withName("hanufhfcbjysagi")
- .withValue("qhabifpikxwcz")
- .withSource("scnpqxuhivy"),
- new ConfigurationForBatchUpdate()
- .withName("iwbybrkxvdumjg")
- .withValue("wvukx")
- .withSource("udccsnhsjc")))
- .withResetAllToDefault(ResetAllToDefault.TRUE);
- model = BinaryData.fromObject(model).toObject(ConfigurationListForBatchUpdate.class);
- Assertions.assertEquals("hanufhfcbjysagi", model.value().get(0).name());
- Assertions.assertEquals("qhabifpikxwcz", model.value().get(0).value());
- Assertions.assertEquals("scnpqxuhivy", model.value().get(0).source());
- Assertions.assertEquals(ResetAllToDefault.TRUE, model.resetAllToDefault());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListResultInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListResultInnerTests.java
deleted file mode 100644
index b18a9d02774e9..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListResultInnerTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationListResultInner;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConfigurationListResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConfigurationListResultInner model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"value\":\"inpm\",\"description\":\"jaqwixjsp\",\"defaultValue\":\"zvcputegjvwmfda\",\"dataType\":\"cmdv\",\"allowedValues\":\"hulsuuvmkjozkrwf\",\"source\":\"system-default\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"False\",\"isDynamicConfig\":\"True\"},\"id\":\"ej\",\"name\":\"pvwryoqpsoacc\",\"type\":\"azakl\"},{\"properties\":{\"value\":\"hbcryffdfdosyge\",\"description\":\"aojakhmsbzjhcrz\",\"defaultValue\":\"dphlxaolt\",\"dataType\":\"trg\",\"allowedValues\":\"bpf\",\"source\":\"system-default\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"True\"},\"id\":\"jrwzox\",\"name\":\"j\",\"type\":\"felluwfzitonpe\"},{\"properties\":{\"value\":\"jkjlxofpdvhpfx\",\"description\":\"pini\",\"defaultValue\":\"ayhuy\",\"dataType\":\"kpode\",\"allowedValues\":\"oginuvamiheognar\",\"source\":\"system-default\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"True\"},\"id\":\"ivyevcciqihnhun\",\"name\":\"bwjzr\",\"type\":\"fygxgispemvtzfk\"}],\"nextLink\":\"ubljofxqe\"}")
- .toObject(ConfigurationListResultInner.class);
- Assertions.assertEquals("inpm", model.value().get(0).value());
- Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.value().get(0).source());
- Assertions.assertEquals("ubljofxqe", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConfigurationListResultInner model =
- new ConfigurationListResultInner()
- .withValue(
- Arrays
- .asList(
- new ConfigurationInner().withValue("inpm").withSource(ConfigurationSource.SYSTEM_DEFAULT),
- new ConfigurationInner()
- .withValue("hbcryffdfdosyge")
- .withSource(ConfigurationSource.SYSTEM_DEFAULT),
- new ConfigurationInner()
- .withValue("jkjlxofpdvhpfx")
- .withSource(ConfigurationSource.SYSTEM_DEFAULT)))
- .withNextLink("ubljofxqe");
- model = BinaryData.fromObject(model).toObject(ConfigurationListResultInner.class);
- Assertions.assertEquals("inpm", model.value().get(0).value());
- Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.value().get(0).source());
- Assertions.assertEquals("ubljofxqe", model.nextLink());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationPropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationPropertiesTests.java
deleted file mode 100644
index eadf54f62ee3b..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationPropertiesTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationProperties;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConfigurationPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConfigurationProperties model =
- BinaryData
- .fromString(
- "{\"value\":\"nzwuxzd\",\"description\":\"a\",\"defaultValue\":\"lhmwhfpmrqobm\",\"dataType\":\"kknryrtihf\",\"allowedValues\":\"ijbpzvgnwzsymgl\",\"source\":\"user-override\",\"isReadOnly\":\"False\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"True\"}")
- .toObject(ConfigurationProperties.class);
- Assertions.assertEquals("nzwuxzd", model.value());
- Assertions.assertEquals(ConfigurationSource.USER_OVERRIDE, model.source());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConfigurationProperties model =
- new ConfigurationProperties().withValue("nzwuxzd").withSource(ConfigurationSource.USER_OVERRIDE);
- model = BinaryData.fromObject(model).toObject(ConfigurationProperties.class);
- Assertions.assertEquals("nzwuxzd", model.value());
- Assertions.assertEquals(ConfigurationSource.USER_OVERRIDE, model.source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateMockTests.java
deleted file mode 100644
index 1f271f6a5009f..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateMockTests.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationForBatchUpdate;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationListForBatchUpdate;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationListResult;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ResetAllToDefault;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ConfigurationsBatchUpdateMockTests {
- @Test
- public void testBatchUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"id\":\"ah\",\"name\":\"pjyzhpv\",\"type\":\"qzcjrvxdj\"}],\"nextLink\":\"mwlxk\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ConfigurationListResult response =
- manager
- .configurations()
- .batchUpdate(
- "mtsavjcbpwxqp",
- "rknftguvriuhprwm",
- new ConfigurationListForBatchUpdate()
- .withValue(
- Arrays
- .asList(
- new ConfigurationForBatchUpdate().withName("qtayri"),
- new ConfigurationForBatchUpdate().withName("oyq"),
- new ConfigurationForBatchUpdate().withName("rmcqiby"),
- new ConfigurationForBatchUpdate().withName("jvkn")))
- .withResetAllToDefault(ResetAllToDefault.FALSE),
- com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("mwlxk", response.nextLink());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java
deleted file mode 100644
index 5a7ebffa6221c..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.Configuration;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ConfigurationsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"value\":\"zqlveualupjmkhf\",\"description\":\"bbcswsrtjri\",\"defaultValue\":\"rbpbewtghfgblcg\",\"dataType\":\"zvlvqhjkbegib\",\"allowedValues\":\"mxiebw\",\"source\":\"system-default\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"True\"},\"id\":\"rtzju\",\"name\":\"gwyzm\",\"type\":\"txon\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Configuration response =
- manager
- .configurations()
- .getWithResponse("l", "zbtd", "xujznbmpowu", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("zqlveualupjmkhf", response.value());
- Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, response.source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerMockTests.java
deleted file mode 100644
index 9b0042e98c940..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.Configuration;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ConfigurationsListByServerMockTests {
- @Test
- public void testListByServer() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"value\":\"jzuaejxdultskzbb\",\"description\":\"zumveekgpwo\",\"defaultValue\":\"hkfpbs\",\"dataType\":\"ofd\",\"allowedValues\":\"uusdttouwa\",\"source\":\"system-default\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"False\",\"isDynamicConfig\":\"True\"},\"id\":\"smv\",\"name\":\"xwyjsflhhc\",\"type\":\"aln\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .configurations()
- .listByServer(
- "ug", "hzovawjvzunlut", "nnprn", "i", 1099728143, 1381337865, com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("jzuaejxdultskzbb", response.iterator().next().value());
- Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, response.iterator().next().source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsUpdateMockTests.java
deleted file mode 100644
index 2c4e43337f4c8..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsUpdateMockTests.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner;
-import com.azure.resourcemanager.mysqlflexibleserver.models.Configuration;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ConfigurationsUpdateMockTests {
- @Test
- public void testUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"value\":\"bvmeuecivy\",\"description\":\"ce\",\"defaultValue\":\"jgjrwjueiotwm\",\"dataType\":\"ytdxwit\",\"allowedValues\":\"rjaw\",\"source\":\"system-default\",\"isReadOnly\":\"False\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"True\"},\"id\":\"x\",\"name\":\"bkpyc\",\"type\":\"klwndnhjdauwhv\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- MySqlManager manager =
- MySqlManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Configuration response =
- manager
- .configurations()
- .update(
- "ljuahaquhcdh",
- "duala",
- "xqpvfadmw",
- new ConfigurationInner().withValue("r").withSource(ConfigurationSource.SYSTEM_DEFAULT),
- com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("bvmeuecivy", response.value());
- Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, response.source());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseInnerTests.java
deleted file mode 100644
index f8d24e2c36060..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseInnerTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.DatabaseInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatabaseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DatabaseInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"charset\":\"aeqjhqjbasvms\",\"collation\":\"qulngsntnbybkzgc\"},\"id\":\"wclxxwrl\",\"name\":\"douskcqvkocrcjdk\",\"type\":\"tnhxbn\"}")
- .toObject(DatabaseInner.class);
- Assertions.assertEquals("aeqjhqjbasvms", model.charset());
- Assertions.assertEquals("qulngsntnbybkzgc", model.collation());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DatabaseInner model = new DatabaseInner().withCharset("aeqjhqjbasvms").withCollation("qulngsntnbybkzgc");
- model = BinaryData.fromObject(model).toObject(DatabaseInner.class);
- Assertions.assertEquals("aeqjhqjbasvms", model.charset());
- Assertions.assertEquals("qulngsntnbybkzgc", model.collation());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseListResultTests.java
deleted file mode 100644
index df5cba50a20e6..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseListResultTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.DatabaseInner;
-import com.azure.resourcemanager.mysqlflexibleserver.models.DatabaseListResult;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatabaseListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DatabaseListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"charset\":\"eebvmgxsab\",\"collation\":\"qduujitcjczdz\"},\"id\":\"ndhkrw\",\"name\":\"d\",\"type\":\"ppdsbdkvwrwj\"},{\"properties\":{\"charset\":\"snhu\",\"collation\":\"eltmrldhugjzzdat\"},\"id\":\"hocdgeab\",\"name\":\"gphuticndvka\",\"type\":\"zwyiftyhxhur\"},{\"properties\":{\"charset\":\"tyxolniwpwc\",\"collation\":\"jfkgiawxk\"},\"id\":\"ypl\",\"name\":\"ckbasyypndd\",\"type\":\"sgcbac\"}],\"nextLink\":\"ejk\"}")
- .toObject(DatabaseListResult.class);
- Assertions.assertEquals("eebvmgxsab", model.value().get(0).charset());
- Assertions.assertEquals("qduujitcjczdz", model.value().get(0).collation());
- Assertions.assertEquals("ejk", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DatabaseListResult model =
- new DatabaseListResult()
- .withValue(
- Arrays
- .asList(
- new DatabaseInner().withCharset("eebvmgxsab").withCollation("qduujitcjczdz"),
- new DatabaseInner().withCharset("snhu").withCollation("eltmrldhugjzzdat"),
- new DatabaseInner().withCharset("tyxolniwpwc").withCollation("jfkgiawxk")))
- .withNextLink("ejk");
- model = BinaryData.fromObject(model).toObject(DatabaseListResult.class);
- Assertions.assertEquals("eebvmgxsab", model.value().get(0).charset());
- Assertions.assertEquals("qduujitcjczdz", model.value().get(0).collation());
- Assertions.assertEquals("ejk", model.nextLink());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasePropertiesTests.java
deleted file mode 100644
index 26c12f112842e..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasePropertiesTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.DatabaseProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatabasePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DatabaseProperties model =
- BinaryData
- .fromString("{\"charset\":\"iksqr\",\"collation\":\"ssainqpjwnzll\"}")
- .toObject(DatabaseProperties.class);
- Assertions.assertEquals("iksqr", model.charset());
- Assertions.assertEquals("ssainqpjwnzll", model.collation());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DatabaseProperties model = new DatabaseProperties().withCharset("iksqr").withCollation("ssainqpjwnzll");
- model = BinaryData.fromObject(model).toObject(DatabaseProperties.class);
- Assertions.assertEquals("iksqr", model.charset());
- Assertions.assertEquals("ssainqpjwnzll", model.collation());
- }
-}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateMockTests.java
deleted file mode 100644
index 649e7c45e83f6..0000000000000
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager;
-import com.azure.resourcemanager.mysqlflexibleserver.models.Database;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DatabasesCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor