diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/ISqlManagementClient.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/ISqlManagementClient.cs
new file mode 100644
index 000000000000..c5446b3cda5f
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/ISqlManagementClient.cs
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// The Azure SQL Database management API provides a RESTful set of web APIs
+ /// that interact with Azure SQL Database services to manage your databases.
+ /// The API enables users to create, retrieve, update, and delete databases,
+ /// servers, and other entities.
+ ///
+ public partial interface ISqlManagementClient : System.IDisposable
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ Microsoft.Rest.ServiceClientCredentials Credentials { get;}
+
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ string ApiVersion { get;}
+
+
+ ///
+ /// The subscription ID that identifies an Azure subscription.
+ ///
+ string SubscriptionId { get; set;}
+
+
+ ///
+ /// The preferred language for the response.
+ ///
+ string AcceptLanguage { get; set;}
+
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// /// value is 30.
+ ///
+ int? LongRunningOperationRetryTimeout { get; set;}
+
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// /// set to true a unique x-ms-client-request-id value is generated and
+ /// /// included in each request. Default is true.
+ ///
+ bool? GenerateClientRequestId { get; set;}
+
+
+ ///
+ /// Gets the ISyncGroupsOperations
+ ///
+ ISyncGroupsOperations SyncGroups { get; }
+
+ ///
+ /// Gets the ISyncMembersOperations
+ ///
+ ISyncMembersOperations SyncMembers { get; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/ISyncGroupsOperations.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/ISyncGroupsOperations.cs
new file mode 100644
index 000000000000..b9d0328c9ad9
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/ISyncGroupsOperations.cs
@@ -0,0 +1,597 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// SyncGroupsOperations operations.
+ ///
+ public partial interface ISyncGroupsOperations
+ {
+ ///
+ /// Gets a collection of sync database ids.
+ ///
+ ///
+ /// Gets a collection of sync database ids.
+ ///
+ ///
+ /// The name of the region where the resource is located.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListSyncDatabaseIdsWithHttpMessagesAsync(string locationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists sync groups under a hub database.
+ ///
+ ///
+ /// Lists sync groups under a hub database.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a sync group.
+ ///
+ ///
+ /// Gets a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Deletes a sync group.
+ ///
+ ///
+ /// Deletes a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Updates a sync group.
+ ///
+ ///
+ /// Updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Cancels a sync group synchronization.
+ ///
+ ///
+ /// Cancels a sync group synchronization.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task CancelSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a collection of hub database schemas.
+ ///
+ ///
+ /// Gets a collection of hub database schemas.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListHubSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a collection of sync group logs.
+ ///
+ ///
+ /// Gets a collection of sync group logs.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Get logs generated after this time.
+ ///
+ ///
+ /// Get logs generated before this time.
+ ///
+ ///
+ /// The types of logs to retrieve.
+ ///
+ ///
+ /// The continuation token for this operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListLogsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Refreshes a hub database schema.
+ ///
+ ///
+ /// Refreshes a hub database schema.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> RefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Triggers a sync group synchronization.
+ ///
+ ///
+ /// Triggers a sync group synchronization.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task TriggerSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Deletes a sync group.
+ ///
+ ///
+ /// Deletes a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Updates a sync group.
+ ///
+ ///
+ /// Updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Refreshes a hub database schema.
+ ///
+ ///
+ /// Refreshes a hub database schema.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> BeginRefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a collection of sync database ids.
+ ///
+ ///
+ /// Gets a collection of sync database ids.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListSyncDatabaseIdsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists sync groups under a hub database.
+ ///
+ ///
+ /// Lists sync groups under a hub database.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a collection of hub database schemas.
+ ///
+ ///
+ /// Gets a collection of hub database schemas.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListHubSchemasNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a collection of sync group logs.
+ ///
+ ///
+ /// Gets a collection of sync group logs.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListLogsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/ISyncMembersOperations.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/ISyncMembersOperations.cs
new file mode 100644
index 000000000000..3c8b0988873a
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/ISyncMembersOperations.cs
@@ -0,0 +1,456 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// SyncMembersOperations operations.
+ ///
+ public partial interface ISyncMembersOperations
+ {
+ ///
+ /// Lists sync members in the given sync group.
+ ///
+ ///
+ /// Lists sync members in the given sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a sync member.
+ ///
+ ///
+ /// Gets a sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Creates or updates a sync member.
+ ///
+ ///
+ /// Creates or updates a sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The requested sync member resource state.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Deletes a sync member.
+ ///
+ ///
+ /// Deletes a sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Updates an existing sync member.
+ ///
+ ///
+ /// Updates an existing sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The requested sync member resource state.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Refreshes a sync member database schema.
+ ///
+ ///
+ /// Refreshes a sync member database schema.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> RefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a sync member database schema.
+ ///
+ ///
+ /// Gets a sync member database schema.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListMemberSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Creates or updates a sync member.
+ ///
+ ///
+ /// Creates or updates a sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The requested sync member resource state.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Deletes a sync member.
+ ///
+ ///
+ /// Deletes a sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Updates an existing sync member.
+ ///
+ ///
+ /// Updates an existing sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The requested sync member resource state.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Refreshes a sync member database schema.
+ ///
+ ///
+ /// Refreshes a sync member database schema.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> BeginRefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists sync members in the given sync group.
+ ///
+ ///
+ /// Lists sync members in the given sync group.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListBySyncGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a sync member database schema.
+ ///
+ ///
+ /// Gets a sync member database schema.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListMemberSchemasNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/DataSyncParticipantIdentity.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/DataSyncParticipantIdentity.cs
new file mode 100644
index 000000000000..f9d37ae345a4
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/DataSyncParticipantIdentity.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Azure Active Directory identity configuration for a resource.
+ ///
+ public partial class DataSyncParticipantIdentity
+ {
+ ///
+ /// Initializes a new instance of the DataSyncParticipantIdentity class.
+ ///
+ public DataSyncParticipantIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DataSyncParticipantIdentity class.
+ ///
+
+ /// The Datasync identity type
+ /// Possible values include: 'None', 'SystemAssigned', 'UserAssigned',
+ /// 'SystemAssignedUserAssigned'
+
+ /// The DataSync participant identity tenant id
+ ///
+
+ /// The resource ids of the user assigned identities to use
+ ///
+ public DataSyncParticipantIdentity(string type, System.Guid? tenantId = default(System.Guid?), System.Collections.Generic.IDictionary userAssignedIdentities = default(System.Collections.Generic.IDictionary))
+
+ {
+ this.Type = type;
+ this.TenantId = tenantId;
+ this.UserAssignedIdentities = userAssignedIdentities;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets the Datasync identity type Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "type")]
+ public string Type {get; set; }
+
+ ///
+ /// Gets or sets the DataSync participant identity tenant id
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")]
+ public System.Guid? TenantId {get; set; }
+
+ ///
+ /// Gets or sets the resource ids of the user assigned identities to use
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentities")]
+ public System.Collections.Generic.IDictionary UserAssignedIdentities {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Type == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Type");
+ }
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/DataSyncParticipantIdentityType.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/DataSyncParticipantIdentityType.cs
new file mode 100644
index 000000000000..8eea30847101
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/DataSyncParticipantIdentityType.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Defines values for DataSyncParticipantIdentityType.
+ ///
+
+
+ public static class DataSyncParticipantIdentityType
+ {
+ public const string None = "None";
+ public const string SystemAssigned = "SystemAssigned";
+ public const string UserAssigned = "UserAssigned";
+ public const string SystemAssignedUserAssigned = "SystemAssignedUserAssigned";
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/DataSyncParticipantUserAssignedIdentity.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/DataSyncParticipantUserAssignedIdentity.cs
new file mode 100644
index 000000000000..e44fa3f2974f
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/DataSyncParticipantUserAssignedIdentity.cs
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Azure Active Directory identity configuration for a resource.
+ ///
+ public partial class DataSyncParticipantUserAssignedIdentity
+ {
+ ///
+ /// Initializes a new instance of the DataSyncParticipantUserAssignedIdentity class.
+ ///
+ public DataSyncParticipantUserAssignedIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DataSyncParticipantUserAssignedIdentity class.
+ ///
+
+ /// The Azure Active Directory principal id.
+ ///
+
+ /// The Azure Active Directory client id.
+ ///
+ public DataSyncParticipantUserAssignedIdentity(System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?))
+
+ {
+ this.PrincipalId = principalId;
+ this.ClientId = clientId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets the Azure Active Directory principal id.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")]
+ public System.Guid? PrincipalId {get; private set; }
+
+ ///
+ /// Gets the Azure Active Directory client id.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "clientId")]
+ public System.Guid? ClientId {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorAdditionalInfo.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorAdditionalInfo.cs
new file mode 100644
index 000000000000..4bbedcd7bf60
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorAdditionalInfo.cs
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// The resource management error additional info.
+ ///
+ public partial class ErrorAdditionalInfo
+ {
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ public ErrorAdditionalInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+
+ /// The additional info type.
+ ///
+
+ /// The additional info.
+ ///
+ public ErrorAdditionalInfo(string type = default(string), object info = default(object))
+
+ {
+ this.Type = type;
+ this.Info = info;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets the additional info type.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "type")]
+ public string Type {get; private set; }
+
+ ///
+ /// Gets the additional info.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "info")]
+ public object Info {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorDetail.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorDetail.cs
new file mode 100644
index 000000000000..18378326ce24
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorDetail.cs
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// The error detail.
+ ///
+ public partial class ErrorDetail
+ {
+ ///
+ /// Initializes a new instance of the ErrorDetail class.
+ ///
+ public ErrorDetail()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorDetail class.
+ ///
+
+ /// The error code.
+ ///
+
+ /// The error message.
+ ///
+
+ /// The error target.
+ ///
+
+ /// The error details.
+ ///
+
+ /// The error additional info.
+ ///
+ public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList), System.Collections.Generic.IList additionalInfo = default(System.Collections.Generic.IList))
+
+ {
+ this.Code = code;
+ this.Message = message;
+ this.Target = target;
+ this.Details = details;
+ this.AdditionalInfo = additionalInfo;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets the error code.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "code")]
+ public string Code {get; private set; }
+
+ ///
+ /// Gets the error message.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "message")]
+ public string Message {get; private set; }
+
+ ///
+ /// Gets the error target.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "target")]
+ public string Target {get; private set; }
+
+ ///
+ /// Gets the error details.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "details")]
+ public System.Collections.Generic.IList Details {get; private set; }
+
+ ///
+ /// Gets the error additional info.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")]
+ public System.Collections.Generic.IList AdditionalInfo {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorResponse.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorResponse.cs
new file mode 100644
index 000000000000..f1f9c9039a1c
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorResponse.cs
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error
+ /// details for failed operations. (This also follows the OData error response
+ /// format.).
+ ///
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error
+ /// details for failed operations. (This also follows the OData error response
+ /// format.).
+ ///
+ public partial class ErrorResponse
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ public ErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+
+ /// The error object.
+ ///
+ public ErrorResponse(ErrorDetail error = default(ErrorDetail))
+
+ {
+ this.Error = error;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets the error object.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "error")]
+ public ErrorDetail Error {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorResponseException.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorResponseException.cs
new file mode 100644
index 000000000000..0d4b1762ee9b
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ErrorResponseException.cs
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Exception thrown for an invalid response with ErrorResponse information.
+ ///
+ public partial class ErrorResponseException : Microsoft.Rest.RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public ErrorResponse Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ public ErrorResponseException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ /// The exception message.
+ public ErrorResponseException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ErrorResponseException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/Page.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/Page.cs
new file mode 100644
index 000000000000..09420b5d6992
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/Page.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [Newtonsoft.Json.JsonObject]
+ public class Page : Microsoft.Rest.Azure.IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [Newtonsoft.Json.JsonProperty("nextLink")]
+ public System.String NextPageLink { get; private set; }
+
+ [Newtonsoft.Json.JsonProperty("value")]
+ private System.Collections.Generic.IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public System.Collections.Generic.IEnumerator GetEnumerator()
+ {
+ return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ProxyResource.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ProxyResource.cs
new file mode 100644
index 000000000000..25bbebf0f423
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/ProxyResource.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// ARM proxy resource.
+ ///
+ public partial class ProxyResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the ProxyResource class.
+ ///
+ public ProxyResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ProxyResource class.
+ ///
+
+ /// Resource ID.
+ ///
+
+ /// Resource name.
+ ///
+
+ /// Resource type.
+ ///
+ public ProxyResource(string id = default(string), string name = default(string), string type = default(string))
+
+ : base(id, name, type)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/Resource.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/Resource.cs
new file mode 100644
index 000000000000..ff157f41e29e
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/Resource.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// ARM resource.
+ ///
+ public partial class Resource : Microsoft.Rest.Azure.IResource
+ {
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ public Resource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+
+ /// Resource ID.
+ ///
+
+ /// Resource name.
+ ///
+
+ /// Resource type.
+ ///
+ public Resource(string id = default(string), string name = default(string), string type = default(string))
+
+ {
+ this.Id = id;
+ this.Name = name;
+ this.Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets resource ID.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "id")]
+ public string Id {get; private set; }
+
+ ///
+ /// Gets resource name.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "name")]
+ public string Name {get; private set; }
+
+ ///
+ /// Gets resource type.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "type")]
+ public string Type {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/Sku.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/Sku.cs
new file mode 100644
index 000000000000..70728b748a52
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/Sku.cs
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// An ARM Resource SKU.
+ ///
+ public partial class Sku
+ {
+ ///
+ /// Initializes a new instance of the Sku class.
+ ///
+ public Sku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Sku class.
+ ///
+
+ /// The name of the SKU, typically, a letter + Number code, e.g. P3.
+ ///
+
+ /// The tier or edition of the particular SKU, e.g. Basic, Premium.
+ ///
+
+ /// Size of the particular SKU
+ ///
+
+ /// If the service has different generations of hardware, for the same SKU,
+ /// then that can be captured here.
+ ///
+
+ /// Capacity of the particular SKU.
+ ///
+ public Sku(string name, string tier = default(string), string size = default(string), string family = default(string), int? capacity = default(int?))
+
+ {
+ this.Name = name;
+ this.Tier = tier;
+ this.Size = size;
+ this.Family = family;
+ this.Capacity = capacity;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets the name of the SKU, typically, a letter + Number code, e.g.
+ /// P3.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "name")]
+ public string Name {get; set; }
+
+ ///
+ /// Gets or sets the tier or edition of the particular SKU, e.g. Basic,
+ /// Premium.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tier")]
+ public string Tier {get; set; }
+
+ ///
+ /// Gets or sets size of the particular SKU
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "size")]
+ public string Size {get; set; }
+
+ ///
+ /// Gets or sets if the service has different generations of hardware, for the
+ /// same SKU, then that can be captured here.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "family")]
+ public string Family {get; set; }
+
+ ///
+ /// Gets or sets capacity of the particular SKU.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "capacity")]
+ public int? Capacity {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Name == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name");
+ }
+
+
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncConflictResolutionPolicy.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncConflictResolutionPolicy.cs
new file mode 100644
index 000000000000..f2b2bbc456c4
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncConflictResolutionPolicy.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Defines values for SyncConflictResolutionPolicy.
+ ///
+
+
+ public static class SyncConflictResolutionPolicy
+ {
+ public const string HubWin = "HubWin";
+ public const string MemberWin = "MemberWin";
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncDatabaseIdProperties.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncDatabaseIdProperties.cs
new file mode 100644
index 000000000000..a275d15c852d
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncDatabaseIdProperties.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of the sync database id.
+ ///
+ public partial class SyncDatabaseIdProperties
+ {
+ ///
+ /// Initializes a new instance of the SyncDatabaseIdProperties class.
+ ///
+ public SyncDatabaseIdProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncDatabaseIdProperties class.
+ ///
+
+ /// ARM resource id of sync database.
+ ///
+ public SyncDatabaseIdProperties(string id = default(string))
+
+ {
+ this.Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets aRM resource id of sync database.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "id")]
+ public string Id {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncDirection.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncDirection.cs
new file mode 100644
index 000000000000..87249d181e8b
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncDirection.cs
@@ -0,0 +1,20 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Defines values for SyncDirection.
+ ///
+
+
+ public static class SyncDirection
+ {
+ public const string Bidirectional = "Bidirectional";
+ public const string OneWayMemberToHub = "OneWayMemberToHub";
+ public const string OneWayHubToMember = "OneWayHubToMember";
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncFullSchemaProperties.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncFullSchemaProperties.cs
new file mode 100644
index 000000000000..7226c9e534f9
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncFullSchemaProperties.cs
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of the database full schema.
+ ///
+ public partial class SyncFullSchemaProperties
+ {
+ ///
+ /// Initializes a new instance of the SyncFullSchemaProperties class.
+ ///
+ public SyncFullSchemaProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncFullSchemaProperties class.
+ ///
+
+ /// List of tables in the database full schema.
+ ///
+
+ /// Last update time of the database schema.
+ ///
+ public SyncFullSchemaProperties(System.Collections.Generic.IList tables = default(System.Collections.Generic.IList), System.DateTime? lastUpdateTime = default(System.DateTime?))
+
+ {
+ this.Tables = tables;
+ this.LastUpdateTime = lastUpdateTime;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets list of tables in the database full schema.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tables")]
+ public System.Collections.Generic.IList Tables {get; private set; }
+
+ ///
+ /// Gets last update time of the database schema.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "lastUpdateTime")]
+ public System.DateTime? LastUpdateTime {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncFullSchemaTable.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncFullSchemaTable.cs
new file mode 100644
index 000000000000..67f6c9e2f6a8
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncFullSchemaTable.cs
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of the table in the database full schema.
+ ///
+ public partial class SyncFullSchemaTable
+ {
+ ///
+ /// Initializes a new instance of the SyncFullSchemaTable class.
+ ///
+ public SyncFullSchemaTable()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncFullSchemaTable class.
+ ///
+
+ /// List of columns in the table of database full schema.
+ ///
+
+ /// Error id of the table.
+ ///
+
+ /// If there is error in the table.
+ ///
+
+ /// Name of the table.
+ ///
+
+ /// Quoted name of the table.
+ ///
+ public SyncFullSchemaTable(System.Collections.Generic.IList columns = default(System.Collections.Generic.IList), string errorId = default(string), bool? hasError = default(bool?), string name = default(string), string quotedName = default(string))
+
+ {
+ this.Columns = columns;
+ this.ErrorId = errorId;
+ this.HasError = hasError;
+ this.Name = name;
+ this.QuotedName = quotedName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets list of columns in the table of database full schema.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "columns")]
+ public System.Collections.Generic.IList Columns {get; private set; }
+
+ ///
+ /// Gets error id of the table.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "errorId")]
+ public string ErrorId {get; private set; }
+
+ ///
+ /// Gets if there is error in the table.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "hasError")]
+ public bool? HasError {get; private set; }
+
+ ///
+ /// Gets name of the table.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "name")]
+ public string Name {get; private set; }
+
+ ///
+ /// Gets quoted name of the table.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "quotedName")]
+ public string QuotedName {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncFullSchemaTableColumn.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncFullSchemaTableColumn.cs
new file mode 100644
index 000000000000..4d82f96c2efa
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncFullSchemaTableColumn.cs
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of the column in the table of database full schema.
+ ///
+ public partial class SyncFullSchemaTableColumn
+ {
+ ///
+ /// Initializes a new instance of the SyncFullSchemaTableColumn class.
+ ///
+ public SyncFullSchemaTableColumn()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncFullSchemaTableColumn class.
+ ///
+
+ /// Data size of the column.
+ ///
+
+ /// Data type of the column.
+ ///
+
+ /// Error id of the column.
+ ///
+
+ /// If there is error in the table.
+ ///
+
+ /// If it is the primary key of the table.
+ ///
+
+ /// Name of the column.
+ ///
+
+ /// Quoted name of the column.
+ ///
+ public SyncFullSchemaTableColumn(string dataSize = default(string), string dataType = default(string), string errorId = default(string), bool? hasError = default(bool?), bool? isPrimaryKey = default(bool?), string name = default(string), string quotedName = default(string))
+
+ {
+ this.DataSize = dataSize;
+ this.DataType = dataType;
+ this.ErrorId = errorId;
+ this.HasError = hasError;
+ this.IsPrimaryKey = isPrimaryKey;
+ this.Name = name;
+ this.QuotedName = quotedName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets data size of the column.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "dataSize")]
+ public string DataSize {get; private set; }
+
+ ///
+ /// Gets data type of the column.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "dataType")]
+ public string DataType {get; private set; }
+
+ ///
+ /// Gets error id of the column.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "errorId")]
+ public string ErrorId {get; private set; }
+
+ ///
+ /// Gets if there is error in the table.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "hasError")]
+ public bool? HasError {get; private set; }
+
+ ///
+ /// Gets if it is the primary key of the table.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "isPrimaryKey")]
+ public bool? IsPrimaryKey {get; private set; }
+
+ ///
+ /// Gets name of the column.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "name")]
+ public string Name {get; private set; }
+
+ ///
+ /// Gets quoted name of the column.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "quotedName")]
+ public string QuotedName {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroup.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroup.cs
new file mode 100644
index 000000000000..556abd1d14f3
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroup.cs
@@ -0,0 +1,220 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// An Azure SQL Database sync group.
+ ///
+ [Microsoft.Rest.Serialization.JsonTransformation]
+ public partial class SyncGroup : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the SyncGroup class.
+ ///
+ public SyncGroup()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroup class.
+ ///
+
+ /// Resource ID.
+ ///
+
+ /// Resource name.
+ ///
+
+ /// Resource type.
+ ///
+
+ /// The name and capacity of the SKU.
+ ///
+
+ /// Sync group authentication information.
+ ///
+
+ /// Sync interval of the sync group.
+ ///
+
+ /// Last sync time of the sync group.
+ ///
+
+ /// Conflict resolution policy of the sync group.
+ /// Possible values include: 'HubWin', 'MemberWin'
+
+ /// ARM resource id of the sync database in the sync group.
+ ///
+
+ /// User name for the sync group hub database credential.
+ ///
+
+ /// Password for the sync group hub database credential.
+ ///
+
+ /// Sync state of the sync group.
+ /// Possible values include: 'NotReady', 'Error', 'Warning', 'Progressing',
+ /// 'Good'
+
+ /// Sync schema of the sync group.
+ ///
+
+ /// If conflict logging is enabled.
+ ///
+
+ /// Conflict logging retention period.
+ ///
+
+ /// If use private link connection is enabled.
+ ///
+
+ /// Private endpoint name of the sync group if use private link connection is
+ /// enabled.
+ ///
+ public SyncGroup(DataSyncParticipantIdentity identity, string id = default(string), string name = default(string), string type = default(string), Sku sku = default(Sku), int? interval = default(int?), System.DateTime? lastSyncTime = default(System.DateTime?), string conflictResolutionPolicy = default(string), string syncDatabaseId = default(string), string hubDatabaseUserName = default(string), string hubDatabasePassword = default(string), string syncState = default(string), SyncGroupSchema schema = default(SyncGroupSchema), bool? enableConflictLogging = default(bool?), int? conflictLoggingRetentionInDays = default(int?), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string))
+
+ : base(id, name, type)
+ {
+ this.Sku = sku;
+ this.Identity = identity;
+ this.Interval = interval;
+ this.LastSyncTime = lastSyncTime;
+ this.ConflictResolutionPolicy = conflictResolutionPolicy;
+ this.SyncDatabaseId = syncDatabaseId;
+ this.HubDatabaseUserName = hubDatabaseUserName;
+ this.HubDatabasePassword = hubDatabasePassword;
+ this.SyncState = syncState;
+ this.Schema = schema;
+ this.EnableConflictLogging = enableConflictLogging;
+ this.ConflictLoggingRetentionInDays = conflictLoggingRetentionInDays;
+ this.UsePrivateLinkConnection = usePrivateLinkConnection;
+ this.PrivateEndpointName = privateEndpointName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets the name and capacity of the SKU.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sku")]
+ public Sku Sku {get; set; }
+
+ ///
+ /// Gets or sets sync group authentication information.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "identity")]
+ public DataSyncParticipantIdentity Identity {get; set; }
+
+ ///
+ /// Gets or sets sync interval of the sync group.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.interval")]
+ public int? Interval {get; set; }
+
+ ///
+ /// Gets last sync time of the sync group.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.lastSyncTime")]
+ public System.DateTime? LastSyncTime {get; private set; }
+
+ ///
+ /// Gets or sets conflict resolution policy of the sync group. Possible values include: 'HubWin', 'MemberWin'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.conflictResolutionPolicy")]
+ public string ConflictResolutionPolicy {get; set; }
+
+ ///
+ /// Gets or sets aRM resource id of the sync database in the sync group.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.syncDatabaseId")]
+ public string SyncDatabaseId {get; set; }
+
+ ///
+ /// Gets or sets user name for the sync group hub database credential.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.hubDatabaseUserName")]
+ public string HubDatabaseUserName {get; set; }
+
+ ///
+ /// Gets or sets password for the sync group hub database credential.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.hubDatabasePassword")]
+ public string HubDatabasePassword {get; set; }
+
+ ///
+ /// Gets sync state of the sync group. Possible values include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.syncState")]
+ public string SyncState {get; private set; }
+
+ ///
+ /// Gets or sets sync schema of the sync group.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.schema")]
+ public SyncGroupSchema Schema {get; set; }
+
+ ///
+ /// Gets or sets if conflict logging is enabled.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableConflictLogging")]
+ public bool? EnableConflictLogging {get; set; }
+
+ ///
+ /// Gets or sets conflict logging retention period.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.conflictLoggingRetentionInDays")]
+ public int? ConflictLoggingRetentionInDays {get; set; }
+
+ ///
+ /// Gets or sets if use private link connection is enabled.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.usePrivateLinkConnection")]
+ public bool? UsePrivateLinkConnection {get; set; }
+
+ ///
+ /// Gets private endpoint name of the sync group if use private link connection
+ /// is enabled.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.privateEndpointName")]
+ public string PrivateEndpointName {get; private set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Identity == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Identity");
+ }
+ if (this.Sku != null)
+ {
+ this.Sku.Validate();
+ }
+ if (this.Identity != null)
+ {
+ this.Identity.Validate();
+ }
+
+
+
+
+
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupLogProperties.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupLogProperties.cs
new file mode 100644
index 000000000000..54c5be04619c
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupLogProperties.cs
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of an Azure SQL Database sync group log.
+ ///
+ public partial class SyncGroupLogProperties
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupLogProperties class.
+ ///
+ public SyncGroupLogProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupLogProperties class.
+ ///
+
+ /// Timestamp of the sync group log.
+ ///
+
+ /// Type of the sync group log.
+ /// Possible values include: 'All', 'Error', 'Warning', 'Success'
+
+ /// Source of the sync group log.
+ ///
+
+ /// Details of the sync group log.
+ ///
+
+ /// TracingId of the sync group log.
+ ///
+
+ /// OperationStatus of the sync group log.
+ ///
+ public SyncGroupLogProperties(System.DateTime? timestamp = default(System.DateTime?), string type = default(string), string source = default(string), string details = default(string), System.Guid? tracingId = default(System.Guid?), string operationStatus = default(string))
+
+ {
+ this.Timestamp = timestamp;
+ this.Type = type;
+ this.Source = source;
+ this.Details = details;
+ this.TracingId = tracingId;
+ this.OperationStatus = operationStatus;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets timestamp of the sync group log.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "timestamp")]
+ public System.DateTime? Timestamp {get; private set; }
+
+ ///
+ /// Gets type of the sync group log. Possible values include: 'All', 'Error', 'Warning', 'Success'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "type")]
+ public string Type {get; private set; }
+
+ ///
+ /// Gets source of the sync group log.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "source")]
+ public string Source {get; private set; }
+
+ ///
+ /// Gets details of the sync group log.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "details")]
+ public string Details {get; private set; }
+
+ ///
+ /// Gets tracingId of the sync group log.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tracingId")]
+ public System.Guid? TracingId {get; private set; }
+
+ ///
+ /// Gets operationStatus of the sync group log.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "operationStatus")]
+ public string OperationStatus {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupLogType.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupLogType.cs
new file mode 100644
index 000000000000..6b92cb21fd5c
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupLogType.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Defines values for SyncGroupLogType.
+ ///
+
+
+ public static class SyncGroupLogType
+ {
+ public const string All = "All";
+ public const string Error = "Error";
+ public const string Warning = "Warning";
+ public const string Success = "Success";
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupProperties.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupProperties.cs
new file mode 100644
index 000000000000..e3c123893280
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupProperties.cs
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of a sync group with support to MI.
+ ///
+ public partial class SyncGroupProperties
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupProperties class.
+ ///
+ public SyncGroupProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupProperties class.
+ ///
+
+ /// Sync interval of the sync group.
+ ///
+
+ /// Last sync time of the sync group.
+ ///
+
+ /// Conflict resolution policy of the sync group.
+ /// Possible values include: 'HubWin', 'MemberWin'
+
+ /// ARM resource id of the sync database in the sync group.
+ ///
+
+ /// User name for the sync group hub database credential.
+ ///
+
+ /// Password for the sync group hub database credential.
+ ///
+
+ /// Sync state of the sync group.
+ /// Possible values include: 'NotReady', 'Error', 'Warning', 'Progressing',
+ /// 'Good'
+
+ /// Sync schema of the sync group.
+ ///
+
+ /// If conflict logging is enabled.
+ ///
+
+ /// Conflict logging retention period.
+ ///
+
+ /// If use private link connection is enabled.
+ ///
+
+ /// Private endpoint name of the sync group if use private link connection is
+ /// enabled.
+ ///
+ public SyncGroupProperties(int? interval = default(int?), System.DateTime? lastSyncTime = default(System.DateTime?), string conflictResolutionPolicy = default(string), string syncDatabaseId = default(string), string hubDatabaseUserName = default(string), string hubDatabasePassword = default(string), string syncState = default(string), SyncGroupSchema schema = default(SyncGroupSchema), bool? enableConflictLogging = default(bool?), int? conflictLoggingRetentionInDays = default(int?), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string))
+
+ {
+ this.Interval = interval;
+ this.LastSyncTime = lastSyncTime;
+ this.ConflictResolutionPolicy = conflictResolutionPolicy;
+ this.SyncDatabaseId = syncDatabaseId;
+ this.HubDatabaseUserName = hubDatabaseUserName;
+ this.HubDatabasePassword = hubDatabasePassword;
+ this.SyncState = syncState;
+ this.Schema = schema;
+ this.EnableConflictLogging = enableConflictLogging;
+ this.ConflictLoggingRetentionInDays = conflictLoggingRetentionInDays;
+ this.UsePrivateLinkConnection = usePrivateLinkConnection;
+ this.PrivateEndpointName = privateEndpointName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets sync interval of the sync group.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "interval")]
+ public int? Interval {get; set; }
+
+ ///
+ /// Gets last sync time of the sync group.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "lastSyncTime")]
+ public System.DateTime? LastSyncTime {get; private set; }
+
+ ///
+ /// Gets or sets conflict resolution policy of the sync group. Possible values include: 'HubWin', 'MemberWin'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "conflictResolutionPolicy")]
+ public string ConflictResolutionPolicy {get; set; }
+
+ ///
+ /// Gets or sets aRM resource id of the sync database in the sync group.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "syncDatabaseId")]
+ public string SyncDatabaseId {get; set; }
+
+ ///
+ /// Gets or sets user name for the sync group hub database credential.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "hubDatabaseUserName")]
+ public string HubDatabaseUserName {get; set; }
+
+ ///
+ /// Gets or sets password for the sync group hub database credential.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "hubDatabasePassword")]
+ public string HubDatabasePassword {get; set; }
+
+ ///
+ /// Gets sync state of the sync group. Possible values include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "syncState")]
+ public string SyncState {get; private set; }
+
+ ///
+ /// Gets or sets sync schema of the sync group.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "schema")]
+ public SyncGroupSchema Schema {get; set; }
+
+ ///
+ /// Gets or sets if conflict logging is enabled.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "enableConflictLogging")]
+ public bool? EnableConflictLogging {get; set; }
+
+ ///
+ /// Gets or sets conflict logging retention period.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "conflictLoggingRetentionInDays")]
+ public int? ConflictLoggingRetentionInDays {get; set; }
+
+ ///
+ /// Gets or sets if use private link connection is enabled.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "usePrivateLinkConnection")]
+ public bool? UsePrivateLinkConnection {get; set; }
+
+ ///
+ /// Gets private endpoint name of the sync group if use private link connection
+ /// is enabled.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpointName")]
+ public string PrivateEndpointName {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupSchema.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupSchema.cs
new file mode 100644
index 000000000000..6c8eee39d9f5
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupSchema.cs
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of sync group schema.
+ ///
+ public partial class SyncGroupSchema
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupSchema class.
+ ///
+ public SyncGroupSchema()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupSchema class.
+ ///
+
+ /// List of tables in sync group schema.
+ ///
+
+ /// Name of master sync member where the schema is from.
+ ///
+ public SyncGroupSchema(System.Collections.Generic.IList tables = default(System.Collections.Generic.IList), string masterSyncMemberName = default(string))
+
+ {
+ this.Tables = tables;
+ this.MasterSyncMemberName = masterSyncMemberName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets list of tables in sync group schema.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tables")]
+ public System.Collections.Generic.IList Tables {get; set; }
+
+ ///
+ /// Gets or sets name of master sync member where the schema is from.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "masterSyncMemberName")]
+ public string MasterSyncMemberName {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupSchemaTable.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupSchemaTable.cs
new file mode 100644
index 000000000000..8f66b422b5f3
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupSchemaTable.cs
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of table in sync group schema.
+ ///
+ public partial class SyncGroupSchemaTable
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupSchemaTable class.
+ ///
+ public SyncGroupSchemaTable()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupSchemaTable class.
+ ///
+
+ /// List of columns in sync group schema.
+ ///
+
+ /// Quoted name of sync group schema table.
+ ///
+ public SyncGroupSchemaTable(System.Collections.Generic.IList columns = default(System.Collections.Generic.IList), string quotedName = default(string))
+
+ {
+ this.Columns = columns;
+ this.QuotedName = quotedName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets list of columns in sync group schema.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "columns")]
+ public System.Collections.Generic.IList Columns {get; set; }
+
+ ///
+ /// Gets or sets quoted name of sync group schema table.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "quotedName")]
+ public string QuotedName {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupSchemaTableColumn.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupSchemaTableColumn.cs
new file mode 100644
index 000000000000..818941621f54
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupSchemaTableColumn.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of column in sync group table.
+ ///
+ public partial class SyncGroupSchemaTableColumn
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupSchemaTableColumn class.
+ ///
+ public SyncGroupSchemaTableColumn()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupSchemaTableColumn class.
+ ///
+
+ /// Quoted name of sync group table column.
+ ///
+
+ /// Data size of the column.
+ ///
+
+ /// Data type of the column.
+ ///
+ public SyncGroupSchemaTableColumn(string quotedName = default(string), string dataSize = default(string), string dataType = default(string))
+
+ {
+ this.QuotedName = quotedName;
+ this.DataSize = dataSize;
+ this.DataType = dataType;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets quoted name of sync group table column.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "quotedName")]
+ public string QuotedName {get; set; }
+
+ ///
+ /// Gets or sets data size of the column.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "dataSize")]
+ public string DataSize {get; set; }
+
+ ///
+ /// Gets or sets data type of the column.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "dataType")]
+ public string DataType {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupState.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupState.cs
new file mode 100644
index 000000000000..87f84cf48075
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupState.cs
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Defines values for SyncGroupState.
+ ///
+
+
+ public static class SyncGroupState
+ {
+ public const string NotReady = "NotReady";
+ public const string Error = "Error";
+ public const string Warning = "Warning";
+ public const string Progressing = "Progressing";
+ public const string Good = "Good";
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsCreateOrUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsCreateOrUpdateHeaders.cs
new file mode 100644
index 000000000000..bc4d1c410a02
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsCreateOrUpdateHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ public partial class SyncGroupsCreateOrUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupsCreateOrUpdateHeaders class.
+ ///
+ public SyncGroupsCreateOrUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupsCreateOrUpdateHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncGroupsCreateOrUpdateHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsDeleteHeaders.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsDeleteHeaders.cs
new file mode 100644
index 000000000000..aaa7aa24628c
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsDeleteHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ public partial class SyncGroupsDeleteHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupsDeleteHeaders class.
+ ///
+ public SyncGroupsDeleteHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupsDeleteHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncGroupsDeleteHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsRefreshHubSchemaHeaders.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsRefreshHubSchemaHeaders.cs
new file mode 100644
index 000000000000..4a001a288562
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsRefreshHubSchemaHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ public partial class SyncGroupsRefreshHubSchemaHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupsRefreshHubSchemaHeaders class.
+ ///
+ public SyncGroupsRefreshHubSchemaHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupsRefreshHubSchemaHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncGroupsRefreshHubSchemaHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsType.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsType.cs
new file mode 100644
index 000000000000..bb5a53328721
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsType.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Defines values for SyncGroupsType.
+ ///
+
+
+ public static class SyncGroupsType
+ {
+ public const string All = "All";
+ public const string Error = "Error";
+ public const string Warning = "Warning";
+ public const string Success = "Success";
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsUpdateHeaders.cs
new file mode 100644
index 000000000000..2af357ce20c5
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncGroupsUpdateHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ public partial class SyncGroupsUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupsUpdateHeaders class.
+ ///
+ public SyncGroupsUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupsUpdateHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncGroupsUpdateHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMember.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMember.cs
new file mode 100644
index 000000000000..b964ab9bb963
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMember.cs
@@ -0,0 +1,216 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// An Azure SQL Database sync member.
+ ///
+ [Microsoft.Rest.Serialization.JsonTransformation]
+ public partial class SyncMember : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the SyncMember class.
+ ///
+ public SyncMember()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMember class.
+ ///
+
+ /// Resource ID.
+ ///
+
+ /// Resource name.
+ ///
+
+ /// Resource type.
+ ///
+
+ /// Sync member authentication information.
+ ///
+
+ /// Sync direction of the sync member.
+ /// Possible values include: 'Bidirectional', 'OneWayMemberToHub',
+ /// 'OneWayHubToMember'
+
+ /// Database type of the sync member.
+ /// Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase'
+
+ /// ARM resource id of the sync agent in the sync member.
+ ///
+
+ /// SQL Server database id of the sync member.
+ ///
+
+ /// ARM resource id of the sync member logical database, for sync members in
+ /// Azure.
+ ///
+
+ /// Whether to use private link connection.
+ ///
+
+ /// Private endpoint name of the sync member if use private link connection is
+ /// enabled, for sync members in Azure.
+ ///
+
+ /// Server name of the member database in the sync member
+ ///
+
+ /// Database name of the member database in the sync member.
+ ///
+
+ /// User name of the member database in the sync member.
+ ///
+
+ /// Password of the member database in the sync member.
+ ///
+
+ /// Sync state of the sync member.
+ /// Possible values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed',
+ /// 'DisabledTombstoneCleanup', 'DisabledBackupRestore',
+ /// 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled',
+ /// 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed',
+ /// 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning',
+ /// 'ReprovisionFailed', 'UnReprovisioned'
+ public SyncMember(DataSyncParticipantIdentity identity, string id = default(string), string name = default(string), string type = default(string), string syncDirection = default(string), string databaseType = default(string), string syncAgentId = default(string), System.Guid? sqlServerDatabaseId = default(System.Guid?), string syncMemberAzureDatabaseResourceId = default(string), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string), string serverName = default(string), string databaseName = default(string), string userName = default(string), string password = default(string), string syncState = default(string))
+
+ : base(id, name, type)
+ {
+ this.Identity = identity;
+ this.SyncDirection = syncDirection;
+ this.DatabaseType = databaseType;
+ this.SyncAgentId = syncAgentId;
+ this.SqlServerDatabaseId = sqlServerDatabaseId;
+ this.SyncMemberAzureDatabaseResourceId = syncMemberAzureDatabaseResourceId;
+ this.UsePrivateLinkConnection = usePrivateLinkConnection;
+ this.PrivateEndpointName = privateEndpointName;
+ this.ServerName = serverName;
+ this.DatabaseName = databaseName;
+ this.UserName = userName;
+ this.Password = password;
+ this.SyncState = syncState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets sync member authentication information.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "identity")]
+ public DataSyncParticipantIdentity Identity {get; set; }
+
+ ///
+ /// Gets or sets sync direction of the sync member. Possible values include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.syncDirection")]
+ public string SyncDirection {get; set; }
+
+ ///
+ /// Gets or sets database type of the sync member. Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.databaseType")]
+ public string DatabaseType {get; set; }
+
+ ///
+ /// Gets or sets aRM resource id of the sync agent in the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.syncAgentId")]
+ public string SyncAgentId {get; set; }
+
+ ///
+ /// Gets or sets sQL Server database id of the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.sqlServerDatabaseId")]
+ public System.Guid? SqlServerDatabaseId {get; set; }
+
+ ///
+ /// Gets or sets aRM resource id of the sync member logical database, for sync
+ /// members in Azure.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.syncMemberAzureDatabaseResourceId")]
+ public string SyncMemberAzureDatabaseResourceId {get; set; }
+
+ ///
+ /// Gets or sets whether to use private link connection.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.usePrivateLinkConnection")]
+ public bool? UsePrivateLinkConnection {get; set; }
+
+ ///
+ /// Gets private endpoint name of the sync member if use private link
+ /// connection is enabled, for sync members in Azure.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.privateEndpointName")]
+ public string PrivateEndpointName {get; private set; }
+
+ ///
+ /// Gets or sets server name of the member database in the sync member
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.serverName")]
+ public string ServerName {get; set; }
+
+ ///
+ /// Gets or sets database name of the member database in the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.databaseName")]
+ public string DatabaseName {get; set; }
+
+ ///
+ /// Gets or sets user name of the member database in the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.userName")]
+ public string UserName {get; set; }
+
+ ///
+ /// Gets or sets password of the member database in the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.password")]
+ public string Password {get; set; }
+
+ ///
+ /// Gets sync state of the sync member. Possible values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', 'DisabledTombstoneCleanup', 'DisabledBackupRestore', 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', 'ReprovisionFailed', 'UnReprovisioned'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.syncState")]
+ public string SyncState {get; private set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Identity == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Identity");
+ }
+ if (this.Identity != null)
+ {
+ this.Identity.Validate();
+ }
+
+
+
+
+
+
+
+
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMemberDbType.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMemberDbType.cs
new file mode 100644
index 000000000000..a2ed245e8ff0
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMemberDbType.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Defines values for SyncMemberDbType.
+ ///
+
+
+ public static class SyncMemberDbType
+ {
+ public const string AzureSqlDatabase = "AzureSqlDatabase";
+ public const string SqlServerDatabase = "SqlServerDatabase";
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMemberProperties.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMemberProperties.cs
new file mode 100644
index 000000000000..3dd7a9cf72e6
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMemberProperties.cs
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties of a sync member with support to MI.
+ ///
+ public partial class SyncMemberProperties
+ {
+ ///
+ /// Initializes a new instance of the SyncMemberProperties class.
+ ///
+ public SyncMemberProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMemberProperties class.
+ ///
+
+ /// Database type of the sync member.
+ /// Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase'
+
+ /// ARM resource id of the sync agent in the sync member.
+ ///
+
+ /// SQL Server database id of the sync member.
+ ///
+
+ /// ARM resource id of the sync member logical database, for sync members in
+ /// Azure.
+ ///
+
+ /// Whether to use private link connection.
+ ///
+
+ /// Private endpoint name of the sync member if use private link connection is
+ /// enabled, for sync members in Azure.
+ ///
+
+ /// Server name of the member database in the sync member
+ ///
+
+ /// Database name of the member database in the sync member.
+ ///
+
+ /// User name of the member database in the sync member.
+ ///
+
+ /// Password of the member database in the sync member.
+ ///
+
+ /// Sync direction of the sync member.
+ /// Possible values include: 'Bidirectional', 'OneWayMemberToHub',
+ /// 'OneWayHubToMember'
+
+ /// Sync state of the sync member.
+ /// Possible values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed',
+ /// 'DisabledTombstoneCleanup', 'DisabledBackupRestore',
+ /// 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled',
+ /// 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed',
+ /// 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning',
+ /// 'ReprovisionFailed', 'UnReprovisioned'
+ public SyncMemberProperties(string databaseType = default(string), string syncAgentId = default(string), System.Guid? sqlServerDatabaseId = default(System.Guid?), string syncMemberAzureDatabaseResourceId = default(string), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string), string serverName = default(string), string databaseName = default(string), string userName = default(string), string password = default(string), string syncDirection = default(string), string syncState = default(string))
+
+ {
+ this.DatabaseType = databaseType;
+ this.SyncAgentId = syncAgentId;
+ this.SqlServerDatabaseId = sqlServerDatabaseId;
+ this.SyncMemberAzureDatabaseResourceId = syncMemberAzureDatabaseResourceId;
+ this.UsePrivateLinkConnection = usePrivateLinkConnection;
+ this.PrivateEndpointName = privateEndpointName;
+ this.ServerName = serverName;
+ this.DatabaseName = databaseName;
+ this.UserName = userName;
+ this.Password = password;
+ this.SyncDirection = syncDirection;
+ this.SyncState = syncState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets database type of the sync member. Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "databaseType")]
+ public string DatabaseType {get; set; }
+
+ ///
+ /// Gets or sets aRM resource id of the sync agent in the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "syncAgentId")]
+ public string SyncAgentId {get; set; }
+
+ ///
+ /// Gets or sets sQL Server database id of the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerDatabaseId")]
+ public System.Guid? SqlServerDatabaseId {get; set; }
+
+ ///
+ /// Gets or sets aRM resource id of the sync member logical database, for sync
+ /// members in Azure.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "syncMemberAzureDatabaseResourceId")]
+ public string SyncMemberAzureDatabaseResourceId {get; set; }
+
+ ///
+ /// Gets or sets whether to use private link connection.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "usePrivateLinkConnection")]
+ public bool? UsePrivateLinkConnection {get; set; }
+
+ ///
+ /// Gets private endpoint name of the sync member if use private link
+ /// connection is enabled, for sync members in Azure.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpointName")]
+ public string PrivateEndpointName {get; private set; }
+
+ ///
+ /// Gets or sets server name of the member database in the sync member
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "serverName")]
+ public string ServerName {get; set; }
+
+ ///
+ /// Gets or sets database name of the member database in the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "databaseName")]
+ public string DatabaseName {get; set; }
+
+ ///
+ /// Gets or sets user name of the member database in the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "userName")]
+ public string UserName {get; set; }
+
+ ///
+ /// Gets or sets password of the member database in the sync member.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "password")]
+ public string Password {get; set; }
+
+ ///
+ /// Gets or sets sync direction of the sync member. Possible values include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "syncDirection")]
+ public string SyncDirection {get; set; }
+
+ ///
+ /// Gets sync state of the sync member. Possible values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', 'DisabledTombstoneCleanup', 'DisabledBackupRestore', 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', 'ReprovisionFailed', 'UnReprovisioned'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "syncState")]
+ public string SyncState {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMemberState.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMemberState.cs
new file mode 100644
index 000000000000..64e5a80cbfb0
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMemberState.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+
+ ///
+ /// Defines values for SyncMemberState.
+ ///
+
+
+ public static class SyncMemberState
+ {
+ public const string SyncInProgress = "SyncInProgress";
+ public const string SyncSucceeded = "SyncSucceeded";
+ public const string SyncFailed = "SyncFailed";
+ public const string DisabledTombstoneCleanup = "DisabledTombstoneCleanup";
+ public const string DisabledBackupRestore = "DisabledBackupRestore";
+ public const string SyncSucceededWithWarnings = "SyncSucceededWithWarnings";
+ public const string SyncCancelling = "SyncCancelling";
+ public const string SyncCancelled = "SyncCancelled";
+ public const string UnProvisioned = "UnProvisioned";
+ public const string Provisioning = "Provisioning";
+ public const string Provisioned = "Provisioned";
+ public const string ProvisionFailed = "ProvisionFailed";
+ public const string DeProvisioning = "DeProvisioning";
+ public const string DeProvisioned = "DeProvisioned";
+ public const string DeProvisionFailed = "DeProvisionFailed";
+ public const string Reprovisioning = "Reprovisioning";
+ public const string ReprovisionFailed = "ReprovisionFailed";
+ public const string UnReprovisioned = "UnReprovisioned";
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersCreateOrUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersCreateOrUpdateHeaders.cs
new file mode 100644
index 000000000000..f567fe8e93d5
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersCreateOrUpdateHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ public partial class SyncMembersCreateOrUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncMembersCreateOrUpdateHeaders class.
+ ///
+ public SyncMembersCreateOrUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMembersCreateOrUpdateHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncMembersCreateOrUpdateHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersDeleteHeaders.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersDeleteHeaders.cs
new file mode 100644
index 000000000000..be9920fe06e7
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersDeleteHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ public partial class SyncMembersDeleteHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncMembersDeleteHeaders class.
+ ///
+ public SyncMembersDeleteHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMembersDeleteHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncMembersDeleteHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersRefreshMemberSchemaHeaders.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersRefreshMemberSchemaHeaders.cs
new file mode 100644
index 000000000000..da1001c7db0f
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersRefreshMemberSchemaHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ public partial class SyncMembersRefreshMemberSchemaHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncMembersRefreshMemberSchemaHeaders class.
+ ///
+ public SyncMembersRefreshMemberSchemaHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMembersRefreshMemberSchemaHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncMembersRefreshMemberSchemaHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersUpdateHeaders.cs
new file mode 100644
index 000000000000..b8ec23ee50c4
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/Models/SyncMembersUpdateHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2.Models
+{
+ using System.Linq;
+
+ public partial class SyncMembersUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncMembersUpdateHeaders class.
+ ///
+ public SyncMembersUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMembersUpdateHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncMembersUpdateHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/SqlManagementClient.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/SqlManagementClient.cs
new file mode 100644
index 000000000000..80aa043c9eab
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/SqlManagementClient.cs
@@ -0,0 +1,350 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2
+{
+ using System.Linq;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// The Azure SQL Database management API provides a RESTful set of web APIs
+ /// that interact with Azure SQL Database services to manage your databases.
+ /// The API enables users to create, retrieve, update, and delete databases,
+ /// servers, and other entities.
+ ///
+ public partial class SqlManagementClient : Microsoft.Rest.ServiceClient, ISqlManagementClient, IAzureClient
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ public System.Uri BaseUri { get; set; }
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; }
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; }
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; }
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ public string ApiVersion { get; private set; }
+
+ ///
+ /// The subscription ID that identifies an Azure subscription.
+ ///
+ public string SubscriptionId { get; set;}
+
+ ///
+ /// The preferred language for the response.
+ ///
+ public string AcceptLanguage { get; set;}
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// /// value is 30.
+ ///
+ public int? LongRunningOperationRetryTimeout { get; set;}
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// /// set to true a unique x-ms-client-request-id value is generated and
+ /// /// included in each request. Default is true.
+ ///
+ public bool? GenerateClientRequestId { get; set;}
+
+ ///
+ /// Gets the ISyncGroupsOperations
+ ///
+ public virtual ISyncGroupsOperations SyncGroups { get; private set; }
+ ///
+ /// Gets the ISyncMembersOperations
+ ///
+ public virtual ISyncMembersOperations SyncMembers { get; private set; }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling SqlManagementClient.Dispose(). False: will not dispose provided httpClient
+ protected SqlManagementClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ this.Initialize();
+ }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected SqlManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers)
+ {
+ this.Initialize();
+ }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected SqlManagementClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers)
+ {
+ this.Initialize();
+ }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected SqlManagementClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ this.BaseUri = baseUri;
+ }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected SqlManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+
+ this.BaseUri = baseUri;
+ }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public SqlManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.Credentials.InitializeServiceClient(this);
+ }
+
+ }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling SqlManagementClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public SqlManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.Credentials.InitializeServiceClient(this);
+ }
+
+ }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public SqlManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.Credentials.InitializeServiceClient(this);
+ }
+
+ }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public SqlManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.BaseUri = baseUri;
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.Credentials.InitializeServiceClient(this);
+ }
+
+ }
+ ///
+ /// Initializes a new instance of the SqlManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public SqlManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.BaseUri = baseUri;
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.Credentials.InitializeServiceClient(this);
+ }
+
+ }
+ ///
+ /// An optional partial-method to perform custom initialization.
+ ///
+ partial void CustomInitialize();
+
+ ///
+ /// Initializes client properties.
+ ///
+ private void Initialize()
+ {
+ this.SyncGroups = new SyncGroupsOperations(this);
+ this.SyncMembers = new SyncMembersOperations(this);
+ this.BaseUri = new System.Uri("https://management.azure.com");
+ this.ApiVersion = "2025-02-01-preview";
+ this.AcceptLanguage = "en-US";
+ this.LongRunningOperationRetryTimeout = 30;
+ this.GenerateClientRequestId = true;
+ SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings
+ {
+ Formatting = Newtonsoft.Json.Formatting.Indented,
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
+ Converters = new System.Collections.Generic.List
+ {
+ new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
+ }
+ };
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter());
+ DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings
+ {
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
+ Converters = new System.Collections.Generic.List
+ {
+ new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
+ }
+ };
+ CustomInitialize();
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter());
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter());
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/SyncGroupsOperations.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/SyncGroupsOperations.cs
new file mode 100644
index 000000000000..802d93bd89e3
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/SyncGroupsOperations.cs
@@ -0,0 +1,3416 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.DataSyncV2
+{
+ using System.Linq;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// SyncGroupsOperations operations.
+ ///
+ internal partial class SyncGroupsOperations : Microsoft.Rest.IServiceOperations, ISyncGroupsOperations
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal SyncGroupsOperations (SqlManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ this.Client = client;
+ }
+
+ ///
+ /// Gets a reference to the SqlManagementClient
+ ///
+ public SqlManagementClient Client { get; private set; }
+
+ ///
+ /// Gets a collection of sync database ids.
+ ///
+ ///
+ /// The name of the region where the resource is located.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task>> ListSyncDatabaseIdsWithHttpMessagesAsync(string locationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (locationName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "locationName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("locationName", locationName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListSyncDatabaseIds", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds").ToString();
+ _url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Lists sync groups under a hub database.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabase", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Gets a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Cancels a sync group synchronization.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task CancelSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CancelSync", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Gets a collection of hub database schemas.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task>> ListHubSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemas", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Gets a collection of sync group logs.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Get logs generated after this time.
+ ///
+ ///
+ /// Get logs generated before this time.
+ ///
+ ///
+ /// The types of logs to retrieve.
+ ///
+ ///
+ /// The continuation token for this operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task>> ListLogsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
+ if (startTime == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "startTime");
+ }
+
+ if (endTime == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "endTime");
+ }
+
+ if (type == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "type");
+ }
+
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("startTime", startTime);
+ tracingParameters.Add("endTime", endTime);
+ tracingParameters.Add("type", type);
+ tracingParameters.Add("continuationToken", continuationToken);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogs", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (startTime != null)
+ {
+ _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(startTime)));
+ }
+ if (endTime != null)
+ {
+ _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(endTime)));
+ }
+ if (type != null)
+ {
+ _queryParameters.Add(string.Format("type={0}", System.Uri.EscapeDataString(type)));
+ }
+ if (continuationToken != null)
+ {
+ _queryParameters.Add(string.Format("continuationToken={0}", System.Uri.EscapeDataString(continuationToken)));
+ }
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Refreshes a hub database schema.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> RefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginRefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Triggers a sync group synchronization.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task TriggerSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "TriggerSync", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (parameters == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+
+ tracingParameters.Add("parameters", parameters);
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
+ _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Deletes a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (parameters == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+
+ tracingParameters.Add("parameters", parameters);
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
+ _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Refreshes a hub database schema.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task> BeginRefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+
+ if (serverName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverName");
+ }
+
+ if (databaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
+ }
+
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRefreshHubSchema", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Gets a collection of sync database ids.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task>> ListSyncDatabaseIdsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ if (nextPageLink == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListSyncDatabaseIdsNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Lists sync groups under a hub database.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ if (nextPageLink == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabaseNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Gets a collection of hub database schemas.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task>> ListHubSchemasNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ if (nextPageLink == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemasNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// Gets a collection of sync group logs.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async System.Threading.Tasks.Task>> ListLogsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ if (nextPageLink == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogsNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ }
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/SyncGroupsOperationsExtensions.cs b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/SyncGroupsOperationsExtensions.cs
new file mode 100644
index 000000000000..8f22cb31360a
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/GeneratedSqlDataSync_2025_02_01/SyncGroupsOperationsExtensions.cs
@@ -0,0 +1,935 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+namespace Microsoft.Azure.Management.Sql.DataSyncV2
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// Extension methods for SyncGroupsOperations
+ ///
+ public static partial class SyncGroupsOperationsExtensions
+ {
+ ///
+ /// Gets a collection of sync database ids.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the region where the resource is located.
+ ///
+ public static Microsoft.Rest.Azure.IPage ListSyncDatabaseIds(this ISyncGroupsOperations operations, string locationName)
+ {
+ return ((ISyncGroupsOperations)operations).ListSyncDatabaseIdsAsync(locationName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a collection of sync database ids.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the region where the resource is located.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task> ListSyncDatabaseIdsAsync(this ISyncGroupsOperations operations, string locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.ListSyncDatabaseIdsWithHttpMessagesAsync(locationName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// Lists sync groups under a hub database.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ public static Microsoft.Rest.Azure.IPage ListByDatabase(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName)
+ {
+ return ((ISyncGroupsOperations)operations).ListByDatabaseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists sync groups under a hub database.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task> ListByDatabaseAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// Gets a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ public static SyncGroup Get(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ {
+ return ((ISyncGroupsOperations)operations).GetAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task GetAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ public static SyncGroup CreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
+ {
+ return ((ISyncGroupsOperations)operations).CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// Deletes a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ public static SyncGroupsDeleteHeaders Delete(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ {
+ return ((ISyncGroupsOperations)operations).DeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task DeleteAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+ ///
+ /// Updates a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ public static SyncGroup Update(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
+ {
+ return ((ISyncGroupsOperations)operations).UpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task UpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// Cancels a sync group synchronization.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ public static void CancelSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ {
+ ((ISyncGroupsOperations)operations).CancelSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Cancels a sync group synchronization.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task CancelSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ (await operations.CancelSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+ ///
+ /// Gets a collection of hub database schemas.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ public static Microsoft.Rest.Azure.IPage ListHubSchemas(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ {
+ return ((ISyncGroupsOperations)operations).ListHubSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a collection of hub database schemas.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task> ListHubSchemasAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.ListHubSchemasWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// Gets a collection of sync group logs.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Get logs generated after this time.
+ ///
+ ///
+ /// Get logs generated before this time.
+ ///
+ ///
+ /// The types of logs to retrieve.
+ ///
+ ///
+ /// The continuation token for this operation.
+ ///
+ public static Microsoft.Rest.Azure.IPage ListLogs(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string))
+ {
+ return ((ISyncGroupsOperations)operations).ListLogsAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a collection of sync group logs.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Get logs generated after this time.
+ ///
+ ///
+ /// Get logs generated before this time.
+ ///
+ ///
+ /// The types of logs to retrieve.
+ ///
+ ///
+ /// The continuation token for this operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task> ListLogsAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.ListLogsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// Refreshes a hub database schema.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ public static SyncGroupsRefreshHubSchemaHeaders RefreshHubSchema(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ {
+ return ((ISyncGroupsOperations)operations).RefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Refreshes a hub database schema.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task RefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.RefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+ ///
+ /// Triggers a sync group synchronization.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ public static void TriggerSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ {
+ ((ISyncGroupsOperations)operations).TriggerSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Triggers a sync group synchronization.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task TriggerSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ (await operations.TriggerSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ public static SyncGroup BeginCreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
+ {
+ return ((ISyncGroupsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///