diff --git a/src/DataMigration/DataMigration.Management.Sdk/DataMigration.Management.Sdk.csproj b/src/DataMigration/DataMigration.Management.Sdk/DataMigration.Management.Sdk.csproj
new file mode 100644
index 000000000000..38b7d9713f4e
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/DataMigration.Management.Sdk.csproj
@@ -0,0 +1,13 @@
+
+
+ DataMigration
+
+
+
+ netstandard2.0
+ Microsoft.Azure.PowerShell.DataMigration.Management.Sdk
+ Microsoft.Azure.Management.DataMigration
+ $(NoWarn);CS0108;CS1573
+
+
+
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/DataMigrationServiceClient.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/DataMigrationServiceClient.cs
new file mode 100644
index 000000000000..b4abff003909
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/DataMigrationServiceClient.cs
@@ -0,0 +1,393 @@
+// 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.DataMigration
+{
+ using System.Linq;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// Data Migration Client
+ ///
+ public partial class DataMigrationServiceClient : Microsoft.Rest.ServiceClient, IDataMigrationServiceClient, 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; }
+
+ ///
+ /// Identifier of the 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 IResourceSkusOperations
+ ///
+ public virtual IResourceSkusOperations ResourceSkus { get; private set; }
+ ///
+ /// Gets the IServicesOperations
+ ///
+ public virtual IServicesOperations Services { get; private set; }
+ ///
+ /// Gets the ITasksOperations
+ ///
+ public virtual ITasksOperations Tasks { get; private set; }
+ ///
+ /// Gets the IProjectsOperations
+ ///
+ public virtual IProjectsOperations Projects { get; private set; }
+ ///
+ /// Gets the IUsagesOperations
+ ///
+ public virtual IUsagesOperations Usages { get; private set; }
+ ///
+ /// Gets the IOperations
+ ///
+ public virtual IOperations Operations { get; private set; }
+ ///
+ /// Gets the IFilesOperations
+ ///
+ public virtual IFilesOperations Files { get; private set; }
+ ///
+ /// Initializes a new instance of the DataMigrationServiceClient class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling DataMigrationServiceClient.Dispose(). False: will not dispose provided httpClient
+ protected DataMigrationServiceClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ this.Initialize();
+ }
+ ///
+ /// Initializes a new instance of the DataMigrationServiceClient class.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected DataMigrationServiceClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers)
+ {
+ this.Initialize();
+ }
+ ///
+ /// Initializes a new instance of the DataMigrationServiceClient class.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected DataMigrationServiceClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers)
+ {
+ this.Initialize();
+ }
+ ///
+ /// Initializes a new instance of the DataMigrationServiceClient 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 DataMigrationServiceClient(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 DataMigrationServiceClient 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 DataMigrationServiceClient(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 DataMigrationServiceClient 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 DataMigrationServiceClient(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 DataMigrationServiceClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling DataMigrationServiceClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public DataMigrationServiceClient(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 DataMigrationServiceClient 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 DataMigrationServiceClient(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 DataMigrationServiceClient 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 DataMigrationServiceClient(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 DataMigrationServiceClient 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.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public DataMigrationServiceClient(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.ResourceSkus = new ResourceSkusOperations(this);
+ this.Services = new ServicesOperations(this);
+ this.Tasks = new TasksOperations(this);
+ this.Projects = new ProjectsOperations(this);
+ this.Usages = new UsagesOperations(this);
+ this.Operations = new Operations(this);
+ this.Files = new FilesOperations(this);
+ this.BaseUri = new System.Uri("https://management.azure.com");
+ this.ApiVersion = "2018-07-15-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()
+ }
+ };
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("taskType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("taskType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("commandType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("commandType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("type"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("type"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resultType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resultType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resultType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resultType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resultType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resultType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resultType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resultType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resultType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resultType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resultType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resultType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resultType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resultType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resultType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resultType"));
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resultType"));
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resultType"));
+ 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/DataMigration/DataMigration.Management.Sdk/Generated/FilesOperations.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/FilesOperations.cs
new file mode 100644
index 000000000000..8331eaae7f31
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/FilesOperations.cs
@@ -0,0 +1,1837 @@
+// 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.DataMigration
+{
+ using System.Linq;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// FilesOperations operations.
+ ///
+ internal partial class FilesOperations : Microsoft.Rest.IServiceOperations, IFilesOperations
+ {
+ ///
+ /// Initializes a new instance of the FilesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal FilesOperations (DataMigrationServiceClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ this.Client = client;
+ }
+
+ ///
+ /// Gets a reference to the DataMigrationServiceClient
+ ///
+ public DataMigrationServiceClient Client { get; private set; }
+
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// 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>> ListWithHttpMessagesAsync(string groupName, string serviceName, string projectName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (groupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupName");
+ }
+
+ if (serviceName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serviceName");
+ }
+
+ if (projectName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "projectName");
+ }
+
+ 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("groupName", groupName);
+ tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("projectName", projectName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+ _url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
+ _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
+ _url = _url.Replace("{projectName}", System.Uri.EscapeDataString(projectName));
+
+ 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 ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ApiError _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;
+
+
+
+
+
+ }
+ ///
+ /// The files resource is a nested, proxy-only resource representing a file
+ /// stored under the project resource. This method retrieves information about
+ /// a file.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, string fileName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (groupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupName");
+ }
+
+ if (serviceName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serviceName");
+ }
+
+ if (projectName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "projectName");
+ }
+
+ if (fileName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fileName");
+ }
+
+ 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("groupName", groupName);
+ tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("projectName", projectName);
+ tracingParameters.Add("fileName", fileName);
+
+
+ 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/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+ _url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
+ _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
+ _url = _url.Replace("{projectName}", System.Uri.EscapeDataString(projectName));
+ _url = _url.Replace("{fileName}", System.Uri.EscapeDataString(fileName));
+
+ 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 ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ApiError _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;
+
+
+
+
+
+ }
+ ///
+ /// The PUT method creates a new file or updates an existing one.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// Information about the file
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string fileName, ProjectFile 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 (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (groupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupName");
+ }
+
+ if (serviceName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serviceName");
+ }
+
+ if (projectName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "projectName");
+ }
+
+ if (fileName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fileName");
+ }
+
+ 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("groupName", groupName);
+ tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("projectName", projectName);
+ tracingParameters.Add("fileName", fileName);
+
+ tracingParameters.Add("parameters", parameters);
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+ _url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
+ _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
+ _url = _url.Replace("{projectName}", System.Uri.EscapeDataString(projectName));
+ _url = _url.Replace("{fileName}", System.Uri.EscapeDataString(fileName));
+
+ 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)
+ {
+ var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ApiError _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);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ ///
+ /// This method deletes a file.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// 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 DeleteWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string fileName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (groupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupName");
+ }
+
+ if (serviceName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serviceName");
+ }
+
+ if (projectName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "projectName");
+ }
+
+ if (fileName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fileName");
+ }
+
+ 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("groupName", groupName);
+ tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("projectName", projectName);
+ tracingParameters.Add("fileName", fileName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+ _url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
+ _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
+ _url = _url.Replace("{projectName}", System.Uri.EscapeDataString(projectName));
+ _url = _url.Replace("{fileName}", System.Uri.EscapeDataString(fileName));
+
+ 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 != 204)
+ {
+ var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ApiError _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;
+
+
+
+
+
+ }
+ ///
+ /// This method updates an existing file.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// Information about the file
+ ///
+ ///
+ /// 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> UpdateWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string fileName, ProjectFile 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 (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (groupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupName");
+ }
+
+ if (serviceName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serviceName");
+ }
+
+ if (projectName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "projectName");
+ }
+
+ if (fileName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fileName");
+ }
+
+ 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("groupName", groupName);
+ tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("projectName", projectName);
+ tracingParameters.Add("fileName", fileName);
+
+ tracingParameters.Add("parameters", parameters);
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+ _url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
+ _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
+ _url = _url.Replace("{projectName}", System.Uri.EscapeDataString(projectName));
+ _url = _url.Replace("{fileName}", System.Uri.EscapeDataString(fileName));
+
+ 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)
+ {
+ var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ApiError _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;
+
+
+
+
+
+ }
+ ///
+ /// This method is used for requesting storage information using which contents
+ /// of the file can be downloaded.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// 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> ReadWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string fileName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (groupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupName");
+ }
+
+ if (serviceName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serviceName");
+ }
+
+ if (projectName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "projectName");
+ }
+
+ if (fileName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fileName");
+ }
+
+ 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("groupName", groupName);
+ tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("projectName", projectName);
+ tracingParameters.Add("fileName", fileName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Read", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/read").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+ _url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
+ _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
+ _url = _url.Replace("{projectName}", System.Uri.EscapeDataString(projectName));
+ _url = _url.Replace("{fileName}", System.Uri.EscapeDataString(fileName));
+
+ 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 ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ApiError _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;
+
+
+
+
+
+ }
+ ///
+ /// This method is used for requesting information for reading and writing the
+ /// file content.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// 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> ReadWriteWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string fileName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ if (groupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupName");
+ }
+
+ if (serviceName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serviceName");
+ }
+
+ if (projectName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "projectName");
+ }
+
+ if (fileName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fileName");
+ }
+
+ 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("groupName", groupName);
+ tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("projectName", projectName);
+ tracingParameters.Add("fileName", fileName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ReadWrite", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/readwrite").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
+ _url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
+ _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
+ _url = _url.Replace("{projectName}", System.Uri.EscapeDataString(projectName));
+ _url = _url.Replace("{fileName}", System.Uri.EscapeDataString(fileName));
+
+ 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 ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ApiError _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;
+
+
+
+
+
+ }
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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, "ListNext", 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 ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ApiError _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/DataMigration/DataMigration.Management.Sdk/Generated/FilesOperationsExtensions.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/FilesOperationsExtensions.cs
new file mode 100644
index 000000000000..180d17d541b4
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/FilesOperationsExtensions.cs
@@ -0,0 +1,409 @@
+// 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.DataMigration
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// Extension methods for FilesOperations
+ ///
+ public static partial class FilesOperationsExtensions
+ {
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ public static Microsoft.Rest.Azure.IPage List(this IFilesOperations operations, string groupName, string serviceName, string projectName)
+ {
+ return ((IFilesOperations)operations).ListAsync(groupName, serviceName, projectName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task> ListAsync(this IFilesOperations operations, string groupName, string serviceName, string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(groupName, serviceName, projectName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// The files resource is a nested, proxy-only resource representing a file
+ /// stored under the project resource. This method retrieves information about
+ /// a file.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ public static ProjectFile Get(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName)
+ {
+ return ((IFilesOperations)operations).GetAsync(groupName, serviceName, projectName, fileName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The files resource is a nested, proxy-only resource representing a file
+ /// stored under the project resource. This method retrieves information about
+ /// a file.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task GetAsync(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(groupName, serviceName, projectName, fileName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// The PUT method creates a new file or updates an existing one.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ public static ProjectFile CreateOrUpdate(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName, ProjectFile parameters)
+ {
+ return ((IFilesOperations)operations).CreateOrUpdateAsync(groupName, serviceName, projectName, fileName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The PUT method creates a new file or updates an existing one.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName, ProjectFile parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(groupName, serviceName, projectName, fileName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// This method deletes a file.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ public static void Delete(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName)
+ {
+ ((IFilesOperations)operations).DeleteAsync(groupName, serviceName, projectName, fileName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// This method deletes a file.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task DeleteAsync(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(groupName, serviceName, projectName, fileName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+ ///
+ /// This method updates an existing file.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ public static ProjectFile Update(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName, ProjectFile parameters)
+ {
+ return ((IFilesOperations)operations).UpdateAsync(groupName, serviceName, projectName, fileName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// This method updates an existing file.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task UpdateAsync(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName, ProjectFile parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(groupName, serviceName, projectName, fileName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// This method is used for requesting storage information using which contents
+ /// of the file can be downloaded.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ public static FileStorageInfo Read(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName)
+ {
+ return ((IFilesOperations)operations).ReadAsync(groupName, serviceName, projectName, fileName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// This method is used for requesting storage information using which contents
+ /// of the file can be downloaded.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task ReadAsync(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.ReadWithHttpMessagesAsync(groupName, serviceName, projectName, fileName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// This method is used for requesting information for reading and writing the
+ /// file content.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ public static FileStorageInfo ReadWrite(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName)
+ {
+ return ((IFilesOperations)operations).ReadWriteAsync(groupName, serviceName, projectName, fileName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// This method is used for requesting information for reading and writing the
+ /// file content.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task ReadWriteAsync(this IFilesOperations operations, string groupName, string serviceName, string projectName, string fileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.ReadWriteWithHttpMessagesAsync(groupName, serviceName, projectName, fileName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static Microsoft.Rest.Azure.IPage ListNext(this IFilesOperations operations, string nextPageLink)
+ {
+ return ((IFilesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task> ListNextAsync(this IFilesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+ }
+}
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/IDataMigrationServiceClient.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/IDataMigrationServiceClient.cs
new file mode 100644
index 000000000000..75e0ccbc8916
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/IDataMigrationServiceClient.cs
@@ -0,0 +1,107 @@
+// 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.DataMigration
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// Data Migration Client
+ ///
+ public partial interface IDataMigrationServiceClient : 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;}
+
+
+ ///
+ /// Identifier of the 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 IResourceSkusOperations
+ ///
+ IResourceSkusOperations ResourceSkus { get; }
+
+ ///
+ /// Gets the IServicesOperations
+ ///
+ IServicesOperations Services { get; }
+
+ ///
+ /// Gets the ITasksOperations
+ ///
+ ITasksOperations Tasks { get; }
+
+ ///
+ /// Gets the IProjectsOperations
+ ///
+ IProjectsOperations Projects { get; }
+
+ ///
+ /// Gets the IUsagesOperations
+ ///
+ IUsagesOperations Usages { get; }
+
+ ///
+ /// Gets the IOperations
+ ///
+ IOperations Operations { get; }
+
+ ///
+ /// Gets the IFilesOperations
+ ///
+ IFilesOperations Files { get; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/IFilesOperations.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/IFilesOperations.cs
new file mode 100644
index 000000000000..6ce293914696
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/IFilesOperations.cs
@@ -0,0 +1,276 @@
+// 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.DataMigration
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// FilesOperations operations.
+ ///
+ public partial interface IFilesOperations
+ {
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// 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>> ListWithHttpMessagesAsync(string groupName, string serviceName, string projectName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The files resource is a nested, proxy-only resource representing a file
+ /// stored under the project resource. This method retrieves information about
+ /// a file.
+ ///
+ ///
+ /// The files resource is a nested, proxy-only resource representing a file
+ /// stored under the project resource. This method retrieves information about
+ /// a file.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, string fileName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The PUT method creates a new file or updates an existing one.
+ ///
+ ///
+ /// The PUT method creates a new file or updates an existing one.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// Information about the file
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, string fileName, ProjectFile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// This method deletes a file.
+ ///
+ ///
+ /// This method deletes a file.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, string fileName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// This method updates an existing file.
+ ///
+ ///
+ /// This method updates an existing file.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// Information about the file
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, string fileName, ProjectFile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// This method is used for requesting storage information using which contents
+ /// of the file can be downloaded.
+ ///
+ ///
+ /// This method is used for requesting storage information using which contents
+ /// of the file can be downloaded.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// 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> ReadWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string fileName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// This method is used for requesting information for reading and writing the
+ /// file content.
+ ///
+ ///
+ /// This method is used for requesting information for reading and writing the
+ /// file content.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the File
+ ///
+ ///
+ /// 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> ReadWriteWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string fileName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of files owned by a project resource.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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/DataMigration/DataMigration.Management.Sdk/Generated/IOperations.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/IOperations.cs
new file mode 100644
index 000000000000..e730085cad65
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/IOperations.cs
@@ -0,0 +1,64 @@
+// 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.DataMigration
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// Lists all available actions exposed by the Database Migration Service
+ /// resource provider.
+ ///
+ ///
+ /// Lists all available actions exposed by the Database Migration Service
+ /// resource provider.
+ ///
+ ///
+ /// 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>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists all available actions exposed by the Database Migration Service
+ /// resource provider.
+ ///
+ ///
+ /// Lists all available actions exposed by the Database Migration Service
+ /// resource provider.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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/DataMigration/DataMigration.Management.Sdk/Generated/IProjectsOperations.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/IProjectsOperations.cs
new file mode 100644
index 000000000000..a1e29221d2b7
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/IProjectsOperations.cs
@@ -0,0 +1,204 @@
+// 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.DataMigration
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// ProjectsOperations operations.
+ ///
+ public partial interface IProjectsOperations
+ {
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of projects owned by a service
+ /// resource.
+ ///
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of projects owned by a service
+ /// resource.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// 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>> ListWithHttpMessagesAsync(string groupName, string serviceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. The PUT method creates a new project or updates an existing one.
+ ///
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. The PUT method creates a new project or updates an existing one.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Information about the project
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, Project parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. The GET method retrieves information about a project.
+ ///
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. The GET method retrieves information about a project.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. The DELETE method deletes a project.
+ ///
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. The DELETE method deletes a project.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Delete the resource even if it contains running tasks
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, bool? deleteRunningTasks = default(bool?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. The PATCH method updates an existing project.
+ ///
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. The PATCH method updates an existing project.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Information about the project
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, Project parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of projects owned by a service
+ /// resource.
+ ///
+ ///
+ /// The project resource is a nested resource representing a stored migration
+ /// project. This method returns a list of projects owned by a service
+ /// resource.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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/DataMigration/DataMigration.Management.Sdk/Generated/IResourceSkusOperations.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/IResourceSkusOperations.cs
new file mode 100644
index 000000000000..991da5c1a095
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/IResourceSkusOperations.cs
@@ -0,0 +1,60 @@
+// 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.DataMigration
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// ResourceSkusOperations operations.
+ ///
+ public partial interface IResourceSkusOperations
+ {
+ ///
+ /// The skus action returns the list of SKUs that DMS supports.
+ ///
+ ///
+ /// The skus action returns the list of SKUs that DMS supports.
+ ///
+ ///
+ /// 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>> ListSkusWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The skus action returns the list of SKUs that DMS supports.
+ ///
+ ///
+ /// The skus action returns the list of SKUs that DMS supports.
+ ///
+ ///
+ /// 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>> ListSkusNextWithHttpMessagesAsync(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/DataMigration/DataMigration.Management.Sdk/Generated/IServicesOperations.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/IServicesOperations.cs
new file mode 100644
index 000000000000..27f51b1bf322
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/IServicesOperations.cs
@@ -0,0 +1,638 @@
+// 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.DataMigration
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// ServicesOperations operations.
+ ///
+ public partial interface IServicesOperations
+ {
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The PUT method creates a new service or updates
+ /// an existing one. When a service is updated, existing child resources (i.e.
+ /// tasks) are unaffected. Services currently support a single kind, "vm",
+ /// which refers to a VM-based service, although other kinds may be added in
+ /// the future. This method can change the kind, SKU, and network of the
+ /// service, but if tasks are currently running (i.e. the service is busy),
+ /// this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will
+ /// reply when successful with 200 OK or 201 Created. Long-running operations
+ /// use the provisioningState property.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The PUT method creates a new service or updates
+ /// an existing one. When a service is updated, existing child resources (i.e.
+ /// tasks) are unaffected. Services currently support a single kind, "vm",
+ /// which refers to a VM-based service, although other kinds may be added in
+ /// the future. This method can change the kind, SKU, and network of the
+ /// service, but if tasks are currently running (i.e. the service is busy),
+ /// this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will
+ /// reply when successful with 200 OK or 201 Created. Long-running operations
+ /// use the provisioningState property.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Information about the service
+ ///
+ ///
+ /// 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 groupName, string serviceName, DataMigrationService parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The GET method retrieves information about a
+ /// service instance.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The GET method retrieves information about a
+ /// service instance.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// 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 groupName, string serviceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The DELETE method deletes a service. Any
+ /// running tasks will be canceled.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The DELETE method deletes a service. Any
+ /// running tasks will be canceled.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Delete the resource even if it contains running tasks
+ ///
+ ///
+ /// 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 groupName, string serviceName, bool? deleteRunningTasks = default(bool?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The PATCH method updates an existing service.
+ /// This method can change the kind, SKU, and network of the service, but if
+ /// tasks are currently running (i.e. the service is busy), this will fail with
+ /// 400 Bad Request ("ServiceIsBusy").
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The PATCH method updates an existing service.
+ /// This method can change the kind, SKU, and network of the service, but if
+ /// tasks are currently running (i.e. the service is busy), this will fail with
+ /// 400 Bad Request ("ServiceIsBusy").
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Information about the service
+ ///
+ ///
+ /// 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 groupName, string serviceName, DataMigrationService parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action performs a health check and returns
+ /// the status of the service and virtual machine size.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action performs a health check and returns
+ /// the status of the service and virtual machine size.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// 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> CheckStatusWithHttpMessagesAsync(string groupName, string serviceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action starts the service and the service
+ /// can be used for data migration.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action starts the service and the service
+ /// can be used for data migration.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task StartWithHttpMessagesAsync(string groupName, string serviceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action stops the service and the service
+ /// cannot be used for data migration. The service owner won't be billed when
+ /// the service is stopped.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action stops the service and the service
+ /// cannot be used for data migration. The service owner won't be billed when
+ /// the service is stopped.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task StopWithHttpMessagesAsync(string groupName, string serviceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The skus action returns the list of SKUs that a
+ /// service resource can be updated to.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The skus action returns the list of SKUs that a
+ /// service resource can be updated to.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// 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>> ListSkusWithHttpMessagesAsync(string groupName, string serviceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// This method checks whether a proposed nested resource name is valid and
+ /// available.
+ ///
+ ///
+ /// This method checks whether a proposed nested resource name is valid and
+ /// available.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Requested name to validate
+ ///
+ ///
+ /// 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> CheckChildrenNameAvailabilityWithHttpMessagesAsync(string groupName, string serviceName, NameAvailabilityRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The Services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of service resources
+ /// in a resource group.
+ ///
+ ///
+ /// The Services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of service resources
+ /// in a resource group.
+ ///
+ ///
+ /// Name of the resource 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>> ListByResourceGroupWithHttpMessagesAsync(string groupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of service resources
+ /// in a subscription.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of service resources
+ /// in a subscription.
+ ///
+ ///
+ /// 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>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// This method checks whether a proposed top-level resource name is valid and
+ /// available.
+ ///
+ ///
+ /// This method checks whether a proposed top-level resource name is valid and
+ /// available.
+ ///
+ ///
+ /// The Azure region of the operation
+ ///
+ ///
+ /// Requested name to validate
+ ///
+ ///
+ /// 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> CheckNameAvailabilityWithHttpMessagesAsync(string location, NameAvailabilityRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The PUT method creates a new service or updates
+ /// an existing one. When a service is updated, existing child resources (i.e.
+ /// tasks) are unaffected. Services currently support a single kind, "vm",
+ /// which refers to a VM-based service, although other kinds may be added in
+ /// the future. This method can change the kind, SKU, and network of the
+ /// service, but if tasks are currently running (i.e. the service is busy),
+ /// this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will
+ /// reply when successful with 200 OK or 201 Created. Long-running operations
+ /// use the provisioningState property.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The PUT method creates a new service or updates
+ /// an existing one. When a service is updated, existing child resources (i.e.
+ /// tasks) are unaffected. Services currently support a single kind, "vm",
+ /// which refers to a VM-based service, although other kinds may be added in
+ /// the future. This method can change the kind, SKU, and network of the
+ /// service, but if tasks are currently running (i.e. the service is busy),
+ /// this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will
+ /// reply when successful with 200 OK or 201 Created. Long-running operations
+ /// use the provisioningState property.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Information about the service
+ ///
+ ///
+ /// 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 groupName, string serviceName, DataMigrationService parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The DELETE method deletes a service. Any
+ /// running tasks will be canceled.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The DELETE method deletes a service. Any
+ /// running tasks will be canceled.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Delete the resource even if it contains running tasks
+ ///
+ ///
+ /// 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 groupName, string serviceName, bool? deleteRunningTasks = default(bool?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The PATCH method updates an existing service.
+ /// This method can change the kind, SKU, and network of the service, but if
+ /// tasks are currently running (i.e. the service is busy), this will fail with
+ /// 400 Bad Request ("ServiceIsBusy").
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The PATCH method updates an existing service.
+ /// This method can change the kind, SKU, and network of the service, but if
+ /// tasks are currently running (i.e. the service is busy), this will fail with
+ /// 400 Bad Request ("ServiceIsBusy").
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Information about the service
+ ///
+ ///
+ /// 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 groupName, string serviceName, DataMigrationService parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action starts the service and the service
+ /// can be used for data migration.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action starts the service and the service
+ /// can be used for data migration.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task BeginStartWithHttpMessagesAsync(string groupName, string serviceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action stops the service and the service
+ /// cannot be used for data migration. The service owner won't be billed when
+ /// the service is stopped.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This action stops the service and the service
+ /// cannot be used for data migration. The service owner won't be billed when
+ /// the service is stopped.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task BeginStopWithHttpMessagesAsync(string groupName, string serviceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The skus action returns the list of SKUs that a
+ /// service resource can be updated to.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. The skus action returns the list of SKUs that a
+ /// service resource can be updated to.
+ ///
+ ///
+ /// 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>> ListSkusNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The Services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of service resources
+ /// in a resource group.
+ ///
+ ///
+ /// The Services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of service resources
+ /// in a resource 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>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of service resources
+ /// in a subscription.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of service resources
+ /// in a subscription.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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/DataMigration/DataMigration.Management.Sdk/Generated/ITasksOperations.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/ITasksOperations.cs
new file mode 100644
index 000000000000..3ffb44888318
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/ITasksOperations.cs
@@ -0,0 +1,316 @@
+// 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.DataMigration
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// TasksOperations operations.
+ ///
+ public partial interface ITasksOperations
+ {
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of tasks owned by a
+ /// service resource. Some tasks may have a status of Unknown, which indicates
+ /// that an error occurred while querying the status of that task.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of tasks owned by a
+ /// service resource. Some tasks may have a status of Unknown, which indicates
+ /// that an error occurred while querying the status of that task.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Filter tasks by task type
+ ///
+ ///
+ /// 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>> ListWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string taskType = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. The PUT method creates a new task or updates
+ /// an existing one, although since tasks have no mutable custom properties,
+ /// there is little reason to update an existing one.
+ ///
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. The PUT method creates a new task or updates
+ /// an existing one, although since tasks have no mutable custom properties,
+ /// there is little reason to update an existing one.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the Task
+ ///
+ ///
+ /// Information about the task
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, string taskName, ProjectTask parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. The GET method retrieves information about a
+ /// task.
+ ///
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. The GET method retrieves information about a
+ /// task.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the Task
+ ///
+ ///
+ /// Expand the response
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, string taskName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. The DELETE method deletes a task, canceling it
+ /// first if it's running.
+ ///
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. The DELETE method deletes a task, canceling it
+ /// first if it's running.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the Task
+ ///
+ ///
+ /// Delete the resource even if it contains running tasks
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, string taskName, bool? deleteRunningTasks = default(bool?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. The PATCH method updates an existing task, but
+ /// since tasks have no mutable custom properties, there is little reason to do
+ /// so.
+ ///
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. The PATCH method updates an existing task, but
+ /// since tasks have no mutable custom properties, there is little reason to do
+ /// so.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the Task
+ ///
+ ///
+ /// Information about the task
+ ///
+ ///
+ /// 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 groupName, string serviceName, string projectName, string taskName, ProjectTask parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. This method cancels a task if it's currently
+ /// queued or running.
+ ///
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. This method cancels a task if it's currently
+ /// queued or running.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the Task
+ ///
+ ///
+ /// 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> CancelWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string taskName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. This method executes a command on a running
+ /// task.
+ ///
+ ///
+ /// The tasks resource is a nested, proxy-only resource representing work
+ /// performed by a DMS instance. This method executes a command on a running
+ /// task.
+ ///
+ ///
+ /// Name of the resource group
+ ///
+ ///
+ /// Name of the service
+ ///
+ ///
+ /// Name of the project
+ ///
+ ///
+ /// Name of the Task
+ ///
+ ///
+ /// Command to execute
+ ///
+ ///
+ /// 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> CommandWithHttpMessagesAsync(string groupName, string serviceName, string projectName, string taskName, CommandProperties parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of tasks owned by a
+ /// service resource. Some tasks may have a status of Unknown, which indicates
+ /// that an error occurred while querying the status of that task.
+ ///
+ ///
+ /// The services resource is the top-level resource that represents the
+ /// Database Migration Service. This method returns a list of tasks owned by a
+ /// service resource. Some tasks may have a status of Unknown, which indicates
+ /// that an error occurred while querying the status of that task.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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/DataMigration/DataMigration.Management.Sdk/Generated/IUsagesOperations.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/IUsagesOperations.cs
new file mode 100644
index 000000000000..c651a7e28ff1
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/IUsagesOperations.cs
@@ -0,0 +1,67 @@
+// 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.DataMigration
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// UsagesOperations operations.
+ ///
+ public partial interface IUsagesOperations
+ {
+ ///
+ /// This method returns region-specific quotas and resource usage information
+ /// for the Database Migration Service.
+ ///
+ ///
+ /// This method returns region-specific quotas and resource usage information
+ /// for the Database Migration Service.
+ ///
+ ///
+ /// The Azure region of the 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>> ListWithHttpMessagesAsync(string location, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// This method returns region-specific quotas and resource usage information
+ /// for the Database Migration Service.
+ ///
+ ///
+ /// This method returns region-specific quotas and resource usage information
+ /// for the Database Migration Service.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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/DataMigration/DataMigration.Management.Sdk/Generated/Models/ApiError.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ApiError.cs
new file mode 100644
index 000000000000..7c4541651c58
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ApiError.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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Error information.
+ ///
+ public partial class ApiError
+ {
+ ///
+ /// Initializes a new instance of the ApiError class.
+ ///
+ public ApiError()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ApiError class.
+ ///
+
+ /// Error information in OData format
+ ///
+ public ApiError(ODataError error = default(ODataError))
+
+ {
+ this.Error = error;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets error information in OData format
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "error")]
+ public ODataError Error {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ApiErrorException.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ApiErrorException.cs
new file mode 100644
index 000000000000..3a839b139a40
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ApiErrorException.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.DataMigration.Models
+{
+
+ ///
+ /// Exception thrown for an invalid response with ApiError information.
+ ///
+ public partial class ApiErrorException : 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 ApiError Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the ApiErrorException class.
+ ///
+ public ApiErrorException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ApiError class.
+ ///
+ /// The exception message.
+ public ApiErrorException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ApiError class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ApiErrorException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AuthenticationType.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AuthenticationType.cs
new file mode 100644
index 000000000000..09b8f7f0bae7
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AuthenticationType.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.DataMigration.Models
+{
+
+ ///
+ /// Defines values for AuthenticationType.
+ ///
+
+
+ public static class AuthenticationType
+ {
+ public const string None = "None";
+ public const string WindowsAuthentication = "WindowsAuthentication";
+ public const string SqlAuthentication = "SqlAuthentication";
+ public const string ActiveDirectoryIntegrated = "ActiveDirectoryIntegrated";
+ public const string ActiveDirectoryPassword = "ActiveDirectoryPassword";
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AvailableServiceSku.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AvailableServiceSku.cs
new file mode 100644
index 000000000000..25bc00b654f2
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AvailableServiceSku.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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Describes the available service SKU.
+ ///
+ public partial class AvailableServiceSku
+ {
+ ///
+ /// Initializes a new instance of the AvailableServiceSku class.
+ ///
+ public AvailableServiceSku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AvailableServiceSku class.
+ ///
+
+ /// The resource type, including the provider namespace
+ ///
+
+ /// SKU name, tier, etc.
+ ///
+
+ /// A description of the scaling capacities of the SKU
+ ///
+ public AvailableServiceSku(string resourceType = default(string), AvailableServiceSkuSku sku = default(AvailableServiceSkuSku), AvailableServiceSkuCapacity capacity = default(AvailableServiceSkuCapacity))
+
+ {
+ this.ResourceType = resourceType;
+ this.Sku = sku;
+ this.Capacity = capacity;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets the resource type, including the provider namespace
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "resourceType")]
+ public string ResourceType {get; set; }
+
+ ///
+ /// Gets or sets sKU name, tier, etc.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sku")]
+ public AvailableServiceSkuSku Sku {get; set; }
+
+ ///
+ /// Gets or sets a description of the scaling capacities of the SKU
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "capacity")]
+ public AvailableServiceSkuCapacity Capacity {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AvailableServiceSkuCapacity.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AvailableServiceSkuCapacity.cs
new file mode 100644
index 000000000000..3ef57618b4cd
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AvailableServiceSkuCapacity.cs
@@ -0,0 +1,78 @@
+// 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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// A description of the scaling capacities of the SKU
+ ///
+ public partial class AvailableServiceSkuCapacity
+ {
+ ///
+ /// Initializes a new instance of the AvailableServiceSkuCapacity class.
+ ///
+ public AvailableServiceSkuCapacity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AvailableServiceSkuCapacity class.
+ ///
+
+ /// The minimum capacity, usually 0 or 1.
+ ///
+
+ /// The maximum capacity
+ ///
+
+ /// The default capacity
+ ///
+
+ /// The scalability approach
+ /// Possible values include: 'none', 'manual', 'automatic'
+ public AvailableServiceSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? defaultProperty = default(int?), string scaleType = default(string))
+
+ {
+ this.Minimum = minimum;
+ this.Maximum = maximum;
+ this.DefaultProperty = defaultProperty;
+ this.ScaleType = scaleType;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets the minimum capacity, usually 0 or 1.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "minimum")]
+ public int? Minimum {get; set; }
+
+ ///
+ /// Gets or sets the maximum capacity
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "maximum")]
+ public int? Maximum {get; set; }
+
+ ///
+ /// Gets or sets the default capacity
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "default")]
+ public int? DefaultProperty {get; set; }
+
+ ///
+ /// Gets or sets the scalability approach Possible values include: 'none', 'manual', 'automatic'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "scaleType")]
+ public string ScaleType {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AvailableServiceSkuSku.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AvailableServiceSkuSku.cs
new file mode 100644
index 000000000000..45bf1ef55258
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AvailableServiceSkuSku.cs
@@ -0,0 +1,80 @@
+// 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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// SKU name, tier, etc.
+ ///
+ public partial class AvailableServiceSkuSku
+ {
+ ///
+ /// Initializes a new instance of the AvailableServiceSkuSku class.
+ ///
+ public AvailableServiceSkuSku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AvailableServiceSkuSku class.
+ ///
+
+ /// The name of the SKU
+ ///
+
+ /// SKU family
+ ///
+
+ /// SKU size
+ ///
+
+ /// The tier of the SKU, such as "Basic", "General Purpose", or "Business
+ /// Critical"
+ ///
+ public AvailableServiceSkuSku(string name = default(string), string family = default(string), string size = default(string), string tier = default(string))
+
+ {
+ this.Name = name;
+ this.Family = family;
+ this.Size = size;
+ this.Tier = tier;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets the name of the SKU
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "name")]
+ public string Name {get; set; }
+
+ ///
+ /// Gets or sets sKU family
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "family")]
+ public string Family {get; set; }
+
+ ///
+ /// Gets or sets sKU size
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "size")]
+ public string Size {get; set; }
+
+ ///
+ /// Gets or sets the tier of the SKU, such as "Basic", "General Purpose", or
+ /// "Business Critical"
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tier")]
+ public string Tier {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AzureActiveDirectoryApp.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AzureActiveDirectoryApp.cs
new file mode 100644
index 000000000000..4b588a921c69
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/AzureActiveDirectoryApp.cs
@@ -0,0 +1,93 @@
+// 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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Azure Active Directory Application
+ ///
+ public partial class AzureActiveDirectoryApp
+ {
+ ///
+ /// Initializes a new instance of the AzureActiveDirectoryApp class.
+ ///
+ public AzureActiveDirectoryApp()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureActiveDirectoryApp class.
+ ///
+
+ /// Application ID of the Azure Active Directory Application
+ ///
+
+ /// Key used to authenticate to the Azure Active Directory Application
+ ///
+
+ /// Tenant id of the customer
+ ///
+ public AzureActiveDirectoryApp(string applicationId, string appKey, string tenantId)
+
+ {
+ this.ApplicationId = applicationId;
+ this.AppKey = appKey;
+ this.TenantId = tenantId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets application ID of the Azure Active Directory Application
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "applicationId")]
+ public string ApplicationId {get; set; }
+
+ ///
+ /// Gets or sets key used to authenticate to the Azure Active Directory
+ /// Application
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "appKey")]
+ public string AppKey {get; set; }
+
+ ///
+ /// Gets or sets tenant id of the customer
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")]
+ public string TenantId {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.ApplicationId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ApplicationId");
+ }
+ if (this.AppKey == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AppKey");
+ }
+ if (this.TenantId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TenantId");
+ }
+
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupFileInfo.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupFileInfo.cs
new file mode 100644
index 000000000000..4f4cc4badb01
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupFileInfo.cs
@@ -0,0 +1,69 @@
+// 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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Information of the backup file
+ ///
+ public partial class BackupFileInfo
+ {
+ ///
+ /// Initializes a new instance of the BackupFileInfo class.
+ ///
+ public BackupFileInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the BackupFileInfo class.
+ ///
+
+ /// Location of the backup file in shared folder
+ ///
+
+ /// Sequence number of the backup file in the backup set
+ ///
+
+ /// Status of the backup file during migration
+ /// Possible values include: 'Arrived', 'Queued', 'Uploading', 'Uploaded',
+ /// 'Restoring', 'Restored', 'Cancelled'
+ public BackupFileInfo(string fileLocation = default(string), int? familySequenceNumber = default(int?), string status = default(string))
+
+ {
+ this.FileLocation = fileLocation;
+ this.FamilySequenceNumber = familySequenceNumber;
+ this.Status = status;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets location of the backup file in shared folder
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "fileLocation")]
+ public string FileLocation {get; set; }
+
+ ///
+ /// Gets or sets sequence number of the backup file in the backup set
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "familySequenceNumber")]
+ public int? FamilySequenceNumber {get; set; }
+
+ ///
+ /// Gets or sets status of the backup file during migration Possible values include: 'Arrived', 'Queued', 'Uploading', 'Uploaded', 'Restoring', 'Restored', 'Cancelled'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "status")]
+ public string Status {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupFileStatus.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupFileStatus.cs
new file mode 100644
index 000000000000..5e313dd56ec4
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupFileStatus.cs
@@ -0,0 +1,24 @@
+// 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.DataMigration.Models
+{
+
+ ///
+ /// Defines values for BackupFileStatus.
+ ///
+
+
+ public static class BackupFileStatus
+ {
+ public const string Arrived = "Arrived";
+ public const string Queued = "Queued";
+ public const string Uploading = "Uploading";
+ public const string Uploaded = "Uploaded";
+ public const string Restoring = "Restoring";
+ public const string Restored = "Restored";
+ public const string Cancelled = "Cancelled";
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupMode.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupMode.cs
new file mode 100644
index 000000000000..df4de3c23edf
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupMode.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.DataMigration.Models
+{
+
+ ///
+ /// Defines values for BackupMode.
+ ///
+
+
+ public static class BackupMode
+ {
+ public const string CreateBackup = "CreateBackup";
+ public const string ExistingBackup = "ExistingBackup";
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupSetInfo.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupSetInfo.cs
new file mode 100644
index 000000000000..4b7d464e9ca6
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupSetInfo.cs
@@ -0,0 +1,140 @@
+// 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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Information of backup set
+ ///
+ public partial class BackupSetInfo
+ {
+ ///
+ /// Initializes a new instance of the BackupSetInfo class.
+ ///
+ public BackupSetInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the BackupSetInfo class.
+ ///
+
+ /// Id for the set of backup files
+ ///
+
+ /// First log sequence number of the backup file
+ ///
+
+ /// Last log sequence number of the backup file
+ ///
+
+ /// Last modified time of the backup file in share location
+ ///
+
+ /// Enum of the different backup types
+ /// Possible values include: 'Database', 'TransactionLog', 'File',
+ /// 'DifferentialDatabase', 'DifferentialFile', 'Partial',
+ /// 'DifferentialPartial'
+
+ /// List of files in the backup set
+ ///
+
+ /// Name of the database to which the backup set belongs
+ ///
+
+ /// Date and time that the backup operation began
+ ///
+
+ /// Date and time that the backup operation finished
+ ///
+
+ /// Whether the backup set is restored or not
+ ///
+ public BackupSetInfo(string backupSetId = default(string), string firstLsn = default(string), string lastLsn = default(string), System.DateTimeOffset? lastModifiedTime = default(System.DateTimeOffset?), string backupType = default(string), System.Collections.Generic.IList listOfBackupFiles = default(System.Collections.Generic.IList), string databaseName = default(string), System.DateTimeOffset? backupStartDate = default(System.DateTimeOffset?), System.DateTimeOffset? backupFinishedDate = default(System.DateTimeOffset?), bool? isBackupRestored = default(bool?))
+
+ {
+ this.BackupSetId = backupSetId;
+ this.FirstLsn = firstLsn;
+ this.LastLsn = lastLsn;
+ this.LastModifiedTime = lastModifiedTime;
+ this.BackupType = backupType;
+ this.ListOfBackupFiles = listOfBackupFiles;
+ this.DatabaseName = databaseName;
+ this.BackupStartDate = backupStartDate;
+ this.BackupFinishedDate = backupFinishedDate;
+ this.IsBackupRestored = isBackupRestored;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets id for the set of backup files
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "backupSetId")]
+ public string BackupSetId {get; set; }
+
+ ///
+ /// Gets or sets first log sequence number of the backup file
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "firstLsn")]
+ public string FirstLsn {get; set; }
+
+ ///
+ /// Gets or sets last log sequence number of the backup file
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "lastLsn")]
+ public string LastLsn {get; set; }
+
+ ///
+ /// Gets or sets last modified time of the backup file in share location
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedTime")]
+ public System.DateTimeOffset? LastModifiedTime {get; set; }
+
+ ///
+ /// Gets or sets enum of the different backup types Possible values include: 'Database', 'TransactionLog', 'File', 'DifferentialDatabase', 'DifferentialFile', 'Partial', 'DifferentialPartial'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "backupType")]
+ public string BackupType {get; set; }
+
+ ///
+ /// Gets or sets list of files in the backup set
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "listOfBackupFiles")]
+ public System.Collections.Generic.IList ListOfBackupFiles {get; set; }
+
+ ///
+ /// Gets or sets name of the database to which the backup set belongs
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "databaseName")]
+ public string DatabaseName {get; set; }
+
+ ///
+ /// Gets or sets date and time that the backup operation began
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "backupStartDate")]
+ public System.DateTimeOffset? BackupStartDate {get; set; }
+
+ ///
+ /// Gets or sets date and time that the backup operation finished
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "backupFinishedDate")]
+ public System.DateTimeOffset? BackupFinishedDate {get; set; }
+
+ ///
+ /// Gets or sets whether the backup set is restored or not
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "isBackupRestored")]
+ public bool? IsBackupRestored {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupType.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupType.cs
new file mode 100644
index 000000000000..229d008bd1d6
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BackupType.cs
@@ -0,0 +1,24 @@
+// 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.DataMigration.Models
+{
+
+ ///
+ /// Defines values for BackupType.
+ ///
+
+
+ public static class BackupType
+ {
+ public const string Database = "Database";
+ public const string TransactionLog = "TransactionLog";
+ public const string File = "File";
+ public const string DifferentialDatabase = "DifferentialDatabase";
+ public const string DifferentialFile = "DifferentialFile";
+ public const string Partial = "Partial";
+ public const string DifferentialPartial = "DifferentialPartial";
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BlobShare.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BlobShare.cs
new file mode 100644
index 000000000000..48dc2c62bb43
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/BlobShare.cs
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Blob container storage information.
+ ///
+ public partial class BlobShare
+ {
+ ///
+ /// Initializes a new instance of the BlobShare class.
+ ///
+ public BlobShare()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the BlobShare class.
+ ///
+
+ /// SAS URI of Azure Storage Account Container.
+ ///
+ public BlobShare(string sasUri)
+
+ {
+ this.SasUri = sasUri;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets sAS URI of Azure Storage Account Container.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sasUri")]
+ public string SasUri {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.SasUri == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SasUri");
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/CommandProperties.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/CommandProperties.cs
new file mode 100644
index 000000000000..03c2fef94aa5
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/CommandProperties.cs
@@ -0,0 +1,61 @@
+// 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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Base class for all types of DMS command properties. If command is not
+ /// supported by current client, this object is returned.
+ ///
+ [Newtonsoft.Json.JsonObject("CommandProperties")]
+ public partial class CommandProperties
+ {
+ ///
+ /// Initializes a new instance of the CommandProperties class.
+ ///
+ public CommandProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CommandProperties class.
+ ///
+
+ /// Array of errors. This is ignored if submitted.
+ ///
+
+ /// The state of the command. This is ignored if submitted.
+ /// Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded',
+ /// 'Failed'
+ public CommandProperties(System.Collections.Generic.IList errors = default(System.Collections.Generic.IList), string state = default(string))
+
+ {
+ this.Errors = errors;
+ this.State = state;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets array of errors. This is ignored if submitted.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "errors")]
+ public System.Collections.Generic.IList Errors {get; private set; }
+
+ ///
+ /// Gets the state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "state")]
+ public string State {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/CommandState.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/CommandState.cs
new file mode 100644
index 000000000000..ae995c94f996
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/CommandState.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.DataMigration.Models
+{
+
+ ///
+ /// Defines values for CommandState.
+ ///
+
+
+ public static class CommandState
+ {
+ public const string Unknown = "Unknown";
+ public const string Accepted = "Accepted";
+ public const string Running = "Running";
+ public const string Succeeded = "Succeeded";
+ public const string Failed = "Failed";
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToMongoDbTaskProperties.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToMongoDbTaskProperties.cs
new file mode 100644
index 000000000000..11ccedea31ae
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToMongoDbTaskProperties.cs
@@ -0,0 +1,97 @@
+// 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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties for the task that validates the connection to and provides
+ /// information about a MongoDB server
+ ///
+ [Newtonsoft.Json.JsonObject("Connect.MongoDb")]
+ public partial class ConnectToMongoDbTaskProperties : ProjectTaskProperties
+ {
+ ///
+ /// Initializes a new instance of the ConnectToMongoDbTaskProperties class.
+ ///
+ public ConnectToMongoDbTaskProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectToMongoDbTaskProperties class.
+ ///
+
+ /// Array of errors. This is ignored if submitted.
+ ///
+
+ /// The state of the task. This is ignored if submitted.
+ /// Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled',
+ /// 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted'
+
+ /// Array of command properties.
+ ///
+
+ /// Key value pairs of client data to attach meta data information to task
+ ///
+
+ /// Describes a connection to a MongoDB data source
+ ///
+
+ /// An array containing a single MongoDbClusterInfo object
+ ///
+ public ConnectToMongoDbTaskProperties(System.Collections.Generic.IList errors = default(System.Collections.Generic.IList), string state = default(string), System.Collections.Generic.IList commands = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary clientData = default(System.Collections.Generic.IDictionary), MongoDbConnectionInfo input = default(MongoDbConnectionInfo), System.Collections.Generic.IList output = default(System.Collections.Generic.IList))
+
+ : base(errors, state, commands, clientData)
+ {
+ this.Input = input;
+ this.Output = output;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets describes a connection to a MongoDB data source
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "input")]
+ public MongoDbConnectionInfo Input {get; set; }
+
+ ///
+ /// Gets an array containing a single MongoDbClusterInfo object
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "output")]
+ public System.Collections.Generic.IList Output {get; private set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Input != null)
+ {
+ this.Input.Validate();
+ }
+ if (this.Output != null)
+ {
+ foreach (var element in this.Output)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceMySqlTaskInput.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceMySqlTaskInput.cs
new file mode 100644
index 000000000000..3c6258873929
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceMySqlTaskInput.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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Input for the task that validates MySQL database connection
+ ///
+ public partial class ConnectToSourceMySqlTaskInput
+ {
+ ///
+ /// Initializes a new instance of the ConnectToSourceMySqlTaskInput class.
+ ///
+ public ConnectToSourceMySqlTaskInput()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectToSourceMySqlTaskInput class.
+ ///
+
+ /// Information for connecting to MySQL source
+ ///
+
+ /// Target Platform for the migration
+ /// Possible values include: 'SqlServer', 'AzureDbForMySQL'
+
+ /// Permission group for validations
+ /// Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB',
+ /// 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL'
+ public ConnectToSourceMySqlTaskInput(MySqlConnectionInfo sourceConnectionInfo, string targetPlatform = default(string), ServerLevelPermissionsGroup? checkPermissionsGroup = default(ServerLevelPermissionsGroup?))
+
+ {
+ this.SourceConnectionInfo = sourceConnectionInfo;
+ this.TargetPlatform = targetPlatform;
+ this.CheckPermissionsGroup = checkPermissionsGroup;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets information for connecting to MySQL source
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sourceConnectionInfo")]
+ public MySqlConnectionInfo SourceConnectionInfo {get; set; }
+
+ ///
+ /// Gets or sets target Platform for the migration Possible values include: 'SqlServer', 'AzureDbForMySQL'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "targetPlatform")]
+ public string TargetPlatform {get; set; }
+
+ ///
+ /// Gets or sets permission group for validations Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "checkPermissionsGroup")]
+ public ServerLevelPermissionsGroup? CheckPermissionsGroup {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.SourceConnectionInfo == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SourceConnectionInfo");
+ }
+ if (this.SourceConnectionInfo != null)
+ {
+ this.SourceConnectionInfo.Validate();
+ }
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceMySqlTaskProperties.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceMySqlTaskProperties.cs
new file mode 100644
index 000000000000..1912c95fa01e
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceMySqlTaskProperties.cs
@@ -0,0 +1,87 @@
+// 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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties for the task that validates MySQL database connection
+ ///
+ [Newtonsoft.Json.JsonObject("ConnectToSource.MySql")]
+ public partial class ConnectToSourceMySqlTaskProperties : ProjectTaskProperties
+ {
+ ///
+ /// Initializes a new instance of the ConnectToSourceMySqlTaskProperties class.
+ ///
+ public ConnectToSourceMySqlTaskProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectToSourceMySqlTaskProperties class.
+ ///
+
+ /// Array of errors. This is ignored if submitted.
+ ///
+
+ /// The state of the task. This is ignored if submitted.
+ /// Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled',
+ /// 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted'
+
+ /// Array of command properties.
+ ///
+
+ /// Key value pairs of client data to attach meta data information to task
+ ///
+
+ /// Task input
+ ///
+
+ /// Task output. This is ignored if submitted.
+ ///
+ public ConnectToSourceMySqlTaskProperties(System.Collections.Generic.IList errors = default(System.Collections.Generic.IList), string state = default(string), System.Collections.Generic.IList commands = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary clientData = default(System.Collections.Generic.IDictionary), ConnectToSourceMySqlTaskInput input = default(ConnectToSourceMySqlTaskInput), System.Collections.Generic.IList output = default(System.Collections.Generic.IList))
+
+ : base(errors, state, commands, clientData)
+ {
+ this.Input = input;
+ this.Output = output;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets task input
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "input")]
+ public ConnectToSourceMySqlTaskInput Input {get; set; }
+
+ ///
+ /// Gets task output. This is ignored if submitted.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "output")]
+ public System.Collections.Generic.IList Output {get; private set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Input != null)
+ {
+ this.Input.Validate();
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceNonSqlTaskOutput.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceNonSqlTaskOutput.cs
new file mode 100644
index 000000000000..1b878b57546c
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceNonSqlTaskOutput.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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Output for connect to Oracle, MySQL type source
+ ///
+ public partial class ConnectToSourceNonSqlTaskOutput
+ {
+ ///
+ /// Initializes a new instance of the ConnectToSourceNonSqlTaskOutput class.
+ ///
+ public ConnectToSourceNonSqlTaskOutput()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectToSourceNonSqlTaskOutput class.
+ ///
+
+ /// Result identifier
+ ///
+
+ /// Server brand version
+ ///
+
+ /// Server properties
+ ///
+
+ /// List of databases on the server
+ ///
+
+ /// Validation errors associated with the task
+ ///
+ public ConnectToSourceNonSqlTaskOutput(string id = default(string), string sourceServerBrandVersion = default(string), ServerProperties serverProperties = default(ServerProperties), System.Collections.Generic.IList databases = default(System.Collections.Generic.IList), System.Collections.Generic.IList validationErrors = default(System.Collections.Generic.IList))
+
+ {
+ this.Id = id;
+ this.SourceServerBrandVersion = sourceServerBrandVersion;
+ this.ServerProperties = serverProperties;
+ this.Databases = databases;
+ this.ValidationErrors = validationErrors;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets result identifier
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "id")]
+ public string Id {get; private set; }
+
+ ///
+ /// Gets server brand version
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sourceServerBrandVersion")]
+ public string SourceServerBrandVersion {get; private set; }
+
+ ///
+ /// Gets server properties
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "serverProperties")]
+ public ServerProperties ServerProperties {get; private set; }
+
+ ///
+ /// Gets list of databases on the server
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "databases")]
+ public System.Collections.Generic.IList Databases {get; private set; }
+
+ ///
+ /// Gets validation errors associated with the task
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "validationErrors")]
+ public System.Collections.Generic.IList ValidationErrors {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourcePostgreSqlSyncTaskInput.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourcePostgreSqlSyncTaskInput.cs
new file mode 100644
index 000000000000..1181132dcc09
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourcePostgreSqlSyncTaskInput.cs
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Input for the task that validates connection to PostgreSQL and source
+ /// server requirements
+ ///
+ public partial class ConnectToSourcePostgreSqlSyncTaskInput
+ {
+ ///
+ /// Initializes a new instance of the ConnectToSourcePostgreSqlSyncTaskInput class.
+ ///
+ public ConnectToSourcePostgreSqlSyncTaskInput()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectToSourcePostgreSqlSyncTaskInput class.
+ ///
+
+ /// Connection information for source PostgreSQL server
+ ///
+ public ConnectToSourcePostgreSqlSyncTaskInput(PostgreSqlConnectionInfo sourceConnectionInfo)
+
+ {
+ this.SourceConnectionInfo = sourceConnectionInfo;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets connection information for source PostgreSQL server
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sourceConnectionInfo")]
+ public PostgreSqlConnectionInfo SourceConnectionInfo {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.SourceConnectionInfo == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SourceConnectionInfo");
+ }
+ if (this.SourceConnectionInfo != null)
+ {
+ this.SourceConnectionInfo.Validate();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourcePostgreSqlSyncTaskOutput.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourcePostgreSqlSyncTaskOutput.cs
new file mode 100644
index 000000000000..1b9fc759fdd7
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourcePostgreSqlSyncTaskOutput.cs
@@ -0,0 +1,89 @@
+// 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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Output for the task that validates connection to PostgreSQL and source
+ /// server requirements
+ ///
+ public partial class ConnectToSourcePostgreSqlSyncTaskOutput
+ {
+ ///
+ /// Initializes a new instance of the ConnectToSourcePostgreSqlSyncTaskOutput class.
+ ///
+ public ConnectToSourcePostgreSqlSyncTaskOutput()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectToSourcePostgreSqlSyncTaskOutput class.
+ ///
+
+ /// Result identifier
+ ///
+
+ /// Version of the source server
+ ///
+
+ /// List of databases on source server
+ ///
+
+ /// Source server brand version
+ ///
+
+ /// Validation errors associated with the task
+ ///
+ public ConnectToSourcePostgreSqlSyncTaskOutput(string id = default(string), string sourceServerVersion = default(string), System.Collections.Generic.IList databases = default(System.Collections.Generic.IList), string sourceServerBrandVersion = default(string), System.Collections.Generic.IList validationErrors = default(System.Collections.Generic.IList))
+
+ {
+ this.Id = id;
+ this.SourceServerVersion = sourceServerVersion;
+ this.Databases = databases;
+ this.SourceServerBrandVersion = sourceServerBrandVersion;
+ this.ValidationErrors = validationErrors;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets result identifier
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "id")]
+ public string Id {get; private set; }
+
+ ///
+ /// Gets version of the source server
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sourceServerVersion")]
+ public string SourceServerVersion {get; private set; }
+
+ ///
+ /// Gets list of databases on source server
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "databases")]
+ public System.Collections.Generic.IList Databases {get; private set; }
+
+ ///
+ /// Gets source server brand version
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sourceServerBrandVersion")]
+ public string SourceServerBrandVersion {get; private set; }
+
+ ///
+ /// Gets validation errors associated with the task
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "validationErrors")]
+ public System.Collections.Generic.IList ValidationErrors {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourcePostgreSqlSyncTaskProperties.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourcePostgreSqlSyncTaskProperties.cs
new file mode 100644
index 000000000000..130b5445aca1
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourcePostgreSqlSyncTaskProperties.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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties for the task that validates connection to PostgreSQL server and
+ /// source server requirements for online migration
+ ///
+ [Newtonsoft.Json.JsonObject("ConnectToSource.PostgreSql.Sync")]
+ public partial class ConnectToSourcePostgreSqlSyncTaskProperties : ProjectTaskProperties
+ {
+ ///
+ /// Initializes a new instance of the ConnectToSourcePostgreSqlSyncTaskProperties class.
+ ///
+ public ConnectToSourcePostgreSqlSyncTaskProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectToSourcePostgreSqlSyncTaskProperties class.
+ ///
+
+ /// Array of errors. This is ignored if submitted.
+ ///
+
+ /// The state of the task. This is ignored if submitted.
+ /// Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled',
+ /// 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted'
+
+ /// Array of command properties.
+ ///
+
+ /// Key value pairs of client data to attach meta data information to task
+ ///
+
+ /// Task input
+ ///
+
+ /// Task output. This is ignored if submitted.
+ ///
+ public ConnectToSourcePostgreSqlSyncTaskProperties(System.Collections.Generic.IList errors = default(System.Collections.Generic.IList), string state = default(string), System.Collections.Generic.IList commands = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary clientData = default(System.Collections.Generic.IDictionary), ConnectToSourcePostgreSqlSyncTaskInput input = default(ConnectToSourcePostgreSqlSyncTaskInput), System.Collections.Generic.IList output = default(System.Collections.Generic.IList))
+
+ : base(errors, state, commands, clientData)
+ {
+ this.Input = input;
+ this.Output = output;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets task input
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "input")]
+ public ConnectToSourcePostgreSqlSyncTaskInput Input {get; set; }
+
+ ///
+ /// Gets task output. This is ignored if submitted.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "output")]
+ public System.Collections.Generic.IList Output {get; private set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Input != null)
+ {
+ this.Input.Validate();
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceSqlServerSyncTaskProperties.cs b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceSqlServerSyncTaskProperties.cs
new file mode 100644
index 000000000000..ad81104ed9ff
--- /dev/null
+++ b/src/DataMigration/DataMigration.Management.Sdk/Generated/Models/ConnectToSourceSqlServerSyncTaskProperties.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.DataMigration.Models
+{
+ using System.Linq;
+
+ ///
+ /// Properties for the task that validates connection to SQL Server and source
+ /// server requirements for online migration
+ ///
+ [Newtonsoft.Json.JsonObject("ConnectToSource.SqlServer.Sync")]
+ public partial class ConnectToSourceSqlServerSyncTaskProperties : ProjectTaskProperties
+ {
+ ///
+ /// Initializes a new instance of the ConnectToSourceSqlServerSyncTaskProperties class.
+ ///
+ public ConnectToSourceSqlServerSyncTaskProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectToSourceSqlServerSyncTaskProperties class.
+ ///
+
+ /// Array of errors. This is ignored if submitted.
+ ///
+
+ /// The state of the task. This is ignored if submitted.
+ /// Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled',
+ /// 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted'
+
+ /// Array of command properties.
+ ///
+
+ /// Key value pairs of client data to attach meta data information to task
+ ///
+
+ /// Task input
+ ///
+
+ /// Task output. This is ignored if submitted.
+ ///
+ public ConnectToSourceSqlServerSyncTaskProperties(System.Collections.Generic.IList errors = default(System.Collections.Generic.IList), string state = default(string), System.Collections.Generic.IList commands = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary clientData = default(System.Collections.Generic.IDictionary