diff --git a/eng/mgmt/mgmtmetadata/purview_resource-manager.txt b/eng/mgmt/mgmtmetadata/purview_resource-manager.txt
new file mode 100644
index 0000000000000..68f753fa05bac
--- /dev/null
+++ b/eng/mgmt/mgmtmetadata/purview_resource-manager.txt
@@ -0,0 +1,14 @@
+Installing AutoRest version: v2
+AutoRest installed successfully.
+Commencing code generation
+Generating CSharp code
+Executing AutoRest command
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/purview/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2020-12-01-preview --csharp-sdks-folder=D:\enlist\arm\azure-sdk-for-net\sdk
+2021-02-09 01:22:48 UTC
+Azure-rest-api-specs repository information
+GitHub fork: Azure
+Branch: master
+Commit: 7d69475bd0007aa1156e6ec96882436b7b13709d
+AutoRest information
+Requested version: v2
+Bootstrapper version: autorest@2.0.4413
diff --git a/eng/pipelines/mgmt.yml b/eng/pipelines/mgmt.yml
index 1a70feec23eb9..94d588a82e92f 100644
--- a/eng/pipelines/mgmt.yml
+++ b/eng/pipelines/mgmt.yml
@@ -114,6 +114,7 @@ pr:
- sdk/postgresql/Microsoft.Azure.Management.PostgreSQL
- sdk/powerbidedicated/Microsoft.Azure.Management.PowerBIDedicated
- sdk/privatedns/Microsoft.Azure.Management.PrivateDns
+ - sdk/purview/Microsoft.Azure.Management.Purview
- sdk/quantum/Microsoft.Azure.Management.Quantum
- sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices
- sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup
diff --git a/sdk/purview/AzSdk.RP.props b/sdk/purview/AzSdk.RP.props
new file mode 100644
index 0000000000000..dd5840701bce8
--- /dev/null
+++ b/sdk/purview/AzSdk.RP.props
@@ -0,0 +1,7 @@
+
+
+
+ Purview_2020-12-01-preview;
+ $(PackageTags);$(CommonTags);$(AzureApiTag);
+
+
\ No newline at end of file
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview.sln b/sdk/purview/Microsoft.Azure.Management.Purview.sln
new file mode 100644
index 0000000000000..2e68640d4453f
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30907.101
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Purview.Tests", "Microsoft.Azure.Management.Purview\tests\Microsoft.Azure.Management.Purview.Tests.csproj", "{F4C88094-3A50-433D-A4E8-991C1C1437D9}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Purview", "Microsoft.Azure.Management.Purview\src\Microsoft.Azure.Management.Purview.csproj", "{E3EEB27E-8A0A-49BD-ACAD-44717901E489}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F4C88094-3A50-433D-A4E8-991C1C1437D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F4C88094-3A50-433D-A4E8-991C1C1437D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F4C88094-3A50-433D-A4E8-991C1C1437D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F4C88094-3A50-433D-A4E8-991C1C1437D9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E3EEB27E-8A0A-49BD-ACAD-44717901E489}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E3EEB27E-8A0A-49BD-ACAD-44717901E489}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E3EEB27E-8A0A-49BD-ACAD-44717901E489}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E3EEB27E-8A0A-49BD-ACAD-44717901E489}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {03003972-6953-4944-A994-8E239F201031}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/generate.ps1 b/sdk/purview/Microsoft.Azure.Management.Purview/generate.ps1
new file mode 100644
index 0000000000000..30832044f72d7
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/generate.ps1
@@ -0,0 +1 @@
+Start-AutoRestCodeGeneration -ResourceProvider "purview/resource-manager" -AutoRestVersion "v2"
\ No newline at end of file
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/AccountsOperations.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/AccountsOperations.cs
new file mode 100644
index 0000000000000..1ce4290bbc45e
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/AccountsOperations.cs
@@ -0,0 +1,2057 @@
+//
+// 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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// AccountsOperations operations.
+ ///
+ internal partial class AccountsOperations : IServiceOperations, IAccountsOperations
+ {
+ ///
+ /// Initializes a new instance of the AccountsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal AccountsOperations(PurviewManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the PurviewManagementClient
+ ///
+ public PurviewManagementClient Client { get; private set; }
+
+ ///
+ /// Gets the accounts resources by resource group.
+ ///
+ ///
+ /// List accounts in ResourceGroup
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The skip token.
+ ///
+ ///
+ /// 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 Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("skipToken", skipToken);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (skipToken != null)
+ {
+ _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets the accounts resources by subscription.
+ ///
+ ///
+ /// List accounts in Subscription
+ ///
+ ///
+ /// The skip token.
+ ///
+ ///
+ /// 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 Task>> ListBySubscriptionWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("skipToken", skipToken);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Purview/accounts").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (skipToken != null)
+ {
+ _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets the account resource.
+ ///
+ ///
+ /// Get an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// 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 Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (accountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("accountName", accountName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Create or update an account resource
+ ///
+ ///
+ /// Creates or updates an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, Account account, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, account, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes the account resource.
+ ///
+ ///
+ /// Deletes an account resource
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Patches the account resource.
+ ///
+ ///
+ /// Updates an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account update parameters.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, accountName, accountUpdateParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Lists the keys asynchronous.
+ ///
+ ///
+ /// List the authorization keys associated with this account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// 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 Task> ListKeysWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (accountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("accountName", accountName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListKeys", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/listkeys").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Checks the account name availability.
+ ///
+ ///
+ /// Checks if account name is available.
+ ///
+ ///
+ /// The check name availability request.
+ ///
+ ///
+ /// 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 Task> CheckNameAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityRequest checkNameAvailabilityRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (checkNameAvailabilityRequest == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "checkNameAvailabilityRequest");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("checkNameAvailabilityRequest", checkNameAvailabilityRequest);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Purview/checkNameAvailability").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(checkNameAvailabilityRequest != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(checkNameAvailabilityRequest, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Create or update an account resource
+ ///
+ ///
+ /// Creates or updates an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account.
+ ///
+ ///
+ /// 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 Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, Account account, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (accountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
+ }
+ if (account == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "account");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("accountName", accountName);
+ tracingParameters.Add("account", account);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(account != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(account, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Deletes the account resource.
+ ///
+ ///
+ /// Deletes an account resource
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// 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 Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (accountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("accountName", accountName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Patches the account resource.
+ ///
+ ///
+ /// Updates an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account update parameters.
+ ///
+ ///
+ /// 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 Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (accountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
+ }
+ if (accountUpdateParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accountUpdateParameters");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("accountName", accountName);
+ tracingParameters.Add("accountUpdateParameters", accountUpdateParameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(accountUpdateParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(accountUpdateParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 202)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets the accounts resources by resource group.
+ ///
+ ///
+ /// List accounts in ResourceGroup
+ ///
+ ///
+ /// 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 Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets the accounts resources by subscription.
+ ///
+ ///
+ /// List accounts in Subscription
+ ///
+ ///
+ /// 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 Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/AccountsOperationsExtensions.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/AccountsOperationsExtensions.cs
new file mode 100644
index 0000000000000..cce039400aa0b
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/AccountsOperationsExtensions.cs
@@ -0,0 +1,617 @@
+//
+// 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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for AccountsOperations.
+ ///
+ public static partial class AccountsOperationsExtensions
+ {
+ ///
+ /// Gets the accounts resources by resource group.
+ ///
+ ///
+ /// List accounts in ResourceGroup
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The skip token.
+ ///
+ public static IPage ListByResourceGroup(this IAccountsOperations operations, string resourceGroupName, string skipToken = default(string))
+ {
+ return operations.ListByResourceGroupAsync(resourceGroupName, skipToken).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the accounts resources by resource group.
+ ///
+ ///
+ /// List accounts in ResourceGroup
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The skip token.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupAsync(this IAccountsOperations operations, string resourceGroupName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, skipToken, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets the accounts resources by subscription.
+ ///
+ ///
+ /// List accounts in Subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The skip token.
+ ///
+ public static IPage ListBySubscription(this IAccountsOperations operations, string skipToken = default(string))
+ {
+ return operations.ListBySubscriptionAsync(skipToken).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the accounts resources by subscription.
+ ///
+ ///
+ /// List accounts in Subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The skip token.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListBySubscriptionAsync(this IAccountsOperations operations, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(skipToken, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets the account resource.
+ ///
+ ///
+ /// Get an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ public static Account Get(this IAccountsOperations operations, string resourceGroupName, string accountName)
+ {
+ return operations.GetAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the account resource.
+ ///
+ ///
+ /// Get an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or update an account resource
+ ///
+ ///
+ /// Creates or updates an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account.
+ ///
+ public static Account CreateOrUpdate(this IAccountsOperations operations, string resourceGroupName, string accountName, Account account)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, accountName, account).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update an account resource
+ ///
+ ///
+ /// Creates or updates an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, Account account, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, account, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes the account resource.
+ ///
+ ///
+ /// Deletes an account resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ public static void Delete(this IAccountsOperations operations, string resourceGroupName, string accountName)
+ {
+ operations.DeleteAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes the account resource.
+ ///
+ ///
+ /// Deletes an account resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Patches the account resource.
+ ///
+ ///
+ /// Updates an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account update parameters.
+ ///
+ public static Account Update(this IAccountsOperations operations, string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters)
+ {
+ return operations.UpdateAsync(resourceGroupName, accountName, accountUpdateParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Patches the account resource.
+ ///
+ ///
+ /// Updates an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account update parameters.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, accountUpdateParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists the keys asynchronous.
+ ///
+ ///
+ /// List the authorization keys associated with this account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ public static AccessKeys ListKeys(this IAccountsOperations operations, string resourceGroupName, string accountName)
+ {
+ return operations.ListKeysAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists the keys asynchronous.
+ ///
+ ///
+ /// List the authorization keys associated with this account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListKeysAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListKeysWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Checks the account name availability.
+ ///
+ ///
+ /// Checks if account name is available.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The check name availability request.
+ ///
+ public static CheckNameAvailabilityResult CheckNameAvailability(this IAccountsOperations operations, CheckNameAvailabilityRequest checkNameAvailabilityRequest)
+ {
+ return operations.CheckNameAvailabilityAsync(checkNameAvailabilityRequest).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Checks the account name availability.
+ ///
+ ///
+ /// Checks if account name is available.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The check name availability request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CheckNameAvailabilityAsync(this IAccountsOperations operations, CheckNameAvailabilityRequest checkNameAvailabilityRequest, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(checkNameAvailabilityRequest, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or update an account resource
+ ///
+ ///
+ /// Creates or updates an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account.
+ ///
+ public static Account BeginCreateOrUpdate(this IAccountsOperations operations, string resourceGroupName, string accountName, Account account)
+ {
+ return operations.BeginCreateOrUpdateAsync(resourceGroupName, accountName, account).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update an account resource
+ ///
+ ///
+ /// Creates or updates an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateOrUpdateAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, Account account, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, account, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes the account resource.
+ ///
+ ///
+ /// Deletes an account resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ public static void BeginDelete(this IAccountsOperations operations, string resourceGroupName, string accountName)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes the account resource.
+ ///
+ ///
+ /// Deletes an account resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Patches the account resource.
+ ///
+ ///
+ /// Updates an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account update parameters.
+ ///
+ public static Account BeginUpdate(this IAccountsOperations operations, string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters)
+ {
+ return operations.BeginUpdateAsync(resourceGroupName, accountName, accountUpdateParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Patches the account resource.
+ ///
+ ///
+ /// Updates an account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account update parameters.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginUpdateAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, accountName, accountUpdateParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets the accounts resources by resource group.
+ ///
+ ///
+ /// List accounts in ResourceGroup
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListByResourceGroupNext(this IAccountsOperations operations, string nextPageLink)
+ {
+ return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the accounts resources by resource group.
+ ///
+ ///
+ /// List accounts in ResourceGroup
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupNextAsync(this IAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets the accounts resources by subscription.
+ ///
+ ///
+ /// List accounts in Subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListBySubscriptionNext(this IAccountsOperations operations, string nextPageLink)
+ {
+ return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the accounts resources by subscription.
+ ///
+ ///
+ /// List accounts in Subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListBySubscriptionNextAsync(this IAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/DefaultAccountsOperations.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/DefaultAccountsOperations.cs
new file mode 100644
index 0000000000000..4da460e49c9fb
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/DefaultAccountsOperations.cs
@@ -0,0 +1,614 @@
+//
+// 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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// DefaultAccountsOperations operations.
+ ///
+ internal partial class DefaultAccountsOperations : IServiceOperations, IDefaultAccountsOperations
+ {
+ ///
+ /// Initializes a new instance of the DefaultAccountsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal DefaultAccountsOperations(PurviewManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the PurviewManagementClient
+ ///
+ public PurviewManagementClient Client { get; private set; }
+
+ ///
+ /// Gets the default account information set for the scope.
+ ///
+ ///
+ /// Get the default account for the scope.
+ ///
+ ///
+ /// The tenant ID.
+ ///
+ ///
+ /// The scope for the default account. Possible values include: 'Tenant',
+ /// 'Subscription'
+ ///
+ ///
+ /// The Id of the scope object, for example if the scope is "Subscription" then
+ /// it is the ID of that subscription.
+ ///
+ ///
+ /// 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 Task> GetWithHttpMessagesAsync(System.Guid scopeTenantId, string scopeType, string scope = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scopeType == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scopeType");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("scopeTenantId", scopeTenantId);
+ tracingParameters.Add("scopeType", scopeType);
+ tracingParameters.Add("scope", scope);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Purview/getDefaultAccount").ToString();
+ List _queryParameters = new List();
+ _queryParameters.Add(string.Format("scopeTenantId={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(scopeTenantId, Client.SerializationSettings).Trim('"'))));
+ if (scopeType != null)
+ {
+ _queryParameters.Add(string.Format("scopeType={0}", System.Uri.EscapeDataString(scopeType)));
+ }
+ if (scope != null)
+ {
+ _queryParameters.Add(string.Format("scope={0}", System.Uri.EscapeDataString(scope)));
+ }
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Sets the default account for the scope.
+ ///
+ ///
+ /// Set the default account for the scope.
+ ///
+ ///
+ /// The payload containing the default account information and the scope.
+ ///
+ ///
+ /// 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 Task> SetWithHttpMessagesAsync(DefaultAccountPayload defaultAccountPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (defaultAccountPayload == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "defaultAccountPayload");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("defaultAccountPayload", defaultAccountPayload);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Set", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Purview/setDefaultAccount").ToString();
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(defaultAccountPayload != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(defaultAccountPayload, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Removes the default account from the scope.
+ ///
+ ///
+ /// Remove the default account from the scope.
+ ///
+ ///
+ /// The tenant ID.
+ ///
+ ///
+ /// The scope for the default account. Possible values include: 'Tenant',
+ /// 'Subscription'
+ ///
+ ///
+ /// The Id of the scope object, for example if the scope is "Subscription" then
+ /// it is the ID of that subscription.
+ ///
+ ///
+ /// 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 Task RemoveWithHttpMessagesAsync(System.Guid scopeTenantId, string scopeType, string scope = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scopeType == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scopeType");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("scopeTenantId", scopeTenantId);
+ tracingParameters.Add("scopeType", scopeType);
+ tracingParameters.Add("scope", scope);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Remove", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Purview/removeDefaultAccount").ToString();
+ List _queryParameters = new List();
+ _queryParameters.Add(string.Format("scopeTenantId={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(scopeTenantId, Client.SerializationSettings).Trim('"'))));
+ if (scopeType != null)
+ {
+ _queryParameters.Add(string.Format("scopeType={0}", System.Uri.EscapeDataString(scopeType)));
+ }
+ if (scope != null)
+ {
+ _queryParameters.Add(string.Format("scope={0}", System.Uri.EscapeDataString(scope)));
+ }
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 204)
+ {
+ var ex = new ErrorResponseModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponseModel _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/DefaultAccountsOperationsExtensions.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/DefaultAccountsOperationsExtensions.cs
new file mode 100644
index 0000000000000..e2920cd1934b0
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/DefaultAccountsOperationsExtensions.cs
@@ -0,0 +1,174 @@
+//
+// 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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for DefaultAccountsOperations.
+ ///
+ public static partial class DefaultAccountsOperationsExtensions
+ {
+ ///
+ /// Gets the default account information set for the scope.
+ ///
+ ///
+ /// Get the default account for the scope.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The tenant ID.
+ ///
+ ///
+ /// The scope for the default account. Possible values include: 'Tenant',
+ /// 'Subscription'
+ ///
+ ///
+ /// The Id of the scope object, for example if the scope is "Subscription" then
+ /// it is the ID of that subscription.
+ ///
+ public static DefaultAccountPayload Get(this IDefaultAccountsOperations operations, System.Guid scopeTenantId, string scopeType, string scope = default(string))
+ {
+ return operations.GetAsync(scopeTenantId, scopeType, scope).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the default account information set for the scope.
+ ///
+ ///
+ /// Get the default account for the scope.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The tenant ID.
+ ///
+ ///
+ /// The scope for the default account. Possible values include: 'Tenant',
+ /// 'Subscription'
+ ///
+ ///
+ /// The Id of the scope object, for example if the scope is "Subscription" then
+ /// it is the ID of that subscription.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IDefaultAccountsOperations operations, System.Guid scopeTenantId, string scopeType, string scope = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(scopeTenantId, scopeType, scope, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Sets the default account for the scope.
+ ///
+ ///
+ /// Set the default account for the scope.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The payload containing the default account information and the scope.
+ ///
+ public static DefaultAccountPayload Set(this IDefaultAccountsOperations operations, DefaultAccountPayload defaultAccountPayload)
+ {
+ return operations.SetAsync(defaultAccountPayload).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Sets the default account for the scope.
+ ///
+ ///
+ /// Set the default account for the scope.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The payload containing the default account information and the scope.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task SetAsync(this IDefaultAccountsOperations operations, DefaultAccountPayload defaultAccountPayload, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.SetWithHttpMessagesAsync(defaultAccountPayload, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Removes the default account from the scope.
+ ///
+ ///
+ /// Remove the default account from the scope.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The tenant ID.
+ ///
+ ///
+ /// The scope for the default account. Possible values include: 'Tenant',
+ /// 'Subscription'
+ ///
+ ///
+ /// The Id of the scope object, for example if the scope is "Subscription" then
+ /// it is the ID of that subscription.
+ ///
+ public static void Remove(this IDefaultAccountsOperations operations, System.Guid scopeTenantId, string scopeType, string scope = default(string))
+ {
+ operations.RemoveAsync(scopeTenantId, scopeType, scope).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Removes the default account from the scope.
+ ///
+ ///
+ /// Remove the default account from the scope.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The tenant ID.
+ ///
+ ///
+ /// The scope for the default account. Possible values include: 'Tenant',
+ /// 'Subscription'
+ ///
+ ///
+ /// The Id of the scope object, for example if the scope is "Subscription" then
+ /// it is the ID of that subscription.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task RemoveAsync(this IDefaultAccountsOperations operations, System.Guid scopeTenantId, string scopeType, string scope = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.RemoveWithHttpMessagesAsync(scopeTenantId, scopeType, scope, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IAccountsOperations.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IAccountsOperations.cs
new file mode 100644
index 0000000000000..32739c52e72ce
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IAccountsOperations.cs
@@ -0,0 +1,385 @@
+//
+// 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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// AccountsOperations operations.
+ ///
+ public partial interface IAccountsOperations
+ {
+ ///
+ /// Gets the accounts resources by resource group.
+ ///
+ ///
+ /// List accounts in ResourceGroup
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The skip token.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the accounts resources by subscription.
+ ///
+ ///
+ /// List accounts in Subscription
+ ///
+ ///
+ /// The skip token.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListBySubscriptionWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the account resource.
+ ///
+ ///
+ /// Get an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update an account resource
+ ///
+ ///
+ /// Creates or updates an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, Account account, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the account resource.
+ ///
+ ///
+ /// Deletes an account resource
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The 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
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Patches the account resource.
+ ///
+ ///
+ /// Updates an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account update parameters.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists the keys asynchronous.
+ ///
+ ///
+ /// List the authorization keys associated with this account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> ListKeysWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Checks the account name availability.
+ ///
+ ///
+ /// Checks if account name is available.
+ ///
+ ///
+ /// The check name availability request.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CheckNameAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityRequest checkNameAvailabilityRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update an account resource
+ ///
+ ///
+ /// Creates or updates an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, Account account, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the account resource.
+ ///
+ ///
+ /// Deletes an account resource
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The 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
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Patches the account resource.
+ ///
+ ///
+ /// Updates an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The account update parameters.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the accounts resources by resource group.
+ ///
+ ///
+ /// List accounts in ResourceGroup
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the accounts resources by subscription.
+ ///
+ ///
+ /// List accounts in 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IDefaultAccountsOperations.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IDefaultAccountsOperations.cs
new file mode 100644
index 0000000000000..387922ee8224f
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IDefaultAccountsOperations.cs
@@ -0,0 +1,116 @@
+//
+// 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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// DefaultAccountsOperations operations.
+ ///
+ public partial interface IDefaultAccountsOperations
+ {
+ ///
+ /// Gets the default account information set for the scope.
+ ///
+ ///
+ /// Get the default account for the scope.
+ ///
+ ///
+ /// The tenant ID.
+ ///
+ ///
+ /// The scope for the default account. Possible values include:
+ /// 'Tenant', 'Subscription'
+ ///
+ ///
+ /// The Id of the scope object, for example if the scope is
+ /// "Subscription" then it is the ID of that 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(System.Guid scopeTenantId, string scopeType, string scope = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Sets the default account for the scope.
+ ///
+ ///
+ /// Set the default account for the scope.
+ ///
+ ///
+ /// The payload containing the default account information and the
+ /// scope.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> SetWithHttpMessagesAsync(DefaultAccountPayload defaultAccountPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Removes the default account from the scope.
+ ///
+ ///
+ /// Remove the default account from the scope.
+ ///
+ ///
+ /// The tenant ID.
+ ///
+ ///
+ /// The scope for the default account. Possible values include:
+ /// 'Tenant', 'Subscription'
+ ///
+ ///
+ /// The Id of the scope object, for example if the scope is
+ /// "Subscription" then it is the ID of that subscription.
+ ///
+ ///
+ /// The 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
+ ///
+ Task RemoveWithHttpMessagesAsync(System.Guid scopeTenantId, string scopeType, string scope = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IOperations.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IOperations.cs
new file mode 100644
index 0000000000000..9004ed0b17cc5
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IOperations.cs
@@ -0,0 +1,74 @@
+//
+// 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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// Lists the available operations
+ ///
+ ///
+ /// List of available operations
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists the available operations
+ ///
+ ///
+ /// List of available operations
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IPrivateEndpointConnectionsOperations.cs
new file mode 100644
index 0000000000000..d8842a20c699e
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IPrivateEndpointConnectionsOperations.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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateEndpointConnectionsOperations operations.
+ ///
+ public partial interface IPrivateEndpointConnectionsOperations
+ {
+ ///
+ /// Gets private endpoint connections.
+ ///
+ ///
+ /// Get private endpoint connections for account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The skip token.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets private endpoint connection information.
+ ///
+ ///
+ /// Get a private endpoint connection
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// Name of the private endpoint connection.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Approves/Rejects private endpoint connection request.
+ ///
+ ///
+ /// Create or update a private endpoint connection
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// Name of the private endpoint connection.
+ ///
+ ///
+ /// The request.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionName, PrivateEndpointConnection request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes private endpoint connection.
+ ///
+ ///
+ /// Delete a private endpoint connection
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// Name of the private endpoint connection.
+ ///
+ ///
+ /// The 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
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes private endpoint connection.
+ ///
+ ///
+ /// Delete a private endpoint connection
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// Name of the private endpoint connection.
+ ///
+ ///
+ /// The 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
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets private endpoint connections.
+ ///
+ ///
+ /// Get private endpoint connections for account
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IPrivateLinkResourcesOperations.cs
new file mode 100644
index 0000000000000..3fd4aca2eb522
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IPrivateLinkResourcesOperations.cs
@@ -0,0 +1,113 @@
+//
+// 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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateLinkResourcesOperations operations.
+ ///
+ public partial interface IPrivateLinkResourcesOperations
+ {
+ ///
+ /// Gets a list of privately linkable resources for an account.
+ ///
+ ///
+ /// Gets a list of privately linkable resources for an account
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a privately linkable resources for an account with given group
+ /// identifier.
+ ///
+ ///
+ /// Gets a privately linkable resources for an account with given group
+ /// identifier
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The name of the account.
+ ///
+ ///
+ /// The group identifier.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetByGroupIdWithHttpMessagesAsync(string resourceGroupName, string accountName, string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of privately linkable resources for an account.
+ ///
+ ///
+ /// Gets a list of privately linkable resources for an account
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IPurviewManagementClient.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IPurviewManagementClient.cs
new file mode 100644
index 0000000000000..5fc0dd92da0ff
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/IPurviewManagementClient.cs
@@ -0,0 +1,98 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+
+ ///
+ /// Creates a Microsoft.Purview management client.
+ ///
+ public partial interface IPurviewManagementClient : System.IDisposable
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ JsonSerializerSettings SerializationSettings { get; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ JsonSerializerSettings DeserializationSettings { get; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ ServiceClientCredentials Credentials { get; }
+
+ ///
+ /// The api version to use.
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// The subscription identifier
+ ///
+ 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 IAccountsOperations.
+ ///
+ IAccountsOperations Accounts { get; }
+
+ ///
+ /// Gets the IDefaultAccountsOperations.
+ ///
+ IDefaultAccountsOperations DefaultAccounts { get; }
+
+ ///
+ /// Gets the IOperations.
+ ///
+ IOperations Operations { get; }
+
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ IPrivateLinkResourcesOperations PrivateLinkResources { get; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccessKeys.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccessKeys.cs
new file mode 100644
index 0000000000000..835973afee73f
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccessKeys.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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Account access keys.
+ ///
+ public partial class AccessKeys
+ {
+ ///
+ /// Initializes a new instance of the AccessKeys class.
+ ///
+ public AccessKeys()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AccessKeys class.
+ ///
+ /// Gets or sets the primary
+ /// connection string.
+ /// Gets or sets the
+ /// secondary connection string.
+ public AccessKeys(string atlasKafkaPrimaryEndpoint = default(string), string atlasKafkaSecondaryEndpoint = default(string))
+ {
+ AtlasKafkaPrimaryEndpoint = atlasKafkaPrimaryEndpoint;
+ AtlasKafkaSecondaryEndpoint = atlasKafkaSecondaryEndpoint;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the primary connection string.
+ ///
+ [JsonProperty(PropertyName = "atlasKafkaPrimaryEndpoint")]
+ public string AtlasKafkaPrimaryEndpoint { get; set; }
+
+ ///
+ /// Gets or sets the secondary connection string.
+ ///
+ [JsonProperty(PropertyName = "atlasKafkaSecondaryEndpoint")]
+ public string AtlasKafkaSecondaryEndpoint { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Account.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Account.cs
new file mode 100644
index 0000000000000..93bdac4e5e5ca
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Account.cs
@@ -0,0 +1,160 @@
+//
+// 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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Account resource
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class Account : TrackedResource
+ {
+ ///
+ /// Initializes a new instance of the Account class.
+ ///
+ public Account()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Account class.
+ ///
+ /// Gets or sets the identifier.
+ /// Identity Info on the tracked
+ /// resource
+ /// Gets or sets the location.
+ /// Gets or sets the name.
+ /// Tags on the azure resource.
+ /// Gets or sets the type.
+ /// Cloud connectors.
+ /// External cloud identifier used as part of scanning
+ /// configuration.
+ /// Gets the time at which the entity was
+ /// created.
+ /// Gets the creator of the entity.
+ /// Gets the creators of the entity's
+ /// object id.
+ /// The URIs that are the public endpoints of
+ /// the account.
+ /// Gets or sets the friendly name.
+ /// Gets the resource identifiers of the
+ /// managed resources.
+ /// Gets the private endpoint
+ /// connections information.
+ /// Gets or sets the state of the
+ /// provisioning. Possible values include: 'Unknown', 'Creating',
+ /// 'Moving', 'Deleting', 'SoftDeleting', 'SoftDeleted', 'Failed',
+ /// 'Succeeded'
+ /// Gets or sets the public network
+ /// access. Possible values include: 'NotSpecified', 'Enabled',
+ /// 'Disabled'
+ /// Gets or sets the Sku.
+ public Account(string id = default(string), Identity identity = default(Identity), string location = default(string), string name = default(string), IDictionary tags = default(IDictionary), string type = default(string), CloudConnectors cloudConnectors = default(CloudConnectors), System.DateTime? createdAt = default(System.DateTime?), string createdBy = default(string), string createdByObjectId = default(string), AccountPropertiesEndpoints endpoints = default(AccountPropertiesEndpoints), string friendlyName = default(string), AccountPropertiesManagedResources managedResources = default(AccountPropertiesManagedResources), IList privateEndpointConnections = default(IList), string provisioningState = default(string), string publicNetworkAccess = default(string), AccountSku sku = default(AccountSku))
+ : base(id, identity, location, name, tags, type)
+ {
+ CloudConnectors = cloudConnectors;
+ CreatedAt = createdAt;
+ CreatedBy = createdBy;
+ CreatedByObjectId = createdByObjectId;
+ Endpoints = endpoints;
+ FriendlyName = friendlyName;
+ ManagedResources = managedResources;
+ PrivateEndpointConnections = privateEndpointConnections;
+ ProvisioningState = provisioningState;
+ PublicNetworkAccess = publicNetworkAccess;
+ Sku = sku;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets cloud connectors.
+ /// External cloud identifier used as part of scanning configuration.
+ ///
+ [JsonProperty(PropertyName = "properties.cloudConnectors")]
+ public CloudConnectors CloudConnectors { get; set; }
+
+ ///
+ /// Gets the time at which the entity was created.
+ ///
+ [JsonProperty(PropertyName = "properties.createdAt")]
+ public System.DateTime? CreatedAt { get; private set; }
+
+ ///
+ /// Gets the creator of the entity.
+ ///
+ [JsonProperty(PropertyName = "properties.createdBy")]
+ public string CreatedBy { get; private set; }
+
+ ///
+ /// Gets the creators of the entity's object id.
+ ///
+ [JsonProperty(PropertyName = "properties.createdByObjectId")]
+ public string CreatedByObjectId { get; private set; }
+
+ ///
+ /// Gets the URIs that are the public endpoints of the account.
+ ///
+ [JsonProperty(PropertyName = "properties.endpoints")]
+ public AccountPropertiesEndpoints Endpoints { get; private set; }
+
+ ///
+ /// Gets or sets the friendly name.
+ ///
+ [JsonProperty(PropertyName = "properties.friendlyName")]
+ public string FriendlyName { get; private set; }
+
+ ///
+ /// Gets the resource identifiers of the managed resources.
+ ///
+ [JsonProperty(PropertyName = "properties.managedResources")]
+ public AccountPropertiesManagedResources ManagedResources { get; private set; }
+
+ ///
+ /// Gets the private endpoint connections information.
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpointConnections")]
+ public IList PrivateEndpointConnections { get; private set; }
+
+ ///
+ /// Gets or sets the state of the provisioning. Possible values
+ /// include: 'Unknown', 'Creating', 'Moving', 'Deleting',
+ /// 'SoftDeleting', 'SoftDeleted', 'Failed', 'Succeeded'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets or sets the public network access. Possible values include:
+ /// 'NotSpecified', 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
+ ///
+ /// Gets or sets the Sku.
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public AccountSku Sku { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountEndpoints.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountEndpoints.cs
new file mode 100644
index 0000000000000..52a562e5bfbcc
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountEndpoints.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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The account endpoints
+ ///
+ public partial class AccountEndpoints
+ {
+ ///
+ /// Initializes a new instance of the AccountEndpoints class.
+ ///
+ public AccountEndpoints()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AccountEndpoints class.
+ ///
+ /// Gets the catalog endpoint.
+ /// Gets the guardian endpoint.
+ /// Gets the scan endpoint.
+ public AccountEndpoints(string catalog = default(string), string guardian = default(string), string scan = default(string))
+ {
+ Catalog = catalog;
+ Guardian = guardian;
+ Scan = scan;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the catalog endpoint.
+ ///
+ [JsonProperty(PropertyName = "catalog")]
+ public string Catalog { get; private set; }
+
+ ///
+ /// Gets the guardian endpoint.
+ ///
+ [JsonProperty(PropertyName = "guardian")]
+ public string Guardian { get; private set; }
+
+ ///
+ /// Gets the scan endpoint.
+ ///
+ [JsonProperty(PropertyName = "scan")]
+ public string Scan { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountPropertiesEndpoints.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountPropertiesEndpoints.cs
new file mode 100644
index 0000000000000..312179687ac21
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountPropertiesEndpoints.cs
@@ -0,0 +1,46 @@
+//
+// 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.Purview.Models
+{
+ using System.Linq;
+
+ ///
+ /// The URIs that are the public endpoints of the account.
+ ///
+ public partial class AccountPropertiesEndpoints : AccountEndpoints
+ {
+ ///
+ /// Initializes a new instance of the AccountPropertiesEndpoints class.
+ ///
+ public AccountPropertiesEndpoints()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AccountPropertiesEndpoints class.
+ ///
+ /// Gets the catalog endpoint.
+ /// Gets the guardian endpoint.
+ /// Gets the scan endpoint.
+ public AccountPropertiesEndpoints(string catalog = default(string), string guardian = default(string), string scan = default(string))
+ : base(catalog, guardian, scan)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountPropertiesManagedResources.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountPropertiesManagedResources.cs
new file mode 100644
index 0000000000000..1d4275a4a5d54
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountPropertiesManagedResources.cs
@@ -0,0 +1,52 @@
+//
+// 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.Purview.Models
+{
+ using System.Linq;
+
+ ///
+ /// Gets the resource identifiers of the managed resources.
+ ///
+ public partial class AccountPropertiesManagedResources : ManagedResources
+ {
+ ///
+ /// Initializes a new instance of the AccountPropertiesManagedResources
+ /// class.
+ ///
+ public AccountPropertiesManagedResources()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AccountPropertiesManagedResources
+ /// class.
+ ///
+ /// Gets the managed event hub
+ /// namespace resource identifier.
+ /// Gets the managed resource group
+ /// resource identifier. This resource group will host resource
+ /// dependencies for the account.
+ /// Gets the managed storage account
+ /// resource identifier.
+ public AccountPropertiesManagedResources(string eventHubNamespace = default(string), string resourceGroup = default(string), string storageAccount = default(string))
+ : base(eventHubNamespace, resourceGroup, storageAccount)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountSku.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountSku.cs
new file mode 100644
index 0000000000000..efff94937b7a0
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountSku.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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Sku
+ ///
+ public partial class AccountSku
+ {
+ ///
+ /// Initializes a new instance of the AccountSku class.
+ ///
+ public AccountSku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AccountSku class.
+ ///
+ /// Gets or sets the sku capacity. Possible
+ /// values include: 4, 16
+ /// Gets or sets the sku name. Possible values
+ /// include: 'Standard'
+ public AccountSku(int? capacity = default(int?), string name = default(string))
+ {
+ Capacity = capacity;
+ Name = name;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the sku capacity. Possible values include: 4, 16
+ ///
+ [JsonProperty(PropertyName = "capacity")]
+ public int? Capacity { get; set; }
+
+ ///
+ /// Gets or sets the sku name. Possible values include: 'Standard'
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountUpdateParameters.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountUpdateParameters.cs
new file mode 100644
index 0000000000000..82b90cb5ed619
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/AccountUpdateParameters.cs
@@ -0,0 +1,152 @@
+//
+// 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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The account update properties.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class AccountUpdateParameters
+ {
+ ///
+ /// Initializes a new instance of the AccountUpdateParameters class.
+ ///
+ public AccountUpdateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AccountUpdateParameters class.
+ ///
+ /// Cloud connectors.
+ /// External cloud identifier used as part of scanning
+ /// configuration.
+ /// Gets the time at which the entity was
+ /// created.
+ /// Gets the creator of the entity.
+ /// Gets the creators of the entity's
+ /// object id.
+ /// The URIs that are the public endpoints of
+ /// the account.
+ /// Gets or sets the friendly name.
+ /// Gets the resource identifiers of the
+ /// managed resources.
+ /// Gets the private endpoint
+ /// connections information.
+ /// Gets or sets the state of the
+ /// provisioning. Possible values include: 'Unknown', 'Creating',
+ /// 'Moving', 'Deleting', 'SoftDeleting', 'SoftDeleted', 'Failed',
+ /// 'Succeeded'
+ /// Gets or sets the public network
+ /// access. Possible values include: 'NotSpecified', 'Enabled',
+ /// 'Disabled'
+ /// Tags on the azure resource.
+ public AccountUpdateParameters(CloudConnectors cloudConnectors = default(CloudConnectors), System.DateTime? createdAt = default(System.DateTime?), string createdBy = default(string), string createdByObjectId = default(string), AccountPropertiesEndpoints endpoints = default(AccountPropertiesEndpoints), string friendlyName = default(string), AccountPropertiesManagedResources managedResources = default(AccountPropertiesManagedResources), IList privateEndpointConnections = default(IList), string provisioningState = default(string), string publicNetworkAccess = default(string), IDictionary tags = default(IDictionary))
+ {
+ CloudConnectors = cloudConnectors;
+ CreatedAt = createdAt;
+ CreatedBy = createdBy;
+ CreatedByObjectId = createdByObjectId;
+ Endpoints = endpoints;
+ FriendlyName = friendlyName;
+ ManagedResources = managedResources;
+ PrivateEndpointConnections = privateEndpointConnections;
+ ProvisioningState = provisioningState;
+ PublicNetworkAccess = publicNetworkAccess;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets cloud connectors.
+ /// External cloud identifier used as part of scanning configuration.
+ ///
+ [JsonProperty(PropertyName = "properties.cloudConnectors")]
+ public CloudConnectors CloudConnectors { get; set; }
+
+ ///
+ /// Gets the time at which the entity was created.
+ ///
+ [JsonProperty(PropertyName = "properties.createdAt")]
+ public System.DateTime? CreatedAt { get; private set; }
+
+ ///
+ /// Gets the creator of the entity.
+ ///
+ [JsonProperty(PropertyName = "properties.createdBy")]
+ public string CreatedBy { get; private set; }
+
+ ///
+ /// Gets the creators of the entity's object id.
+ ///
+ [JsonProperty(PropertyName = "properties.createdByObjectId")]
+ public string CreatedByObjectId { get; private set; }
+
+ ///
+ /// Gets the URIs that are the public endpoints of the account.
+ ///
+ [JsonProperty(PropertyName = "properties.endpoints")]
+ public AccountPropertiesEndpoints Endpoints { get; private set; }
+
+ ///
+ /// Gets or sets the friendly name.
+ ///
+ [JsonProperty(PropertyName = "properties.friendlyName")]
+ public string FriendlyName { get; private set; }
+
+ ///
+ /// Gets the resource identifiers of the managed resources.
+ ///
+ [JsonProperty(PropertyName = "properties.managedResources")]
+ public AccountPropertiesManagedResources ManagedResources { get; private set; }
+
+ ///
+ /// Gets the private endpoint connections information.
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpointConnections")]
+ public IList PrivateEndpointConnections { get; private set; }
+
+ ///
+ /// Gets or sets the state of the provisioning. Possible values
+ /// include: 'Unknown', 'Creating', 'Moving', 'Deleting',
+ /// 'SoftDeleting', 'SoftDeleted', 'Failed', 'Succeeded'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets or sets the public network access. Possible values include:
+ /// 'NotSpecified', 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
+ ///
+ /// Gets or sets tags on the azure resource.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/CheckNameAvailabilityRequest.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/CheckNameAvailabilityRequest.cs
new file mode 100644
index 0000000000000..1083626365276
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/CheckNameAvailabilityRequest.cs
@@ -0,0 +1,63 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The request payload for CheckNameAvailability API
+ ///
+ public partial class CheckNameAvailabilityRequest
+ {
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityRequest
+ /// class.
+ ///
+ public CheckNameAvailabilityRequest()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityRequest
+ /// class.
+ ///
+ /// Resource name to verify for availability
+ /// Fully qualified resource type which includes
+ /// provider namespace
+ public CheckNameAvailabilityRequest(string name = default(string), string type = default(string))
+ {
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource name to verify for availability
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets fully qualified resource type which includes provider
+ /// namespace
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/CheckNameAvailabilityResult.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/CheckNameAvailabilityResult.cs
new file mode 100644
index 0000000000000..70dbfe54bd0bb
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/CheckNameAvailabilityResult.cs
@@ -0,0 +1,72 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The response payload for CheckNameAvailability API
+ ///
+ public partial class CheckNameAvailabilityResult
+ {
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityResult
+ /// class.
+ ///
+ public CheckNameAvailabilityResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityResult
+ /// class.
+ ///
+ /// Error message
+ /// Indicates if name is valid and
+ /// available.
+ /// The reason the name is not available. Possible
+ /// values include: 'Invalid', 'AlreadyExists'
+ public CheckNameAvailabilityResult(string message = default(string), bool? nameAvailable = default(bool?), string reason = default(string))
+ {
+ Message = message;
+ NameAvailable = nameAvailable;
+ Reason = reason;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets error message
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ ///
+ /// Gets or sets indicates if name is valid and available.
+ ///
+ [JsonProperty(PropertyName = "nameAvailable")]
+ public bool? NameAvailable { get; set; }
+
+ ///
+ /// Gets or sets the reason the name is not available. Possible values
+ /// include: 'Invalid', 'AlreadyExists'
+ ///
+ [JsonProperty(PropertyName = "reason")]
+ public string Reason { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/CloudConnectors.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/CloudConnectors.cs
new file mode 100644
index 0000000000000..535269879e899
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/CloudConnectors.cs
@@ -0,0 +1,54 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Properties for configuring third party cloud connections.
+ ///
+ public partial class CloudConnectors
+ {
+ ///
+ /// Initializes a new instance of the CloudConnectors class.
+ ///
+ public CloudConnectors()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudConnectors class.
+ ///
+ /// AWS external identifier.
+ /// Configured in AWS to allow use of the role arn used for
+ /// scanning
+ public CloudConnectors(string awsExternalId = default(string))
+ {
+ AwsExternalId = awsExternalId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets AWS external identifier.
+ /// Configured in AWS to allow use of the role arn used for scanning
+ ///
+ [JsonProperty(PropertyName = "awsExternalId")]
+ public string AwsExternalId { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DefaultAccountPayload.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DefaultAccountPayload.cs
new file mode 100644
index 0000000000000..33774785b52e1
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DefaultAccountPayload.cs
@@ -0,0 +1,100 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Payload to get and set the default account in the given scope
+ ///
+ public partial class DefaultAccountPayload
+ {
+ ///
+ /// Initializes a new instance of the DefaultAccountPayload class.
+ ///
+ public DefaultAccountPayload()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DefaultAccountPayload class.
+ ///
+ /// The name of the account that is set as
+ /// the default.
+ /// The resource group name of the
+ /// account that is set as the default.
+ /// The scope object ID. For example, sub ID or
+ /// tenant ID.
+ /// The scope tenant in which the default
+ /// account is set.
+ /// The scope where the default account is set.
+ /// Possible values include: 'Tenant', 'Subscription'
+ /// The subscription ID of the account
+ /// that is set as the default.
+ public DefaultAccountPayload(string accountName = default(string), string resourceGroupName = default(string), string scope = default(string), string scopeTenantId = default(string), string scopeType = default(string), string subscriptionId = default(string))
+ {
+ AccountName = accountName;
+ ResourceGroupName = resourceGroupName;
+ Scope = scope;
+ ScopeTenantId = scopeTenantId;
+ ScopeType = scopeType;
+ SubscriptionId = subscriptionId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the account that is set as the default.
+ ///
+ [JsonProperty(PropertyName = "accountName")]
+ public string AccountName { get; set; }
+
+ ///
+ /// Gets or sets the resource group name of the account that is set as
+ /// the default.
+ ///
+ [JsonProperty(PropertyName = "resourceGroupName")]
+ public string ResourceGroupName { get; set; }
+
+ ///
+ /// Gets or sets the scope object ID. For example, sub ID or tenant ID.
+ ///
+ [JsonProperty(PropertyName = "scope")]
+ public string Scope { get; set; }
+
+ ///
+ /// Gets or sets the scope tenant in which the default account is set.
+ ///
+ [JsonProperty(PropertyName = "scopeTenantId")]
+ public string ScopeTenantId { get; set; }
+
+ ///
+ /// Gets or sets the scope where the default account is set. Possible
+ /// values include: 'Tenant', 'Subscription'
+ ///
+ [JsonProperty(PropertyName = "scopeType")]
+ public string ScopeType { get; set; }
+
+ ///
+ /// Gets or sets the subscription ID of the account that is set as the
+ /// default.
+ ///
+ [JsonProperty(PropertyName = "subscriptionId")]
+ public string SubscriptionId { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DeletedAccount.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DeletedAccount.cs
new file mode 100644
index 0000000000000..fde798bc68e1e
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DeletedAccount.cs
@@ -0,0 +1,104 @@
+//
+// 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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Soft Deleted Account resource
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class DeletedAccount : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the DeletedAccount class.
+ ///
+ public DeletedAccount()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DeletedAccount class.
+ ///
+ /// Gets or sets the identifier.
+ /// Gets or sets the name.
+ /// Gets or sets the type.
+ /// Gets the account identifier associated with
+ /// resource.
+ /// Gets the user identifier that deleted
+ /// resource.
+ /// Gets the time at which the resource was
+ /// soft deleted.
+ /// Gets the resource location.
+ /// Gets the scheduled purge
+ /// datetime.
+ /// Gets the account tags.
+ public DeletedAccount(string id = default(string), string name = default(string), string type = default(string), string accountId = default(string), string deletedBy = default(string), System.DateTime? deletionDate = default(System.DateTime?), string location = default(string), System.DateTime? scheduledPurgeDate = default(System.DateTime?), IDictionary tags = default(IDictionary))
+ : base(id, name, type)
+ {
+ AccountId = accountId;
+ DeletedBy = deletedBy;
+ DeletionDate = deletionDate;
+ Location = location;
+ ScheduledPurgeDate = scheduledPurgeDate;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the account identifier associated with resource.
+ ///
+ [JsonProperty(PropertyName = "properties.accountId")]
+ public string AccountId { get; private set; }
+
+ ///
+ /// Gets the user identifier that deleted resource.
+ ///
+ [JsonProperty(PropertyName = "properties.deletedBy")]
+ public string DeletedBy { get; private set; }
+
+ ///
+ /// Gets the time at which the resource was soft deleted.
+ ///
+ [JsonProperty(PropertyName = "properties.deletionDate")]
+ public System.DateTime? DeletionDate { get; private set; }
+
+ ///
+ /// Gets the resource location.
+ ///
+ [JsonProperty(PropertyName = "properties.location")]
+ public string Location { get; private set; }
+
+ ///
+ /// Gets the scheduled purge datetime.
+ ///
+ [JsonProperty(PropertyName = "properties.scheduledPurgeDate")]
+ public System.DateTime? ScheduledPurgeDate { get; private set; }
+
+ ///
+ /// Gets the account tags.
+ ///
+ [JsonProperty(PropertyName = "properties.tags")]
+ public IDictionary Tags { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DeletedAccountList.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DeletedAccountList.cs
new file mode 100644
index 0000000000000..6fe8451d258cf
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DeletedAccountList.cs
@@ -0,0 +1,83 @@
+//
+// 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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Paged list of soft deleted account resources
+ ///
+ public partial class DeletedAccountList
+ {
+ ///
+ /// Initializes a new instance of the DeletedAccountList class.
+ ///
+ public DeletedAccountList()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DeletedAccountList class.
+ ///
+ /// Collection of items of type results.
+ /// Total item count.
+ /// The Url of next result page.
+ public DeletedAccountList(IList value, long? count = default(long?), string nextLink = default(string))
+ {
+ Count = count;
+ NextLink = nextLink;
+ Value = value;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets total item count.
+ ///
+ [JsonProperty(PropertyName = "count")]
+ public long? Count { get; set; }
+
+ ///
+ /// Gets or sets the Url of next result page.
+ ///
+ [JsonProperty(PropertyName = "nextLink")]
+ public string NextLink { get; set; }
+
+ ///
+ /// Gets or sets collection of items of type results.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Value == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Value");
+ }
+ }
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DeletedAccountPropertiesModel.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DeletedAccountPropertiesModel.cs
new file mode 100644
index 0000000000000..93ffef55515bd
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DeletedAccountPropertiesModel.cs
@@ -0,0 +1,99 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The soft deleted account properties
+ ///
+ public partial class DeletedAccountPropertiesModel
+ {
+ ///
+ /// Initializes a new instance of the DeletedAccountPropertiesModel
+ /// class.
+ ///
+ public DeletedAccountPropertiesModel()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DeletedAccountPropertiesModel
+ /// class.
+ ///
+ /// Gets the account identifier associated with
+ /// resource.
+ /// Gets the user identifier that deleted
+ /// resource.
+ /// Gets the time at which the resource was
+ /// soft deleted.
+ /// Gets the resource location.
+ /// Gets the scheduled purge
+ /// datetime.
+ /// Gets the account tags.
+ public DeletedAccountPropertiesModel(string accountId = default(string), string deletedBy = default(string), System.DateTime? deletionDate = default(System.DateTime?), string location = default(string), System.DateTime? scheduledPurgeDate = default(System.DateTime?), IDictionary tags = default(IDictionary))
+ {
+ AccountId = accountId;
+ DeletedBy = deletedBy;
+ DeletionDate = deletionDate;
+ Location = location;
+ ScheduledPurgeDate = scheduledPurgeDate;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the account identifier associated with resource.
+ ///
+ [JsonProperty(PropertyName = "accountId")]
+ public string AccountId { get; private set; }
+
+ ///
+ /// Gets the user identifier that deleted resource.
+ ///
+ [JsonProperty(PropertyName = "deletedBy")]
+ public string DeletedBy { get; private set; }
+
+ ///
+ /// Gets the time at which the resource was soft deleted.
+ ///
+ [JsonProperty(PropertyName = "deletionDate")]
+ public System.DateTime? DeletionDate { get; private set; }
+
+ ///
+ /// Gets the resource location.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; private set; }
+
+ ///
+ /// Gets the scheduled purge datetime.
+ ///
+ [JsonProperty(PropertyName = "scheduledPurgeDate")]
+ public System.DateTime? ScheduledPurgeDate { get; private set; }
+
+ ///
+ /// Gets the account tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DimensionProperties.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DimensionProperties.cs
new file mode 100644
index 0000000000000..70be961f5170e
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/DimensionProperties.cs
@@ -0,0 +1,71 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// properties for dimension
+ ///
+ public partial class DimensionProperties
+ {
+ ///
+ /// Initializes a new instance of the DimensionProperties class.
+ ///
+ public DimensionProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DimensionProperties class.
+ ///
+ /// localized display name of the dimension
+ /// to customer
+ /// dimension name
+ /// flag indicating whether this
+ /// dimension should be included to the customer in Azure Monitor logs
+ /// (aka Shoebox)
+ public DimensionProperties(string displayName = default(string), string name = default(string), bool? toBeExportedForCustomer = default(bool?))
+ {
+ DisplayName = displayName;
+ Name = name;
+ ToBeExportedForCustomer = toBeExportedForCustomer;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets localized display name of the dimension to customer
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ ///
+ /// Gets or sets dimension name
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets flag indicating whether this dimension should be
+ /// included to the customer in Azure Monitor logs (aka Shoebox)
+ ///
+ [JsonProperty(PropertyName = "toBeExportedForCustomer")]
+ public bool? ToBeExportedForCustomer { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorModel.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorModel.cs
new file mode 100644
index 0000000000000..7047bdb5a6859
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorModel.cs
@@ -0,0 +1,77 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Default error model
+ ///
+ public partial class ErrorModel
+ {
+ ///
+ /// Initializes a new instance of the ErrorModel class.
+ ///
+ public ErrorModel()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorModel class.
+ ///
+ /// Gets or sets the code.
+ /// Gets or sets the details.
+ /// Gets or sets the messages.
+ /// Gets or sets the target.
+ public ErrorModel(string code = default(string), IList details = default(IList), string message = default(string), string target = default(string))
+ {
+ Code = code;
+ Details = details;
+ Message = message;
+ Target = target;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the code.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; private set; }
+
+ ///
+ /// Gets or sets the details.
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public IList Details { get; private set; }
+
+ ///
+ /// Gets or sets the messages.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; private set; }
+
+ ///
+ /// Gets or sets the target.
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorResponseModel.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorResponseModel.cs
new file mode 100644
index 0000000000000..982d90d68d048
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorResponseModel.cs
@@ -0,0 +1,51 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Default error response model
+ ///
+ public partial class ErrorResponseModel
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponseModel class.
+ ///
+ public ErrorResponseModel()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseModel class.
+ ///
+ /// Gets or sets the error.
+ public ErrorResponseModel(ErrorResponseModelError error = default(ErrorResponseModelError))
+ {
+ Error = error;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the error.
+ ///
+ [JsonProperty(PropertyName = "error")]
+ public ErrorResponseModelError Error { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorResponseModelError.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorResponseModelError.cs
new file mode 100644
index 0000000000000..18e1116de34f6
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorResponseModelError.cs
@@ -0,0 +1,49 @@
+//
+// 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.Purview.Models
+{
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Gets or sets the error.
+ ///
+ public partial class ErrorResponseModelError : ErrorModel
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponseModelError class.
+ ///
+ public ErrorResponseModelError()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseModelError class.
+ ///
+ /// Gets or sets the code.
+ /// Gets or sets the details.
+ /// Gets or sets the messages.
+ /// Gets or sets the target.
+ public ErrorResponseModelError(string code = default(string), IList details = default(IList), string message = default(string), string target = default(string))
+ : base(code, details, message, target)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorResponseModelException.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorResponseModelException.cs
new file mode 100644
index 0000000000000..e0b2e4de9267d
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ErrorResponseModelException.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.Purview.Models
+{
+ using Microsoft.Rest;
+
+ ///
+ /// Exception thrown for an invalid response with ErrorResponseModel
+ /// information.
+ ///
+ public partial class ErrorResponseModelException : RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public ErrorResponseModel Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseModelException class.
+ ///
+ public ErrorResponseModelException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseModelException class.
+ ///
+ /// The exception message.
+ public ErrorResponseModelException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseModelException class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ErrorResponseModelException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Identity.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Identity.cs
new file mode 100644
index 0000000000000..8ede79c0f64d3
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Identity.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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Managed Identity of the resource
+ ///
+ public partial class Identity
+ {
+ ///
+ /// Initializes a new instance of the Identity class.
+ ///
+ public Identity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Identity class.
+ ///
+ /// Service principal object Id
+ /// Tenant Id
+ /// Identity Type. Possible values include:
+ /// 'SystemAssigned'
+ public Identity(string principalId = default(string), string tenantId = default(string), string type = default(string))
+ {
+ PrincipalId = principalId;
+ TenantId = tenantId;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets service principal object Id
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public string PrincipalId { get; private set; }
+
+ ///
+ /// Gets tenant Id
+ ///
+ [JsonProperty(PropertyName = "tenantId")]
+ public string TenantId { get; private set; }
+
+ ///
+ /// Gets or sets identity Type. Possible values include:
+ /// 'SystemAssigned'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ManagedResources.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ManagedResources.cs
new file mode 100644
index 0000000000000..5398e1d9fc61d
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ManagedResources.cs
@@ -0,0 +1,72 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The managed resources in customer subscription.
+ ///
+ public partial class ManagedResources
+ {
+ ///
+ /// Initializes a new instance of the ManagedResources class.
+ ///
+ public ManagedResources()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ManagedResources class.
+ ///
+ /// Gets the managed event hub
+ /// namespace resource identifier.
+ /// Gets the managed resource group
+ /// resource identifier. This resource group will host resource
+ /// dependencies for the account.
+ /// Gets the managed storage account
+ /// resource identifier.
+ public ManagedResources(string eventHubNamespace = default(string), string resourceGroup = default(string), string storageAccount = default(string))
+ {
+ EventHubNamespace = eventHubNamespace;
+ ResourceGroup = resourceGroup;
+ StorageAccount = storageAccount;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the managed event hub namespace resource identifier.
+ ///
+ [JsonProperty(PropertyName = "eventHubNamespace")]
+ public string EventHubNamespace { get; private set; }
+
+ ///
+ /// Gets the managed resource group resource identifier. This resource
+ /// group will host resource dependencies for the account.
+ ///
+ [JsonProperty(PropertyName = "resourceGroup")]
+ public string ResourceGroup { get; private set; }
+
+ ///
+ /// Gets the managed storage account resource identifier.
+ ///
+ [JsonProperty(PropertyName = "storageAccount")]
+ public string StorageAccount { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Name.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Name.cs
new file mode 100644
index 0000000000000..0ba70f8be55f4
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Name.cs
@@ -0,0 +1,21 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Purview.Models
+{
+
+ ///
+ /// Defines values for Name.
+ ///
+ public static class Name
+ {
+ public const string Standard = "Standard";
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Operation.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Operation.cs
new file mode 100644
index 0000000000000..58d2f211296ea
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Operation.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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Operation resource
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class Operation
+ {
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ public Operation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ /// Properties on the operation
+ /// Whether operation is a data
+ /// action
+ /// Operation name for display purposes
+ /// origin of the operation
+ /// meta service
+ /// specification
+ public Operation(OperationDisplay display = default(OperationDisplay), bool? isDataAction = default(bool?), string name = default(string), string origin = default(string), OperationMetaServiceSpecification serviceSpecification = default(OperationMetaServiceSpecification))
+ {
+ Display = display;
+ IsDataAction = isDataAction;
+ Name = name;
+ Origin = origin;
+ ServiceSpecification = serviceSpecification;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets properties on the operation
+ ///
+ [JsonProperty(PropertyName = "display")]
+ public OperationDisplay Display { get; set; }
+
+ ///
+ /// Gets or sets whether operation is a data action
+ ///
+ [JsonProperty(PropertyName = "isDataAction")]
+ public bool? IsDataAction { get; set; }
+
+ ///
+ /// Gets or sets operation name for display purposes
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets origin of the operation
+ ///
+ [JsonProperty(PropertyName = "origin")]
+ public string Origin { get; set; }
+
+ ///
+ /// Gets or sets meta service specification
+ ///
+ [JsonProperty(PropertyName = "properties.serviceSpecification")]
+ public OperationMetaServiceSpecification ServiceSpecification { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationDisplay.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationDisplay.cs
new file mode 100644
index 0000000000000..f844b1adb8abd
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationDisplay.cs
@@ -0,0 +1,79 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The response model for get operation properties
+ ///
+ public partial class OperationDisplay
+ {
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ public OperationDisplay()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ /// Description of the operation for display
+ /// purposes
+ /// Name of the operation for display
+ /// purposes
+ /// Name of the provider for display
+ /// purposes
+ /// Name of the resource type for display
+ /// purposes
+ public OperationDisplay(string description = default(string), string operation = default(string), string provider = default(string), string resource = default(string))
+ {
+ Description = description;
+ Operation = operation;
+ Provider = provider;
+ Resource = resource;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets description of the operation for display purposes
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ ///
+ /// Gets or sets name of the operation for display purposes
+ ///
+ [JsonProperty(PropertyName = "operation")]
+ public string Operation { get; set; }
+
+ ///
+ /// Gets or sets name of the provider for display purposes
+ ///
+ [JsonProperty(PropertyName = "provider")]
+ public string Provider { get; set; }
+
+ ///
+ /// Gets or sets name of the resource type for display purposes
+ ///
+ [JsonProperty(PropertyName = "resource")]
+ public string Resource { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationMetaLogSpecification.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationMetaLogSpecification.cs
new file mode 100644
index 0000000000000..a71d6ec0798aa
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationMetaLogSpecification.cs
@@ -0,0 +1,70 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// log specifications for operation api
+ ///
+ public partial class OperationMetaLogSpecification
+ {
+ ///
+ /// Initializes a new instance of the OperationMetaLogSpecification
+ /// class.
+ ///
+ public OperationMetaLogSpecification()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationMetaLogSpecification
+ /// class.
+ ///
+ /// blob duration of the log
+ /// localized name of the log
+ /// category
+ /// name of the log category
+ public OperationMetaLogSpecification(string blobDuration = default(string), string displayName = default(string), string name = default(string))
+ {
+ BlobDuration = blobDuration;
+ DisplayName = displayName;
+ Name = name;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets blob duration of the log
+ ///
+ [JsonProperty(PropertyName = "blobDuration")]
+ public string BlobDuration { get; set; }
+
+ ///
+ /// Gets or sets localized name of the log category
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ ///
+ /// Gets or sets name of the log category
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationMetaMetricSpecification.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationMetaMetricSpecification.cs
new file mode 100644
index 0000000000000..70d3b215657ef
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationMetaMetricSpecification.cs
@@ -0,0 +1,152 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// metric specifications for the operation
+ ///
+ public partial class OperationMetaMetricSpecification
+ {
+ ///
+ /// Initializes a new instance of the OperationMetaMetricSpecification
+ /// class.
+ ///
+ public OperationMetaMetricSpecification()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationMetaMetricSpecification
+ /// class.
+ ///
+ /// aggregation type of metric
+ /// properties for dimension
+ /// description of the metric
+ /// localized name of the metric
+ /// enable regional mdm
+ /// account
+ /// internal metric name
+ /// name of the metric
+ /// dimension name use to
+ /// replace resource id if specified
+ /// Metric namespace.
+ /// Only set the namespace if different from the default value,
+ /// leaving it empty makes it use the value from the ARM
+ /// manifest.
+ /// supported aggregation
+ /// types
+ /// supported time grain
+ /// types
+ /// units for the metric
+ public OperationMetaMetricSpecification(string aggregationType = default(string), IList dimensions = default(IList), string displayDescription = default(string), string displayName = default(string), string enableRegionalMdmAccount = default(string), string internalMetricName = default(string), string name = default(string), string resourceIdDimensionNameOverride = default(string), string sourceMdmNamespace = default(string), IList supportedAggregationTypes = default(IList), IList supportedTimeGrainTypes = default(IList), string unit = default(string))
+ {
+ AggregationType = aggregationType;
+ Dimensions = dimensions;
+ DisplayDescription = displayDescription;
+ DisplayName = displayName;
+ EnableRegionalMdmAccount = enableRegionalMdmAccount;
+ InternalMetricName = internalMetricName;
+ Name = name;
+ ResourceIdDimensionNameOverride = resourceIdDimensionNameOverride;
+ SourceMdmNamespace = sourceMdmNamespace;
+ SupportedAggregationTypes = supportedAggregationTypes;
+ SupportedTimeGrainTypes = supportedTimeGrainTypes;
+ Unit = unit;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets aggregation type of metric
+ ///
+ [JsonProperty(PropertyName = "aggregationType")]
+ public string AggregationType { get; set; }
+
+ ///
+ /// Gets or sets properties for dimension
+ ///
+ [JsonProperty(PropertyName = "dimensions")]
+ public IList Dimensions { get; set; }
+
+ ///
+ /// Gets or sets description of the metric
+ ///
+ [JsonProperty(PropertyName = "displayDescription")]
+ public string DisplayDescription { get; set; }
+
+ ///
+ /// Gets or sets localized name of the metric
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ ///
+ /// Gets or sets enable regional mdm account
+ ///
+ [JsonProperty(PropertyName = "enableRegionalMdmAccount")]
+ public string EnableRegionalMdmAccount { get; set; }
+
+ ///
+ /// Gets or sets internal metric name
+ ///
+ [JsonProperty(PropertyName = "internalMetricName")]
+ public string InternalMetricName { get; set; }
+
+ ///
+ /// Gets or sets name of the metric
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets dimension name use to replace resource id if specified
+ ///
+ [JsonProperty(PropertyName = "resourceIdDimensionNameOverride")]
+ public string ResourceIdDimensionNameOverride { get; set; }
+
+ ///
+ /// Gets or sets metric namespace.
+ /// Only set the namespace if different from the default value,
+ /// leaving it empty makes it use the value from the ARM manifest.
+ ///
+ [JsonProperty(PropertyName = "sourceMdmNamespace")]
+ public string SourceMdmNamespace { get; set; }
+
+ ///
+ /// Gets or sets supported aggregation types
+ ///
+ [JsonProperty(PropertyName = "supportedAggregationTypes")]
+ public IList SupportedAggregationTypes { get; set; }
+
+ ///
+ /// Gets or sets supported time grain types
+ ///
+ [JsonProperty(PropertyName = "supportedTimeGrainTypes")]
+ public IList SupportedTimeGrainTypes { get; set; }
+
+ ///
+ /// Gets or sets units for the metric
+ ///
+ [JsonProperty(PropertyName = "unit")]
+ public string Unit { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationMetaServiceSpecification.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationMetaServiceSpecification.cs
new file mode 100644
index 0000000000000..35b3fd2d2dce7
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/OperationMetaServiceSpecification.cs
@@ -0,0 +1,65 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The operation meta service specification
+ ///
+ public partial class OperationMetaServiceSpecification
+ {
+ ///
+ /// Initializes a new instance of the OperationMetaServiceSpecification
+ /// class.
+ ///
+ public OperationMetaServiceSpecification()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationMetaServiceSpecification
+ /// class.
+ ///
+ /// log specifications for the
+ /// operation
+ /// metric specifications for the
+ /// operation
+ public OperationMetaServiceSpecification(IList logSpecifications = default(IList), IList metricSpecifications = default(IList))
+ {
+ LogSpecifications = logSpecifications;
+ MetricSpecifications = metricSpecifications;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets log specifications for the operation
+ ///
+ [JsonProperty(PropertyName = "logSpecifications")]
+ public IList LogSpecifications { get; set; }
+
+ ///
+ /// Gets or sets metric specifications for the operation
+ ///
+ [JsonProperty(PropertyName = "metricSpecifications")]
+ public IList MetricSpecifications { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Page.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Page.cs
new file mode 100644
index 0000000000000..f1932c95636da
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Page.cs
@@ -0,0 +1,53 @@
+//
+// 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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [JsonObject]
+ public class Page : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("nextLink")]
+ public string NextPageLink { get; private set; }
+
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public IEnumerator GetEnumerator()
+ {
+ return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateEndpoint.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateEndpoint.cs
new file mode 100644
index 0000000000000..2c835f7f0f76f
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateEndpoint.cs
@@ -0,0 +1,51 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A private endpoint class.
+ ///
+ public partial class PrivateEndpoint
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpoint class.
+ ///
+ public PrivateEndpoint()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpoint class.
+ ///
+ /// The private endpoint identifier.
+ public PrivateEndpoint(string id = default(string))
+ {
+ Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the private endpoint identifier.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateEndpointConnection.cs
new file mode 100644
index 0000000000000..99b964ae9d7be
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateEndpointConnection.cs
@@ -0,0 +1,76 @@
+//
+// 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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A private endpoint connection class.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PrivateEndpointConnection : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ public PrivateEndpointConnection()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ /// Gets or sets the identifier.
+ /// Gets or sets the name.
+ /// Gets or sets the type.
+ /// The private endpoint
+ /// information.
+ /// The private link
+ /// service connection state.
+ /// The provisioning state.
+ public PrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState), string provisioningState = default(string))
+ : base(id, name, type)
+ {
+ PrivateEndpoint = privateEndpoint;
+ PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the private endpoint information.
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpoint")]
+ public PrivateEndpoint PrivateEndpoint { get; set; }
+
+ ///
+ /// Gets or sets the private link service connection state.
+ ///
+ [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")]
+ public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
+
+ ///
+ /// Gets the provisioning state.
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateLinkResource.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateLinkResource.cs
new file mode 100644
index 0000000000000..d1ed7cc167c87
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateLinkResource.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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A privately linkable resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PrivateLinkResource : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkResource class.
+ ///
+ public PrivateLinkResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkResource class.
+ ///
+ /// Gets or sets the identifier.
+ /// Gets or sets the name.
+ /// Gets or sets the type.
+ /// The private link resource group
+ /// identifier.
+ /// This translates to how many Private
+ /// IPs should be created for each privately linkable resource.
+ /// The required zone names for private
+ /// link resource.
+ public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList))
+ : base(id, name, type)
+ {
+ GroupId = groupId;
+ RequiredMembers = requiredMembers;
+ RequiredZoneNames = requiredZoneNames;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the private link resource group identifier.
+ ///
+ [JsonProperty(PropertyName = "properties.groupId")]
+ public string GroupId { get; private set; }
+
+ ///
+ /// Gets this translates to how many Private IPs should be created for
+ /// each privately linkable resource.
+ ///
+ [JsonProperty(PropertyName = "properties.requiredMembers")]
+ public IList RequiredMembers { get; private set; }
+
+ ///
+ /// Gets the required zone names for private link resource.
+ ///
+ [JsonProperty(PropertyName = "properties.requiredZoneNames")]
+ public IList RequiredZoneNames { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateLinkServiceConnectionState.cs
new file mode 100644
index 0000000000000..c14bed5ce5d7d
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PrivateLinkServiceConnectionState.cs
@@ -0,0 +1,72 @@
+//
+// 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.Purview.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The private link service connection state.
+ ///
+ public partial class PrivateLinkServiceConnectionState
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnectionState
+ /// class.
+ ///
+ public PrivateLinkServiceConnectionState()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnectionState
+ /// class.
+ ///
+ /// The required actions.
+ /// The description.
+ /// The status. Possible values include:
+ /// 'Unknown', 'Pending', 'Approved', 'Rejected',
+ /// 'Disconnected'
+ public PrivateLinkServiceConnectionState(string actionsRequired = default(string), string description = default(string), string status = default(string))
+ {
+ ActionsRequired = actionsRequired;
+ Description = description;
+ Status = status;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the required actions.
+ ///
+ [JsonProperty(PropertyName = "actionsRequired")]
+ public string ActionsRequired { get; set; }
+
+ ///
+ /// Gets or sets the description.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ ///
+ /// Gets or sets the status. Possible values include: 'Unknown',
+ /// 'Pending', 'Approved', 'Rejected', 'Disconnected'
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ProvisioningState.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ProvisioningState.cs
new file mode 100644
index 0000000000000..e24650947b217
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ProvisioningState.cs
@@ -0,0 +1,28 @@
+//
+// 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.Purview.Models
+{
+
+ ///
+ /// Defines values for ProvisioningState.
+ ///
+ public static class ProvisioningState
+ {
+ public const string Unknown = "Unknown";
+ public const string Creating = "Creating";
+ public const string Moving = "Moving";
+ public const string Deleting = "Deleting";
+ public const string SoftDeleting = "SoftDeleting";
+ public const string SoftDeleted = "SoftDeleted";
+ public const string Failed = "Failed";
+ public const string Succeeded = "Succeeded";
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ProxyResource.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ProxyResource.cs
new file mode 100644
index 0000000000000..4ffcd6e46d8aa
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ProxyResource.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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Proxy Azure Resource
+ ///
+ public partial class ProxyResource : IResource
+ {
+ ///
+ /// Initializes a new instance of the ProxyResource class.
+ ///
+ public ProxyResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ProxyResource class.
+ ///
+ /// Gets or sets the identifier.
+ /// Gets or sets the name.
+ /// Gets or sets the type.
+ public ProxyResource(string id = default(string), string name = default(string), string type = default(string))
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the identifier.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets or sets the name.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets or sets the type.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PublicNetworkAccess.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PublicNetworkAccess.cs
new file mode 100644
index 0000000000000..c9dcb8d818c41
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/PublicNetworkAccess.cs
@@ -0,0 +1,23 @@
+//
+// 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.Purview.Models
+{
+
+ ///
+ /// Defines values for PublicNetworkAccess.
+ ///
+ public static class PublicNetworkAccess
+ {
+ public const string NotSpecified = "NotSpecified";
+ public const string Enabled = "Enabled";
+ public const string Disabled = "Disabled";
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Reason.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Reason.cs
new file mode 100644
index 0000000000000..dd46c414689d9
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Reason.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.Purview.Models
+{
+
+ ///
+ /// Defines values for Reason.
+ ///
+ public static class Reason
+ {
+ public const string Invalid = "Invalid";
+ public const string AlreadyExists = "AlreadyExists";
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ScopeType.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ScopeType.cs
new file mode 100644
index 0000000000000..807f163ac819f
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/ScopeType.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.Purview.Models
+{
+
+ ///
+ /// Defines values for ScopeType.
+ ///
+ public static class ScopeType
+ {
+ public const string Tenant = "Tenant";
+ public const string Subscription = "Subscription";
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Status.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Status.cs
new file mode 100644
index 0000000000000..99f49e7c4e6cd
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Status.cs
@@ -0,0 +1,25 @@
+//
+// 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.Purview.Models
+{
+
+ ///
+ /// Defines values for Status.
+ ///
+ public static class Status
+ {
+ public const string Unknown = "Unknown";
+ public const string Pending = "Pending";
+ public const string Approved = "Approved";
+ public const string Rejected = "Rejected";
+ public const string Disconnected = "Disconnected";
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/TrackedResource.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/TrackedResource.cs
new file mode 100644
index 0000000000000..5860366149a23
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/TrackedResource.cs
@@ -0,0 +1,96 @@
+//
+// 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.Purview.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Azure ARM Tracked Resource
+ ///
+ public partial class TrackedResource : IResource
+ {
+ ///
+ /// Initializes a new instance of the TrackedResource class.
+ ///
+ public TrackedResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the TrackedResource class.
+ ///
+ /// Gets or sets the identifier.
+ /// Identity Info on the tracked
+ /// resource
+ /// Gets or sets the location.
+ /// Gets or sets the name.
+ /// Tags on the azure resource.
+ /// Gets or sets the type.
+ public TrackedResource(string id = default(string), Identity identity = default(Identity), string location = default(string), string name = default(string), IDictionary tags = default(IDictionary), string type = default(string))
+ {
+ Id = id;
+ Identity = identity;
+ Location = location;
+ Name = name;
+ Tags = tags;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the identifier.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets or sets identity Info on the tracked resource
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public Identity Identity { get; set; }
+
+ ///
+ /// Gets or sets the location.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets the name.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets or sets tags on the azure resource.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets the type.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Type.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Type.cs
new file mode 100644
index 0000000000000..e14e5f56c0567
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Models/Type.cs
@@ -0,0 +1,21 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Purview.Models
+{
+
+ ///
+ /// Defines values for Type.
+ ///
+ public static class Type
+ {
+ public const string SystemAssigned = "SystemAssigned";
+ }
+}
diff --git a/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Operations.cs b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Operations.cs
new file mode 100644
index 0000000000000..69de47e05eb91
--- /dev/null
+++ b/sdk/purview/Microsoft.Azure.Management.Purview/src/Generated/Operations.cs
@@ -0,0 +1,396 @@
+//
+// 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.Purview
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ internal partial class Operations : IServiceOperations, IOperations
+ {
+ ///
+ /// Initializes a new instance of the Operations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal Operations(PurviewManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the PurviewManagementClient
+ ///
+ public PurviewManagementClient Client { get; private set; }
+
+ ///
+ /// Lists the available operations
+ ///
+ ///
+ /// List of available operations
+ ///
+ ///
+ /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Purview/operations").ToString();
+ List