diff --git a/eng/mgmt/mgmtmetadata/deviceupdate_resource-manager.txt b/eng/mgmt/mgmtmetadata/deviceupdate_resource-manager.txt
index 0a4e78fd7b30..e494e253a3fb 100644
--- a/eng/mgmt/mgmtmetadata/deviceupdate_resource-manager.txt
+++ b/eng/mgmt/mgmtmetadata/deviceupdate_resource-manager.txt
@@ -3,12 +3,13 @@ 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/deviceupdate/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\GitHub\azure-sdk-for-net\sdk
-2021-03-03 02:46:25 UTC
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/deviceupdate/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\us\dp-sdk\sdk
+Autorest CSharp Version: 2.3.82
+2021-11-02 22:34:25 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
-Branch: master
-Commit: 4d1ea13dd5ec9e9e73e8ebabfa2d27a83b7e0e0d
+Branch: main
+Commit: 0fba9ba4b78d20fc1a7ec251dab889b7a7eb8afd
AutoRest information
Requested version: v2
-Bootstrapper version: autorest@2.0.4413
+Bootstrapper version: autorest@3.4.2
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/AccountsOperations.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/AccountsOperations.cs
index 50a929c2f867..c0b5805c841f 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/AccountsOperations.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/AccountsOperations.cs
@@ -596,6 +596,176 @@ internal AccountsOperations(DeviceUpdateClient client)
return _result;
}
+ ///
+ /// Checks whether account exists.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// 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 HeadWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (accountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
+ }
+ // 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, "Head", 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.DeviceUpdate/accounts/{accountName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _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("HEAD");
+ _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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;
+ }
+
///
/// Creates or updates Account.
///
@@ -1186,7 +1356,7 @@ internal AccountsOperations(DeviceUpdateClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -1241,6 +1411,24 @@ internal AccountsOperations(DeviceUpdateClient client)
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);
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/AccountsOperationsExtensions.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/AccountsOperationsExtensions.cs
index 3723cdf9157e..b5a4935bdc63 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/AccountsOperationsExtensions.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/AccountsOperationsExtensions.cs
@@ -123,6 +123,43 @@ public static Account Get(this IAccountsOperations operations, string resourceGr
}
}
+ ///
+ /// Checks whether account exists.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ public static void Head(this IAccountsOperations operations, string resourceGroupName, string accountName)
+ {
+ operations.HeadAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Checks whether account exists.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task HeadAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.HeadWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Creates or updates Account.
///
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/DeviceUpdateClient.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/DeviceUpdateClient.cs
index 71663c9ed333..4815bef08fd3 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/DeviceUpdateClient.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/DeviceUpdateClient.cs
@@ -20,6 +20,8 @@ namespace Microsoft.Azure.Management.DeviceUpdate
using System.Linq;
using System.Net;
using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
///
/// Microsoft Device Update resource provider.
@@ -84,6 +86,21 @@ public partial class DeviceUpdateClient : ServiceClient, IDe
///
public virtual IInstancesOperations Instances { get; private set; }
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; }
+
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; }
+
+ ///
+ /// Gets the IPrivateEndpointConnectionProxiesOperations.
+ ///
+ public virtual IPrivateEndpointConnectionProxiesOperations PrivateEndpointConnectionProxies { get; private set; }
+
///
/// Gets the IOperations.
///
@@ -332,6 +349,9 @@ private void Initialize()
{
Accounts = new AccountsOperations(this);
Instances = new InstancesOperations(this);
+ PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
+ PrivateLinkResources = new PrivateLinkResourcesOperations(this);
+ PrivateEndpointConnectionProxies = new PrivateEndpointConnectionProxiesOperations(this);
Operations = new Operations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2020-03-01-preview";
@@ -368,5 +388,192 @@ private void Initialize()
DeserializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
}
+ ///
+ /// Checks ADU resource name availability.
+ ///
+ ///
+ /// 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 request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
+ }
+ if (SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
+ }
+ if (request == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "request");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("request", request);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DeviceUpdate/checknameavailability").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId));
+ List _queryParameters = new List();
+ if (ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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 (GenerateClientRequestId != null && GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(request != null)
+ {
+ _requestContent = SafeJsonConvert.SerializeObject(request, 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 (Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/DeviceUpdateClientExtensions.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/DeviceUpdateClientExtensions.cs
new file mode 100644
index 000000000000..813df45e53e4
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/DeviceUpdateClientExtensions.cs
@@ -0,0 +1,59 @@
+//
+// 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.DeviceUpdate
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for DeviceUpdateClient.
+ ///
+ public static partial class DeviceUpdateClientExtensions
+ {
+ ///
+ /// Checks ADU resource name availability.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Check Name Availability Request.
+ ///
+ public static CheckNameAvailabilityResponse CheckNameAvailability(this IDeviceUpdateClient operations, CheckNameAvailabilityRequest request)
+ {
+ return operations.CheckNameAvailabilityAsync(request).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Checks ADU resource name availability.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Check Name Availability Request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CheckNameAvailabilityAsync(this IDeviceUpdateClient operations, CheckNameAvailabilityRequest request, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(request, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IAccountsOperations.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IAccountsOperations.cs
index 046321285640..a4bcec10c5c0 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IAccountsOperations.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IAccountsOperations.cs
@@ -90,6 +90,28 @@ public partial interface IAccountsOperations
///
Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Checks whether account exists.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// 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 HeadWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Creates or updates Account.
///
///
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IDeviceUpdateClient.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IDeviceUpdateClient.cs
index 7b34b3d5d5c8..fb9e8a46d6c4 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IDeviceUpdateClient.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IDeviceUpdateClient.cs
@@ -14,6 +14,10 @@ namespace Microsoft.Azure.Management.DeviceUpdate
using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
///
/// Microsoft Device Update resource provider.
@@ -79,10 +83,39 @@ public partial interface IDeviceUpdateClient : System.IDisposable
///
IInstancesOperations Instances { get; }
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ IPrivateLinkResourcesOperations PrivateLinkResources { get; }
+
+ ///
+ /// Gets the IPrivateEndpointConnectionProxiesOperations.
+ ///
+ IPrivateEndpointConnectionProxiesOperations PrivateEndpointConnectionProxies { get; }
+
///
/// Gets the IOperations.
///
IOperations Operations { get; }
+ ///
+ /// Checks ADU resource name availability.
+ ///
+ ///
+ /// Check Name Availability Request.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ Task> CheckNameAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+
}
}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IInstancesOperations.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IInstancesOperations.cs
index 4e3df48e9120..4cf97c5fe0dc 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IInstancesOperations.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IInstancesOperations.cs
@@ -26,6 +26,9 @@ public partial interface IInstancesOperations
///
/// Returns instances for the given account name.
///
+ ///
+ /// The resource group name.
+ ///
///
/// Account name.
///
@@ -44,9 +47,9 @@ public partial interface IInstancesOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListBySubscriptionWithHttpMessagesAsync(string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Returns instances for the given account name.
+ /// Returns instance details for the given instance and account name.
///
///
/// The resource group name.
@@ -54,6 +57,9 @@ public partial interface IInstancesOperations
///
/// Account name.
///
+ ///
+ /// Instance name.
+ ///
///
/// The headers that will be added to request.
///
@@ -69,9 +75,9 @@ public partial interface IInstancesOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string instanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Returns instances for the given account and instance name.
+ /// Checks whether instance exists.
///
///
/// The resource group name.
@@ -91,13 +97,10 @@ public partial interface IInstancesOperations
///
/// 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 instanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task HeadWithHttpMessagesAsync(string resourceGroupName, string accountName, string instanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Creates or updates instance.
///
@@ -263,28 +266,6 @@ public partial interface IInstancesOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Returns instances for the given account name.
- ///
- ///
- /// 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/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IPrivateEndpointConnectionProxiesOperations.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IPrivateEndpointConnectionProxiesOperations.cs
new file mode 100644
index 000000000000..3eda92b3ae6a
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IPrivateEndpointConnectionProxiesOperations.cs
@@ -0,0 +1,229 @@
+//
+// 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.DeviceUpdate
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateEndpointConnectionProxiesOperations operations.
+ ///
+ public partial interface IPrivateEndpointConnectionProxiesOperations
+ {
+ ///
+ /// (INTERNAL - DO NOT USE) List all private endpoint connection
+ /// proxies in a device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// 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));
+ ///
+ /// (INTERNAL - DO NOT USE) Validates a private endpoint connection
+ /// proxy object.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ ///
+ /// 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 ValidateWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// (INTERNAL - DO NOT USE) Get the specified private endpoint
+ /// connection proxy associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// 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 privateEndpointConnectionProxyId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// (INTERNAL - DO NOT USE) Creates or updates the specified private
+ /// endpoint connection proxy resource associated with the device
+ /// update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ ///
+ /// 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 privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// (INTERNAL - DO NOT USE) Deletes the specified private endpoint
+ /// connection proxy associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// 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 privateEndpointConnectionProxyId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// (INTERNAL - DO NOT USE) Creates or updates the specified private
+ /// endpoint connection proxy resource associated with the device
+ /// update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ ///
+ /// 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, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// (INTERNAL - DO NOT USE) Deletes the specified private endpoint
+ /// connection proxy associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// 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 privateEndpointConnectionProxyId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IPrivateEndpointConnectionsOperations.cs
new file mode 100644
index 000000000000..355c8b0221b4
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IPrivateEndpointConnectionsOperations.cs
@@ -0,0 +1,202 @@
+//
+// 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.DeviceUpdate
+{
+ 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
+ {
+ ///
+ /// List all private endpoint connections in a device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// 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));
+ ///
+ /// Get the specified private endpoint connection associated with the
+ /// device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the
+ /// Azure resource
+ ///
+ ///
+ /// 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));
+ ///
+ /// Update the state of specified private endpoint connection
+ /// associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the
+ /// Azure resource
+ ///
+ ///
+ /// The parameters for creating a 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the specified private endpoint connection associated with
+ /// the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the
+ /// Azure resource
+ ///
+ ///
+ /// 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));
+ ///
+ /// Update the state of specified private endpoint connection
+ /// associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the
+ /// Azure resource
+ ///
+ ///
+ /// The parameters for creating a 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the specified private endpoint connection associated with
+ /// the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the
+ /// Azure resource
+ ///
+ ///
+ /// 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));
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IPrivateLinkResourcesOperations.cs
new file mode 100644
index 000000000000..e5055d9921d9
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/IPrivateLinkResourcesOperations.cs
@@ -0,0 +1,81 @@
+//
+// 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.DeviceUpdate
+{
+ 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
+ {
+ ///
+ /// List all private link resources in a device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// 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));
+ ///
+ /// Get the specified private link resource associated with the device
+ /// update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The group ID of the private link resource.
+ ///
+ ///
+ /// 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 groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/InstancesOperations.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/InstancesOperations.cs
index 606bdcebbadd..9a5e28c40cb2 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/InstancesOperations.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/InstancesOperations.cs
@@ -53,6 +53,9 @@ internal InstancesOperations(DeviceUpdateClient client)
///
/// Returns instances for the given account name.
///
+ ///
+ /// The resource group name.
+ ///
///
/// Account name.
///
@@ -77,8 +80,12 @@ internal InstancesOperations(DeviceUpdateClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListBySubscriptionWithHttpMessagesAsync(string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -98,13 +105,15 @@ internal InstancesOperations(DeviceUpdateClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByAccount", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
List _queryParameters = new List();
@@ -233,7 +242,7 @@ internal InstancesOperations(DeviceUpdateClient client)
}
///
- /// Returns instances for the given account name.
+ /// Returns instance details for the given instance and account name.
///
///
/// The resource group name.
@@ -241,6 +250,9 @@ internal InstancesOperations(DeviceUpdateClient client)
///
/// Account name.
///
+ ///
+ /// Instance name.
+ ///
///
/// Headers that will be added to request.
///
@@ -262,7 +274,7 @@ internal InstancesOperations(DeviceUpdateClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string instanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -280,6 +292,10 @@ internal InstancesOperations(DeviceUpdateClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
}
+ if (instanceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "instanceName");
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -289,15 +305,17 @@ internal InstancesOperations(DeviceUpdateClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
+ tracingParameters.Add("instanceName", instanceName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByAccount", tracingParameters);
+ 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.DeviceUpdate/accounts/{accountName}/instances").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
+ _url = _url.Replace("{instanceName}", System.Uri.EscapeDataString(instanceName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
{
@@ -391,7 +409,7 @@ internal InstancesOperations(DeviceUpdateClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -404,7 +422,7 @@ internal InstancesOperations(DeviceUpdateClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -424,7 +442,7 @@ internal InstancesOperations(DeviceUpdateClient client)
}
///
- /// Returns instances for the given account and instance name.
+ /// Checks whether instance exists.
///
///
/// The resource group name.
@@ -444,9 +462,6 @@ internal InstancesOperations(DeviceUpdateClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -456,7 +471,7 @@ internal InstancesOperations(DeviceUpdateClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string instanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task HeadWithHttpMessagesAsync(string resourceGroupName, string accountName, string instanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -489,7 +504,7 @@ internal InstancesOperations(DeviceUpdateClient client)
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("instanceName", instanceName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "Head", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -510,7 +525,7 @@ internal InstancesOperations(DeviceUpdateClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("HEAD");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -553,7 +568,7 @@ internal InstancesOperations(DeviceUpdateClient client)
ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
@@ -591,31 +606,13 @@ internal InstancesOperations(DeviceUpdateClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ 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);
@@ -1285,174 +1282,6 @@ internal InstancesOperations(DeviceUpdateClient client)
return _result;
}
- ///
- /// Returns instances for the given account name.
- ///
- ///
- /// 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ErrorResponse _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;
- }
-
///
/// Returns instances for the given account name.
///
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/InstancesOperationsExtensions.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/InstancesOperationsExtensions.cs
index bfeb769bf28f..2d95841233ab 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/InstancesOperationsExtensions.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/InstancesOperationsExtensions.cs
@@ -29,12 +29,15 @@ public static partial class InstancesOperationsExtensions
///
/// The operations group for this extension method.
///
+ ///
+ /// The resource group name.
+ ///
///
/// Account name.
///
- public static IPage ListBySubscription(this IInstancesOperations operations, string accountName)
+ public static IPage ListByAccount(this IInstancesOperations operations, string resourceGroupName, string accountName)
{
- return operations.ListBySubscriptionAsync(accountName).GetAwaiter().GetResult();
+ return operations.ListByAccountAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
}
///
@@ -43,22 +46,25 @@ public static IPage ListBySubscription(this IInstancesOperations opera
///
/// The operations group for this extension method.
///
+ ///
+ /// The resource group name.
+ ///
///
/// Account name.
///
///
/// The cancellation token.
///
- public static async Task> ListBySubscriptionAsync(this IInstancesOperations operations, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListByAccountAsync(this IInstancesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(accountName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Returns instances for the given account name.
+ /// Returns instance details for the given instance and account name.
///
///
/// The operations group for this extension method.
@@ -69,13 +75,16 @@ public static IPage ListBySubscription(this IInstancesOperations opera
///
/// Account name.
///
- public static IPage ListByAccount(this IInstancesOperations operations, string resourceGroupName, string accountName)
+ ///
+ /// Instance name.
+ ///
+ public static Instance Get(this IInstancesOperations operations, string resourceGroupName, string accountName, string instanceName)
{
- return operations.ListByAccountAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, accountName, instanceName).GetAwaiter().GetResult();
}
///
- /// Returns instances for the given account name.
+ /// Returns instance details for the given instance and account name.
///
///
/// The operations group for this extension method.
@@ -86,19 +95,22 @@ public static IPage ListByAccount(this IInstancesOperations operations
///
/// Account name.
///
+ ///
+ /// Instance name.
+ ///
///
/// The cancellation token.
///
- public static async Task> ListByAccountAsync(this IInstancesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IInstancesOperations operations, string resourceGroupName, string accountName, string instanceName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, instanceName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Returns instances for the given account and instance name.
+ /// Checks whether instance exists.
///
///
/// The operations group for this extension method.
@@ -112,13 +124,13 @@ public static IPage ListByAccount(this IInstancesOperations operations
///
/// Instance name.
///
- public static Instance Get(this IInstancesOperations operations, string resourceGroupName, string accountName, string instanceName)
+ public static void Head(this IInstancesOperations operations, string resourceGroupName, string accountName, string instanceName)
{
- return operations.GetAsync(resourceGroupName, accountName, instanceName).GetAwaiter().GetResult();
+ operations.HeadAsync(resourceGroupName, accountName, instanceName).GetAwaiter().GetResult();
}
///
- /// Returns instances for the given account and instance name.
+ /// Checks whether instance exists.
///
///
/// The operations group for this extension method.
@@ -135,12 +147,9 @@ public static Instance Get(this IInstancesOperations operations, string resource
///
/// The cancellation token.
///
- public static async Task GetAsync(this IInstancesOperations operations, string resourceGroupName, string accountName, string instanceName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task HeadAsync(this IInstancesOperations operations, string resourceGroupName, string accountName, string instanceName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, instanceName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
+ (await operations.HeadWithHttpMessagesAsync(resourceGroupName, accountName, instanceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -387,40 +396,6 @@ public static void BeginDelete(this IInstancesOperations operations, string reso
(await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, instanceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
- ///
- /// Returns instances for the given account name.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListBySubscriptionNext(this IInstancesOperations operations, string nextPageLink)
- {
- return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Returns instances for the given account name.
- ///
- ///
- /// 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 IInstancesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Returns instances for the given account name.
///
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Account.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Account.cs
index 775570668718..fa86a62e43ac 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Account.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Account.cs
@@ -42,16 +42,25 @@ public Account()
/// The type of the resource. E.g.
/// "Microsoft.Compute/virtualMachines" or
/// "Microsoft.Storage/storageAccounts"
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
/// Resource tags.
/// Provisioning state. Possible values
/// include: 'Succeeded', 'Deleted', 'Failed', 'Canceled', 'Accepted',
/// 'Creating'
/// API host name.
- public Account(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), string hostName = default(string))
- : base(location, id, name, type, tags)
+ /// Whether or not public network
+ /// access is allowed for the container registry. Possible values
+ /// include: 'Enabled', 'Disabled'
+ /// The type of identity used for the
+ /// resource.
+ public Account(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary), string provisioningState = default(string), string hostName = default(string), string publicNetworkAccess = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ : base(location, id, name, type, systemData, tags)
{
ProvisioningState = provisioningState;
HostName = hostName;
+ PublicNetworkAccess = publicNetworkAccess;
+ Identity = identity;
CustomInit();
}
@@ -73,5 +82,19 @@ public Account()
[JsonProperty(PropertyName = "properties.hostName")]
public string HostName { get; private set; }
+ ///
+ /// Gets or sets whether or not public network access is allowed for
+ /// the container registry. Possible values include: 'Enabled',
+ /// 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
+ ///
+ /// Gets or sets the type of identity used for the resource.
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public ManagedServiceIdentity Identity { get; set; }
+
}
}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/AccountUpdate.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/AccountUpdate.cs
index d859ea3e037d..5560a819edbc 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/AccountUpdate.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/AccountUpdate.cs
@@ -33,11 +33,14 @@ public AccountUpdate()
///
/// List of key value pairs that describe the
/// resource. This will overwrite the existing tags.
+ /// The type of identity used for the
+ /// resource.
/// The geo-location where the resource
/// lives
- public AccountUpdate(IDictionary tags = default(IDictionary), string location = default(string))
+ public AccountUpdate(IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), string location = default(string))
: base(tags)
{
+ Identity = identity;
Location = location;
CustomInit();
}
@@ -47,6 +50,12 @@ public AccountUpdate()
///
partial void CustomInit();
+ ///
+ /// Gets or sets the type of identity used for the resource.
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public ManagedServiceIdentity Identity { get; set; }
+
///
/// Gets or sets the geo-location where the resource lives
///
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/AzureEntityResource.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/AzureEntityResource.cs
index ccc8f00303cc..c742270e9006 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/AzureEntityResource.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/AzureEntityResource.cs
@@ -39,9 +39,11 @@ public AzureEntityResource()
/// The type of the resource. E.g.
/// "Microsoft.Compute/virtualMachines" or
/// "Microsoft.Storage/storageAccounts"
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
/// Resource Etag.
- public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string))
- : base(id, name, type)
+ public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string))
+ : base(id, name, type, systemData)
{
Etag = etag;
CustomInit();
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CheckNameAvailabilityReason.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CheckNameAvailabilityReason.cs
new file mode 100644
index 000000000000..3efcc2436f2d
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CheckNameAvailabilityReason.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.DeviceUpdate.Models
+{
+
+ ///
+ /// Defines values for CheckNameAvailabilityReason.
+ ///
+ public static class CheckNameAvailabilityReason
+ {
+ public const string Invalid = "Invalid";
+ public const string AlreadyExists = "AlreadyExists";
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CheckNameAvailabilityRequest.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CheckNameAvailabilityRequest.cs
new file mode 100644
index 000000000000..2967d694c99e
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The check availability request body.
+ ///
+ public partial class CheckNameAvailabilityRequest
+ {
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityRequest
+ /// class.
+ ///
+ public CheckNameAvailabilityRequest()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityRequest
+ /// class.
+ ///
+ /// The name of the resource for which availability
+ /// needs to be checked.
+ /// The resource type.
+ 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 the name of the resource for which availability needs
+ /// to be checked.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the resource type.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CheckNameAvailabilityResponse.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CheckNameAvailabilityResponse.cs
new file mode 100644
index 000000000000..f12b9ae6bfef
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CheckNameAvailabilityResponse.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The check availability result.
+ ///
+ public partial class CheckNameAvailabilityResponse
+ {
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityResponse
+ /// class.
+ ///
+ public CheckNameAvailabilityResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityResponse
+ /// class.
+ ///
+ /// Indicates if the resource name is
+ /// available.
+ /// The reason why the given name is not
+ /// available. Possible values include: 'Invalid',
+ /// 'AlreadyExists'
+ /// Detailed reason why the given name is
+ /// available.
+ public CheckNameAvailabilityResponse(bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string))
+ {
+ NameAvailable = nameAvailable;
+ Reason = reason;
+ Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets indicates if the resource name is available.
+ ///
+ [JsonProperty(PropertyName = "nameAvailable")]
+ public bool? NameAvailable { get; set; }
+
+ ///
+ /// Gets or sets the reason why the given name is not available.
+ /// Possible values include: 'Invalid', 'AlreadyExists'
+ ///
+ [JsonProperty(PropertyName = "reason")]
+ public string Reason { get; set; }
+
+ ///
+ /// Gets or sets detailed reason why the given name is available.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ConnectionDetails.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ConnectionDetails.cs
new file mode 100644
index 000000000000..27fd6b8ad96e
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ConnectionDetails.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Private endpoint connection proxy object properties.
+ ///
+ public partial class ConnectionDetails
+ {
+ ///
+ /// Initializes a new instance of the ConnectionDetails class.
+ ///
+ public ConnectionDetails()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectionDetails class.
+ ///
+ /// Connection details ID.
+ /// Private IP address.
+ /// Link ID.
+ /// Group ID.
+ /// Member name.
+ public ConnectionDetails(string id = default(string), string privateIpAddress = default(string), string linkIdentifier = default(string), string groupId = default(string), string memberName = default(string))
+ {
+ Id = id;
+ PrivateIpAddress = privateIpAddress;
+ LinkIdentifier = linkIdentifier;
+ GroupId = groupId;
+ MemberName = memberName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets connection details ID.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets private IP address.
+ ///
+ [JsonProperty(PropertyName = "privateIpAddress")]
+ public string PrivateIpAddress { get; private set; }
+
+ ///
+ /// Gets link ID.
+ ///
+ [JsonProperty(PropertyName = "linkIdentifier")]
+ public string LinkIdentifier { get; private set; }
+
+ ///
+ /// Gets group ID.
+ ///
+ [JsonProperty(PropertyName = "groupId")]
+ public string GroupId { get; private set; }
+
+ ///
+ /// Gets member name.
+ ///
+ [JsonProperty(PropertyName = "memberName")]
+ public string MemberName { get; private set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CreatedByType.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CreatedByType.cs
new file mode 100644
index 000000000000..efe9aa839fa9
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/CreatedByType.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.DeviceUpdate.Models
+{
+
+ ///
+ /// Defines values for CreatedByType.
+ ///
+ public static class CreatedByType
+ {
+ public const string User = "User";
+ public const string Application = "Application";
+ public const string ManagedIdentity = "ManagedIdentity";
+ public const string Key = "Key";
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/DiagnosticStorageProperties.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/DiagnosticStorageProperties.cs
new file mode 100644
index 000000000000..9f7459e2eb0d
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/DiagnosticStorageProperties.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Customer-initiated diagnostic log collection storage properties
+ ///
+ public partial class DiagnosticStorageProperties
+ {
+ ///
+ /// Initializes a new instance of the DiagnosticStorageProperties
+ /// class.
+ ///
+ public DiagnosticStorageProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DiagnosticStorageProperties
+ /// class.
+ ///
+ /// ResourceId of the diagnostic storage
+ /// account
+ /// ConnectionString of the diagnostic
+ /// storage account
+ public DiagnosticStorageProperties(string resourceId, string connectionString = default(string))
+ {
+ ConnectionString = connectionString;
+ ResourceId = resourceId;
+ CustomInit();
+ }
+ ///
+ /// Static constructor for DiagnosticStorageProperties class.
+ ///
+ static DiagnosticStorageProperties()
+ {
+ AuthenticationType = "KeyBased";
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets connectionString of the diagnostic storage account
+ ///
+ [JsonProperty(PropertyName = "connectionString")]
+ public string ConnectionString { get; set; }
+
+ ///
+ /// Gets or sets resourceId of the diagnostic storage account
+ ///
+ [JsonProperty(PropertyName = "resourceId")]
+ public string ResourceId { get; set; }
+
+ ///
+ /// Authentication Type
+ ///
+ [JsonProperty(PropertyName = "authenticationType")]
+ public static string AuthenticationType { get; private set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorAdditionalInfo.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorAdditionalInfo.cs
new file mode 100644
index 000000000000..69522f376a91
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorAdditionalInfo.cs
@@ -0,0 +1,59 @@
+//
+// 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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource management error additional info.
+ ///
+ public partial class ErrorAdditionalInfo
+ {
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ public ErrorAdditionalInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ /// The additional info type.
+ /// The additional info.
+ public ErrorAdditionalInfo(string type = default(string), object info = default(object))
+ {
+ Type = type;
+ Info = info;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the additional info type.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Gets the additional info.
+ ///
+ [JsonProperty(PropertyName = "info")]
+ public object Info { get; private set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorDefinition.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorDefinition.cs
deleted file mode 100644
index c4d3fb9415ab..000000000000
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorDefinition.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// 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.DeviceUpdate.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Error definition.
- ///
- public partial class ErrorDefinition
- {
- ///
- /// Initializes a new instance of the ErrorDefinition class.
- ///
- public ErrorDefinition()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ErrorDefinition class.
- ///
- /// Error status code.
- /// Error message.
- /// Error details.
- public ErrorDefinition(string code = default(string), string message = default(string), IList details = default(IList))
- {
- Code = code;
- Message = message;
- Details = details;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets error status code.
- ///
- [JsonProperty(PropertyName = "code")]
- public string Code { get; private set; }
-
- ///
- /// Gets error message.
- ///
- [JsonProperty(PropertyName = "message")]
- public string Message { get; private set; }
-
- ///
- /// Gets or sets error details.
- ///
- [JsonProperty(PropertyName = "details")]
- public IList Details { get; set; }
-
- }
-}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorDetail.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorDetail.cs
new file mode 100644
index 000000000000..5aada779027d
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorDetail.cs
@@ -0,0 +1,85 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The error detail.
+ ///
+ public partial class ErrorDetail
+ {
+ ///
+ /// Initializes a new instance of the ErrorDetail class.
+ ///
+ public ErrorDetail()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorDetail class.
+ ///
+ /// The error code.
+ /// The error message.
+ /// The error target.
+ /// The error details.
+ /// The error additional info.
+ public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList))
+ {
+ Code = code;
+ Message = message;
+ Target = target;
+ Details = details;
+ AdditionalInfo = additionalInfo;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the error code.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; private set; }
+
+ ///
+ /// Gets the error message.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; private set; }
+
+ ///
+ /// Gets the error target.
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; private set; }
+
+ ///
+ /// Gets the error details.
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public IList Details { get; private set; }
+
+ ///
+ /// Gets the error additional info.
+ ///
+ [JsonProperty(PropertyName = "additionalInfo")]
+ public IList AdditionalInfo { get; private set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorResponse.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorResponse.cs
index 0523c368121a..3fffc19cf5a2 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorResponse.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ErrorResponse.cs
@@ -14,9 +14,13 @@ namespace Microsoft.Azure.Management.DeviceUpdate.Models
using System.Linq;
///
- /// Error response indicates that the service is not able to process the
- /// incoming request.
+ /// Error response
///
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return
+ /// error details for failed operations. (This also follows the OData error
+ /// response format.).
+ ///
public partial class ErrorResponse
{
///
@@ -30,11 +34,9 @@ public ErrorResponse()
///
/// Initializes a new instance of the ErrorResponse class.
///
- /// Error status code.
- /// Error details.
- public ErrorResponse(string code = default(string), ErrorDefinition error = default(ErrorDefinition))
+ /// The error object.
+ public ErrorResponse(ErrorDetail error = default(ErrorDetail))
{
- Code = code;
Error = error;
CustomInit();
}
@@ -45,16 +47,10 @@ public ErrorResponse()
partial void CustomInit();
///
- /// Gets error status code.
- ///
- [JsonProperty(PropertyName = "code")]
- public string Code { get; private set; }
-
- ///
- /// Gets error details.
+ /// Gets or sets the error object.
///
[JsonProperty(PropertyName = "error")]
- public ErrorDefinition Error { get; private set; }
+ public ErrorDetail Error { get; set; }
}
}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/GroupConnectivityInformation.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/GroupConnectivityInformation.cs
new file mode 100644
index 000000000000..2fad076960c8
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/GroupConnectivityInformation.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Group connectivity details.
+ ///
+ public partial class GroupConnectivityInformation
+ {
+ ///
+ /// Initializes a new instance of the GroupConnectivityInformation
+ /// class.
+ ///
+ public GroupConnectivityInformation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the GroupConnectivityInformation
+ /// class.
+ ///
+ /// Group ID.
+ /// Member name.
+ /// List of customer visible
+ /// FQDNs.
+ /// Internal FQDN.
+ public GroupConnectivityInformation(string groupId = default(string), string memberName = default(string), IList customerVisibleFqdns = default(IList), string internalFqdn = default(string))
+ {
+ GroupId = groupId;
+ MemberName = memberName;
+ CustomerVisibleFqdns = customerVisibleFqdns;
+ InternalFqdn = internalFqdn;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets group ID.
+ ///
+ [JsonProperty(PropertyName = "groupId")]
+ public string GroupId { get; private set; }
+
+ ///
+ /// Gets member name.
+ ///
+ [JsonProperty(PropertyName = "memberName")]
+ public string MemberName { get; private set; }
+
+ ///
+ /// Gets or sets list of customer visible FQDNs.
+ ///
+ [JsonProperty(PropertyName = "customerVisibleFqdns")]
+ public IList CustomerVisibleFqdns { get; set; }
+
+ ///
+ /// Gets internal FQDN.
+ ///
+ [JsonProperty(PropertyName = "internalFqdn")]
+ public string InternalFqdn { get; private set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/GroupIdProvisioningState.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/GroupIdProvisioningState.cs
new file mode 100644
index 000000000000..28e6fdd5c391
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/GroupIdProvisioningState.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.DeviceUpdate.Models
+{
+
+ ///
+ /// Defines values for GroupIdProvisioningState.
+ ///
+ public static class GroupIdProvisioningState
+ {
+ public const string Succeeded = "Succeeded";
+ public const string Failed = "Failed";
+ public const string Canceled = "Canceled";
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/GroupInformation.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/GroupInformation.cs
new file mode 100644
index 000000000000..ac94b4e0988f
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/GroupInformation.cs
@@ -0,0 +1,94 @@
+//
+// 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.DeviceUpdate.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The group information for creating a private endpoint on an Account
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class GroupInformation : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the GroupInformation class.
+ ///
+ public GroupInformation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the GroupInformation class.
+ ///
+ /// Fully qualified resource ID for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
+ /// The private link resource group id.
+ /// The private link resource required
+ /// member names.
+ /// The private link resource Private
+ /// link DNS zone name.
+ /// The provisioning state of private
+ /// link group ID. Possible values include: 'Succeeded', 'Failed',
+ /// 'Canceled'
+ public GroupInformation(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList), string provisioningState = default(string))
+ : base(id, name, type, systemData)
+ {
+ GroupId = groupId;
+ RequiredMembers = requiredMembers;
+ RequiredZoneNames = requiredZoneNames;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the private link resource group id.
+ ///
+ [JsonProperty(PropertyName = "properties.groupId")]
+ public string GroupId { get; private set; }
+
+ ///
+ /// Gets the private link resource required member names.
+ ///
+ [JsonProperty(PropertyName = "properties.requiredMembers")]
+ public IList RequiredMembers { get; private set; }
+
+ ///
+ /// Gets or sets the private link resource Private link DNS zone name.
+ ///
+ [JsonProperty(PropertyName = "properties.requiredZoneNames")]
+ public IList RequiredZoneNames { get; set; }
+
+ ///
+ /// Gets the provisioning state of private link group ID. Possible
+ /// values include: 'Succeeded', 'Failed', 'Canceled'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Instance.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Instance.cs
index 2388f859e207..527d6879b463 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Instance.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Instance.cs
@@ -42,6 +42,8 @@ public Instance()
/// The type of the resource. E.g.
/// "Microsoft.Compute/virtualMachines" or
/// "Microsoft.Storage/storageAccounts"
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
/// Resource tags.
/// Provisioning state. Possible values
/// include: 'Succeeded', 'Deleted', 'Failed', 'Canceled', 'Accepted',
@@ -50,12 +52,16 @@ public Instance()
/// Instance belongs to.
/// List of IoT Hubs associated with the
/// account.
- public Instance(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), string accountName = default(string), IList iotHubs = default(IList))
- : base(location, id, name, type, tags)
+ /// Enables or Disables the diagnostic
+ /// logs collection
+ public Instance(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary), string provisioningState = default(string), string accountName = default(string), IList iotHubs = default(IList), bool? enableDiagnostics = default(bool?), DiagnosticStorageProperties diagnosticStorageProperties = default(DiagnosticStorageProperties))
+ : base(location, id, name, type, systemData, tags)
{
ProvisioningState = provisioningState;
AccountName = accountName;
IotHubs = iotHubs;
+ EnableDiagnostics = enableDiagnostics;
+ DiagnosticStorageProperties = diagnosticStorageProperties;
CustomInit();
}
@@ -83,5 +89,16 @@ public Instance()
[JsonProperty(PropertyName = "properties.iotHubs")]
public IList IotHubs { get; set; }
+ ///
+ /// Gets or sets enables or Disables the diagnostic logs collection
+ ///
+ [JsonProperty(PropertyName = "properties.enableDiagnostics")]
+ public bool? EnableDiagnostics { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties.diagnosticStorageProperties")]
+ public DiagnosticStorageProperties DiagnosticStorageProperties { get; set; }
+
}
}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ManagedServiceIdentity.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ManagedServiceIdentity.cs
new file mode 100644
index 000000000000..079c33965459
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ManagedServiceIdentity.cs
@@ -0,0 +1,85 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Managed service identity (system assigned and/or user assigned
+ /// identities)
+ ///
+ public partial class ManagedServiceIdentity
+ {
+ ///
+ /// Initializes a new instance of the ManagedServiceIdentity class.
+ ///
+ public ManagedServiceIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ManagedServiceIdentity class.
+ ///
+ /// Possible values include: 'None',
+ /// 'SystemAssigned', 'UserAssigned',
+ /// 'SystemAssigned,UserAssigned'
+ /// The service principal ID of the system
+ /// assigned identity. This property will only be provided for a system
+ /// assigned identity.
+ /// The tenant ID of the system assigned
+ /// identity. This property will only be provided for a system assigned
+ /// identity.
+ public ManagedServiceIdentity(string type, System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), IDictionary userAssignedIdentities = default(IDictionary))
+ {
+ PrincipalId = principalId;
+ TenantId = tenantId;
+ Type = type;
+ UserAssignedIdentities = userAssignedIdentities;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the service principal ID of the system assigned identity. This
+ /// property will only be provided for a system assigned identity.
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public System.Guid? PrincipalId { get; private set; }
+
+ ///
+ /// Gets the tenant ID of the system assigned identity. This property
+ /// will only be provided for a system assigned identity.
+ ///
+ [JsonProperty(PropertyName = "tenantId")]
+ public System.Guid? TenantId { get; private set; }
+
+ ///
+ /// Gets or sets possible values include: 'None', 'SystemAssigned',
+ /// 'UserAssigned', 'SystemAssigned,UserAssigned'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "userAssignedIdentities")]
+ public IDictionary UserAssignedIdentities { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ManagedServiceIdentityType.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ManagedServiceIdentityType.cs
new file mode 100644
index 000000000000..f415deaedc08
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ManagedServiceIdentityType.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.DeviceUpdate.Models
+{
+
+ ///
+ /// Defines values for ManagedServiceIdentityType.
+ ///
+ public static class ManagedServiceIdentityType
+ {
+ public const string None = "None";
+ public const string SystemAssigned = "SystemAssigned";
+ public const string UserAssigned = "UserAssigned";
+ public const string SystemAssignedUserAssigned = "SystemAssigned,UserAssigned";
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Page1.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Page1.cs
new file mode 100644
index 000000000000..59a261f1abb7
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Page1.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.DeviceUpdate.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 Page1 : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("")]
+ 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/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpoint.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpoint.cs
new file mode 100644
index 000000000000..dde095f0fcdb
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Private Endpoint resource.
+ ///
+ public partial class PrivateEndpoint
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpoint class.
+ ///
+ public PrivateEndpoint()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpoint class.
+ ///
+ /// The ARM identifier for Private Endpoint
+ public PrivateEndpoint(string id = default(string))
+ {
+ Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the ARM identifier for Private Endpoint
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnection.cs
new file mode 100644
index 000000000000..706723c6c69b
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnection.cs
@@ -0,0 +1,87 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.DeviceUpdate.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Private Endpoint Connection resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PrivateEndpointConnection : Resource
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ public PrivateEndpointConnection()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ /// A collection of
+ /// information about the state of the connection between service
+ /// consumer and provider.
+ /// Fully qualified resource ID for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
+ /// The resource of private end
+ /// point.
+ /// The provisioning state of the
+ /// private endpoint connection resource. Possible values include:
+ /// 'Succeeded', 'Creating', 'Deleting', 'Failed'
+ public PrivateEndpointConnection(PrivateLinkServiceConnectionState privateLinkServiceConnectionState, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), string provisioningState = default(string))
+ : base(id, name, type, systemData)
+ {
+ PrivateEndpoint = privateEndpoint;
+ PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource of private end point.
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpoint")]
+ public PrivateEndpoint PrivateEndpoint { get; set; }
+
+ ///
+ /// Gets or sets a collection of information about the state of the
+ /// connection between service consumer and provider.
+ ///
+ [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")]
+ public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
+
+ ///
+ /// Gets or sets the provisioning state of the private endpoint
+ /// connection resource. Possible values include: 'Succeeded',
+ /// 'Creating', 'Deleting', 'Failed'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs
new file mode 100644
index 000000000000..631a74469059
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.DeviceUpdate.Models
+{
+
+ ///
+ /// Defines values for PrivateEndpointConnectionProvisioningState.
+ ///
+ public static class PrivateEndpointConnectionProvisioningState
+ {
+ public const string Succeeded = "Succeeded";
+ public const string Creating = "Creating";
+ public const string Deleting = "Deleting";
+ public const string Failed = "Failed";
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProxy.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProxy.cs
new file mode 100644
index 000000000000..b8f93d18cf12
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProxy.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Private endpoint connection proxy details.
+ ///
+ public partial class PrivateEndpointConnectionProxy
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnectionProxy
+ /// class.
+ ///
+ public PrivateEndpointConnectionProxy()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnectionProxy
+ /// class.
+ ///
+ /// ETag from NRP.
+ /// Remote private endpoint
+ /// details.
+ /// The provisioning state of the
+ /// private endpoint connection proxy resource. Possible values
+ /// include: 'Succeeded', 'Creating', 'Deleting', 'Failed'
+ public PrivateEndpointConnectionProxy(string eTag = default(string), RemotePrivateEndpoint remotePrivateEndpoint = default(RemotePrivateEndpoint), string provisioningState = default(string))
+ {
+ ETag = eTag;
+ RemotePrivateEndpoint = remotePrivateEndpoint;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets eTag from NRP.
+ ///
+ [JsonProperty(PropertyName = "eTag")]
+ public string ETag { get; private set; }
+
+ ///
+ /// Gets or sets remote private endpoint details.
+ ///
+ [JsonProperty(PropertyName = "remotePrivateEndpoint")]
+ public RemotePrivateEndpoint RemotePrivateEndpoint { get; set; }
+
+ ///
+ /// Gets or sets the provisioning state of the private endpoint
+ /// connection proxy resource. Possible values include: 'Succeeded',
+ /// 'Creating', 'Deleting', 'Failed'
+ ///
+ [JsonProperty(PropertyName = "provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProxyProperties.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProxyProperties.cs
new file mode 100644
index 000000000000..69b067870fe9
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProxyProperties.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Private endpoint connection proxy object properties.
+ ///
+ public partial class PrivateEndpointConnectionProxyProperties
+ {
+ ///
+ /// Initializes a new instance of the
+ /// PrivateEndpointConnectionProxyProperties class.
+ ///
+ public PrivateEndpointConnectionProxyProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// PrivateEndpointConnectionProxyProperties class.
+ ///
+ /// ETag from NRP.
+ /// Remote private endpoint
+ /// details.
+ /// The provisioning state of the
+ /// private endpoint connection proxy resource. Possible values
+ /// include: 'Succeeded', 'Creating', 'Deleting', 'Failed'
+ public PrivateEndpointConnectionProxyProperties(string eTag = default(string), RemotePrivateEndpoint remotePrivateEndpoint = default(RemotePrivateEndpoint), string provisioningState = default(string))
+ {
+ ETag = eTag;
+ RemotePrivateEndpoint = remotePrivateEndpoint;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets eTag from NRP.
+ ///
+ [JsonProperty(PropertyName = "eTag")]
+ public string ETag { get; private set; }
+
+ ///
+ /// Gets or sets remote private endpoint details.
+ ///
+ [JsonProperty(PropertyName = "remotePrivateEndpoint")]
+ public RemotePrivateEndpoint RemotePrivateEndpoint { get; set; }
+
+ ///
+ /// Gets or sets the provisioning state of the private endpoint
+ /// connection proxy resource. Possible values include: 'Succeeded',
+ /// 'Creating', 'Deleting', 'Failed'
+ ///
+ [JsonProperty(PropertyName = "provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProxyProvisioningState.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProxyProvisioningState.cs
new file mode 100644
index 000000000000..050058b17d14
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointConnectionProxyProvisioningState.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.DeviceUpdate.Models
+{
+
+ ///
+ /// Defines values for PrivateEndpointConnectionProxyProvisioningState.
+ ///
+ public static class PrivateEndpointConnectionProxyProvisioningState
+ {
+ public const string Succeeded = "Succeeded";
+ public const string Creating = "Creating";
+ public const string Deleting = "Deleting";
+ public const string Failed = "Failed";
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs
new file mode 100644
index 000000000000..f8076abb83bd
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateEndpointServiceConnectionStatus.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.DeviceUpdate.Models
+{
+
+ ///
+ /// Defines values for PrivateEndpointServiceConnectionStatus.
+ ///
+ public static class PrivateEndpointServiceConnectionStatus
+ {
+ public const string Pending = "Pending";
+ public const string Approved = "Approved";
+ public const string Rejected = "Rejected";
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkResourceProperties.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkResourceProperties.cs
new file mode 100644
index 000000000000..d851945b94ee
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkResourceProperties.cs
@@ -0,0 +1,73 @@
+//
+// 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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Properties of a private link resource.
+ ///
+ public partial class PrivateLinkResourceProperties
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkResourceProperties
+ /// class.
+ ///
+ public PrivateLinkResourceProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkResourceProperties
+ /// class.
+ ///
+ /// The private link resource group id.
+ /// The private link resource required
+ /// member names.
+ /// The private link resource Private
+ /// link DNS zone name.
+ public PrivateLinkResourceProperties(string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList))
+ {
+ 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 id.
+ ///
+ [JsonProperty(PropertyName = "groupId")]
+ public string GroupId { get; private set; }
+
+ ///
+ /// Gets the private link resource required member names.
+ ///
+ [JsonProperty(PropertyName = "requiredMembers")]
+ public IList RequiredMembers { get; private set; }
+
+ ///
+ /// Gets or sets the private link resource Private link DNS zone name.
+ ///
+ [JsonProperty(PropertyName = "requiredZoneNames")]
+ public IList RequiredZoneNames { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceConnection.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceConnection.cs
new file mode 100644
index 000000000000..5923fefc44c9
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceConnection.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Private link service connection details.
+ ///
+ public partial class PrivateLinkServiceConnection
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnection
+ /// class.
+ ///
+ public PrivateLinkServiceConnection()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnection
+ /// class.
+ ///
+ /// Private link service connection name.
+ /// List of group IDs.
+ /// Request message.
+ public PrivateLinkServiceConnection(string name = default(string), IList groupIds = default(IList), string requestMessage = default(string))
+ {
+ Name = name;
+ GroupIds = groupIds;
+ RequestMessage = requestMessage;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets private link service connection name.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets list of group IDs.
+ ///
+ [JsonProperty(PropertyName = "groupIds")]
+ public IList GroupIds { get; set; }
+
+ ///
+ /// Gets or sets request message.
+ ///
+ [JsonProperty(PropertyName = "requestMessage")]
+ public string RequestMessage { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceConnectionState.cs
new file mode 100644
index 000000000000..16f564511181
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceConnectionState.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A collection of information about the state of the connection between
+ /// service consumer and provider.
+ ///
+ public partial class PrivateLinkServiceConnectionState
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnectionState
+ /// class.
+ ///
+ public PrivateLinkServiceConnectionState()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnectionState
+ /// class.
+ ///
+ /// Indicates whether the connection has been
+ /// Approved/Rejected/Removed by the owner of the service. Possible
+ /// values include: 'Pending', 'Approved', 'Rejected'
+ /// The reason for approval/rejection of the
+ /// connection.
+ /// A message indicating if changes on
+ /// the service provider require any updates on the consumer.
+ public PrivateLinkServiceConnectionState(string status = default(string), string description = default(string), string actionsRequired = default(string))
+ {
+ Status = status;
+ Description = description;
+ ActionsRequired = actionsRequired;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets indicates whether the connection has been
+ /// Approved/Rejected/Removed by the owner of the service. Possible
+ /// values include: 'Pending', 'Approved', 'Rejected'
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// Gets or sets the reason for approval/rejection of the connection.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ ///
+ /// Gets or sets a message indicating if changes on the service
+ /// provider require any updates on the consumer.
+ ///
+ [JsonProperty(PropertyName = "actionsRequired")]
+ public string ActionsRequired { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceProxy.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceProxy.cs
new file mode 100644
index 000000000000..c3586f4e0737
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceProxy.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Private link service proxy details.
+ ///
+ public partial class PrivateLinkServiceProxy
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceProxy class.
+ ///
+ public PrivateLinkServiceProxy()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceProxy class.
+ ///
+ /// NRP resource ID.
+ /// Remote
+ /// private link service connection state
+ /// Remote private
+ /// endpoint connection details.
+ /// Group connectivity
+ /// information.
+ public PrivateLinkServiceProxy(string id = default(string), PrivateLinkServiceConnectionState remotePrivateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState), PrivateLinkServiceProxyRemotePrivateEndpointConnection remotePrivateEndpointConnection = default(PrivateLinkServiceProxyRemotePrivateEndpointConnection), IList groupConnectivityInformation = default(IList))
+ {
+ Id = id;
+ RemotePrivateLinkServiceConnectionState = remotePrivateLinkServiceConnectionState;
+ RemotePrivateEndpointConnection = remotePrivateEndpointConnection;
+ GroupConnectivityInformation = groupConnectivityInformation;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets NRP resource ID.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets or sets remote private link service connection state
+ ///
+ [JsonProperty(PropertyName = "remotePrivateLinkServiceConnectionState")]
+ public PrivateLinkServiceConnectionState RemotePrivateLinkServiceConnectionState { get; set; }
+
+ ///
+ /// Gets or sets remote private endpoint connection details.
+ ///
+ [JsonProperty(PropertyName = "remotePrivateEndpointConnection")]
+ public PrivateLinkServiceProxyRemotePrivateEndpointConnection RemotePrivateEndpointConnection { get; set; }
+
+ ///
+ /// Gets or sets group connectivity information.
+ ///
+ [JsonProperty(PropertyName = "groupConnectivityInformation")]
+ public IList GroupConnectivityInformation { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceProxyRemotePrivateEndpointConnection.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceProxyRemotePrivateEndpointConnection.cs
new file mode 100644
index 000000000000..b555a1b88cf9
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PrivateLinkServiceProxyRemotePrivateEndpointConnection.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.DeviceUpdate.Models
+{
+ using System.Linq;
+
+ ///
+ /// Remote private endpoint connection details.
+ ///
+ public partial class PrivateLinkServiceProxyRemotePrivateEndpointConnection : RemotePrivateEndpointConnection
+ {
+ ///
+ /// Initializes a new instance of the
+ /// PrivateLinkServiceProxyRemotePrivateEndpointConnection class.
+ ///
+ public PrivateLinkServiceProxyRemotePrivateEndpointConnection()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// PrivateLinkServiceProxyRemotePrivateEndpointConnection class.
+ ///
+ /// Remote private endpoint connection ID.
+ public PrivateLinkServiceProxyRemotePrivateEndpointConnection(string id = default(string))
+ : base(id)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ProxyResource.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ProxyResource.cs
index 8e3a9a1646a8..6e9ab4185d07 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ProxyResource.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/ProxyResource.cs
@@ -38,8 +38,10 @@ public ProxyResource()
/// The type of the resource. E.g.
/// "Microsoft.Compute/virtualMachines" or
/// "Microsoft.Storage/storageAccounts"
- public ProxyResource(string id = default(string), string name = default(string), string type = default(string))
- : base(id, name, type)
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
+ public ProxyResource(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData))
+ : base(id, name, type, systemData)
{
CustomInit();
}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PublicNetworkAccess.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PublicNetworkAccess.cs
new file mode 100644
index 000000000000..689aeeef76e3
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/PublicNetworkAccess.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.DeviceUpdate.Models
+{
+
+ ///
+ /// Defines values for PublicNetworkAccess.
+ ///
+ public static class PublicNetworkAccess
+ {
+ public const string Enabled = "Enabled";
+ public const string Disabled = "Disabled";
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/RemotePrivateEndpoint.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/RemotePrivateEndpoint.cs
new file mode 100644
index 000000000000..e22ddfddd21b
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/RemotePrivateEndpoint.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Remote private endpoint details.
+ ///
+ public partial class RemotePrivateEndpoint
+ {
+ ///
+ /// Initializes a new instance of the RemotePrivateEndpoint class.
+ ///
+ public RemotePrivateEndpoint()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RemotePrivateEndpoint class.
+ ///
+ /// Remote endpoint resource ID.
+ /// Virtual network traffic tag.
+ /// List of private
+ /// link service connections that need manual approval.
+ /// List of automatically
+ /// approved private link service connections.
+ /// List of private link
+ /// service proxies.
+ /// List of connection details.
+ public RemotePrivateEndpoint(string id = default(string), string vnetTrafficTag = default(string), IList manualPrivateLinkServiceConnections = default(IList), IList privateLinkServiceConnections = default(IList), IList privateLinkServiceProxies = default(IList), IList connectionDetails = default(IList))
+ {
+ Id = id;
+ VnetTrafficTag = vnetTrafficTag;
+ ManualPrivateLinkServiceConnections = manualPrivateLinkServiceConnections;
+ PrivateLinkServiceConnections = privateLinkServiceConnections;
+ PrivateLinkServiceProxies = privateLinkServiceProxies;
+ ConnectionDetails = connectionDetails;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets remote endpoint resource ID.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets virtual network traffic tag.
+ ///
+ [JsonProperty(PropertyName = "vnetTrafficTag")]
+ public string VnetTrafficTag { get; private set; }
+
+ ///
+ /// Gets or sets list of private link service connections that need
+ /// manual approval.
+ ///
+ [JsonProperty(PropertyName = "manualPrivateLinkServiceConnections")]
+ public IList ManualPrivateLinkServiceConnections { get; set; }
+
+ ///
+ /// Gets or sets list of automatically approved private link service
+ /// connections.
+ ///
+ [JsonProperty(PropertyName = "privateLinkServiceConnections")]
+ public IList PrivateLinkServiceConnections { get; set; }
+
+ ///
+ /// Gets or sets list of private link service proxies.
+ ///
+ [JsonProperty(PropertyName = "privateLinkServiceProxies")]
+ public IList PrivateLinkServiceProxies { get; set; }
+
+ ///
+ /// Gets or sets list of connection details.
+ ///
+ [JsonProperty(PropertyName = "connectionDetails")]
+ public IList ConnectionDetails { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/RemotePrivateEndpointConnection.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/RemotePrivateEndpointConnection.cs
new file mode 100644
index 000000000000..d57bfeda3494
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/RemotePrivateEndpointConnection.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Remote private endpoint connection details.
+ ///
+ public partial class RemotePrivateEndpointConnection
+ {
+ ///
+ /// Initializes a new instance of the RemotePrivateEndpointConnection
+ /// class.
+ ///
+ public RemotePrivateEndpointConnection()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RemotePrivateEndpointConnection
+ /// class.
+ ///
+ /// Remote private endpoint connection ID.
+ public RemotePrivateEndpointConnection(string id = default(string))
+ {
+ Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets remote private endpoint connection ID.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Resource.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Resource.cs
index a06d89a1ec26..3e563f1026d3 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Resource.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/Resource.cs
@@ -41,11 +41,14 @@ public Resource()
/// The type of the resource. E.g.
/// "Microsoft.Compute/virtualMachines" or
/// "Microsoft.Storage/storageAccounts"
- public Resource(string id = default(string), string name = default(string), string type = default(string))
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
+ public Resource(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData))
{
Id = id;
Name = name;
Type = type;
+ SystemData = systemData;
CustomInit();
}
@@ -75,5 +78,12 @@ public Resource()
[JsonProperty(PropertyName = "type")]
public string Type { get; private set; }
+ ///
+ /// Gets azure Resource Manager metadata containing createdBy and
+ /// modifiedBy information.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
}
}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/SystemData.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/SystemData.cs
new file mode 100644
index 000000000000..07ec58e13818
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/SystemData.cs
@@ -0,0 +1,103 @@
+//
+// 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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Metadata pertaining to creation and last modification of the resource.
+ ///
+ public partial class SystemData
+ {
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ public SystemData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ /// The identity that created the
+ /// resource.
+ /// The type of identity that created the
+ /// resource. Possible values include: 'User', 'Application',
+ /// 'ManagedIdentity', 'Key'
+ /// The timestamp of resource creation
+ /// (UTC).
+ /// The identity that last modified the
+ /// resource.
+ /// The type of identity that last
+ /// modified the resource. Possible values include: 'User',
+ /// 'Application', 'ManagedIdentity', 'Key'
+ /// The timestamp of resource last
+ /// modification (UTC)
+ public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?))
+ {
+ CreatedBy = createdBy;
+ CreatedByType = createdByType;
+ CreatedAt = createdAt;
+ LastModifiedBy = lastModifiedBy;
+ LastModifiedByType = lastModifiedByType;
+ LastModifiedAt = lastModifiedAt;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the identity that created the resource.
+ ///
+ [JsonProperty(PropertyName = "createdBy")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that created the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "createdByType")]
+ public string CreatedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource creation (UTC).
+ ///
+ [JsonProperty(PropertyName = "createdAt")]
+ public System.DateTime? CreatedAt { get; set; }
+
+ ///
+ /// Gets or sets the identity that last modified the resource.
+ ///
+ [JsonProperty(PropertyName = "lastModifiedBy")]
+ public string LastModifiedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that last modified the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "lastModifiedByType")]
+ public string LastModifiedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource last modification (UTC)
+ ///
+ [JsonProperty(PropertyName = "lastModifiedAt")]
+ public System.DateTime? LastModifiedAt { get; set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/TrackedResource.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/TrackedResource.cs
index 78b5ed6bfc12..dfaa2ebdc100 100644
--- a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/TrackedResource.cs
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/TrackedResource.cs
@@ -43,9 +43,11 @@ public TrackedResource()
/// The type of the resource. E.g.
/// "Microsoft.Compute/virtualMachines" or
/// "Microsoft.Storage/storageAccounts"
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
/// Resource tags.
- public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary))
- : base(id, name, type)
+ public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary))
+ : base(id, name, type, systemData)
{
Tags = tags;
Location = location;
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/UserAssignedIdentity.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/UserAssignedIdentity.cs
new file mode 100644
index 000000000000..45d718895ac5
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/Models/UserAssignedIdentity.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.DeviceUpdate.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// User assigned identity properties
+ ///
+ public partial class UserAssignedIdentity
+ {
+ ///
+ /// Initializes a new instance of the UserAssignedIdentity class.
+ ///
+ public UserAssignedIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the UserAssignedIdentity class.
+ ///
+ /// The principal ID of the assigned
+ /// identity.
+ /// The client ID of the assigned
+ /// identity.
+ public UserAssignedIdentity(System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?))
+ {
+ PrincipalId = principalId;
+ ClientId = clientId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the principal ID of the assigned identity.
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public System.Guid? PrincipalId { get; private set; }
+
+ ///
+ /// Gets the client ID of the assigned identity.
+ ///
+ [JsonProperty(PropertyName = "clientId")]
+ public System.Guid? ClientId { get; private set; }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/PrivateEndpointConnectionProxiesOperations.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/PrivateEndpointConnectionProxiesOperations.cs
new file mode 100644
index 000000000000..fd0fb48cbd2c
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/PrivateEndpointConnectionProxiesOperations.cs
@@ -0,0 +1,1091 @@
+//
+// 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.DeviceUpdate
+{
+ 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;
+
+ ///
+ /// PrivateEndpointConnectionProxiesOperations operations.
+ ///
+ internal partial class PrivateEndpointConnectionProxiesOperations : IServiceOperations, IPrivateEndpointConnectionProxiesOperations
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnectionProxiesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal PrivateEndpointConnectionProxiesOperations(DeviceUpdateClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the DeviceUpdateClient
+ ///
+ public DeviceUpdateClient Client { get; private set; }
+
+ ///
+ /// (INTERNAL - DO NOT USE) List all private endpoint connection proxies in a
+ /// device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// 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>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ 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");
+ }
+ // 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, "ListByAccount", 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.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies").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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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;
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Validates a private endpoint connection proxy
+ /// object.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ ///
+ /// 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 ValidateWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ 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 (privateEndpointConnectionProxyId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionProxyId");
+ }
+ if (privateEndpointConnectionProxy == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionProxy");
+ }
+ // 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("privateEndpointConnectionProxyId", privateEndpointConnectionProxyId);
+ tracingParameters.Add("privateEndpointConnectionProxy", privateEndpointConnectionProxy);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Validate", 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.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}/validate").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));
+ _url = _url.Replace("{privateEndpointConnectionProxyId}", System.Uri.EscapeDataString(privateEndpointConnectionProxyId));
+ 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(privateEndpointConnectionProxy != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointConnectionProxy, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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;
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Get the specified private endpoint connection proxy
+ /// associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// 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, string privateEndpointConnectionProxyId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ 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 (privateEndpointConnectionProxyId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionProxyId");
+ }
+ // 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("privateEndpointConnectionProxyId", privateEndpointConnectionProxyId);
+ 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.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}").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));
+ _url = _url.Replace("{privateEndpointConnectionProxyId}", System.Uri.EscapeDataString(privateEndpointConnectionProxyId));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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;
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Creates or updates the specified private endpoint
+ /// connection proxy resource associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Deletes the specified private endpoint connection
+ /// proxy associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Creates or updates the specified private endpoint
+ /// connection proxy resource associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ ///
+ /// 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, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ 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 (privateEndpointConnectionProxyId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionProxyId");
+ }
+ if (privateEndpointConnectionProxy == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionProxy");
+ }
+ // 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("privateEndpointConnectionProxyId", privateEndpointConnectionProxyId);
+ tracingParameters.Add("privateEndpointConnectionProxy", privateEndpointConnectionProxy);
+ 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.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}").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));
+ _url = _url.Replace("{privateEndpointConnectionProxyId}", System.Uri.EscapeDataString(privateEndpointConnectionProxyId));
+ 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(privateEndpointConnectionProxy != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointConnectionProxy, 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 != 201)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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 == 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;
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Deletes the specified private endpoint connection
+ /// proxy associated with the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// 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, string privateEndpointConnectionProxyId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ 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 (privateEndpointConnectionProxyId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionProxyId");
+ }
+ // 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("privateEndpointConnectionProxyId", privateEndpointConnectionProxyId);
+ 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.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}").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));
+ _url = _url.Replace("{privateEndpointConnectionProxyId}", System.Uri.EscapeDataString(privateEndpointConnectionProxyId));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/PrivateEndpointConnectionProxiesOperationsExtensions.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/PrivateEndpointConnectionProxiesOperationsExtensions.cs
new file mode 100644
index 000000000000..158ba972062d
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/PrivateEndpointConnectionProxiesOperationsExtensions.cs
@@ -0,0 +1,366 @@
+//
+// 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.DeviceUpdate
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for PrivateEndpointConnectionProxiesOperations.
+ ///
+ public static partial class PrivateEndpointConnectionProxiesOperationsExtensions
+ {
+ ///
+ /// (INTERNAL - DO NOT USE) List all private endpoint connection proxies in a
+ /// device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ public static IEnumerable ListByAccount(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName)
+ {
+ return operations.ListByAccountAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) List all private endpoint connection proxies in a
+ /// device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByAccountAsync(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Validates a private endpoint connection proxy
+ /// object.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ public static void Validate(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy)
+ {
+ operations.ValidateAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Validates a private endpoint connection proxy
+ /// object.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ValidateAsync(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.ValidateWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Get the specified private endpoint connection proxy
+ /// associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ public static PrivateEndpointConnectionProxy Get(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId)
+ {
+ return operations.GetAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Get the specified private endpoint connection proxy
+ /// associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Creates or updates the specified private endpoint
+ /// connection proxy resource associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ public static PrivateEndpointConnectionProxy CreateOrUpdate(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Creates or updates the specified private endpoint
+ /// connection proxy resource associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Deletes the specified private endpoint connection
+ /// proxy associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ public static void Delete(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId)
+ {
+ operations.DeleteAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Deletes the specified private endpoint connection
+ /// proxy associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Creates or updates the specified private endpoint
+ /// connection proxy resource associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ public static PrivateEndpointConnectionProxy BeginCreateOrUpdate(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy)
+ {
+ return operations.BeginCreateOrUpdateAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Creates or updates the specified private endpoint
+ /// connection proxy resource associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection proxy.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateOrUpdateAsync(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, PrivateEndpointConnectionProxy privateEndpointConnectionProxy, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Deletes the specified private endpoint connection
+ /// proxy associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ public static void BeginDelete(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// (INTERNAL - DO NOT USE) Deletes the specified private endpoint connection
+ /// proxy associated with the device update account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The ID of the private endpoint connection proxy object.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this IPrivateEndpointConnectionProxiesOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionProxyId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionProxyId, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ }
+}
diff --git a/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/PrivateEndpointConnectionsOperations.cs
new file mode 100644
index 000000000000..72d6f424f391
--- /dev/null
+++ b/sdk/deviceupdate/Microsoft.Azure.Management.DeviceUpdate/src/Generated/PrivateEndpointConnectionsOperations.cs
@@ -0,0 +1,901 @@
+//
+// 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.DeviceUpdate
+{
+ 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;
+
+ ///
+ /// PrivateEndpointConnectionsOperations operations.
+ ///
+ internal partial class PrivateEndpointConnectionsOperations : IServiceOperations, IPrivateEndpointConnectionsOperations
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnectionsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal PrivateEndpointConnectionsOperations(DeviceUpdateClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the DeviceUpdateClient
+ ///
+ public DeviceUpdateClient Client { get; private set; }
+
+ ///
+ /// List all private endpoint connections in a device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// 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>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ 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");
+ }
+ // 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, "ListByAccount", 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.DeviceUpdate/accounts/{accountName}/privateEndpointConnections").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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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;
+ }
+
+ ///
+ /// Get the specified private endpoint connection associated with the device
+ /// update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure
+ /// resource
+ ///
+ ///
+ /// 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, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ 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 (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ // 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("privateEndpointConnectionName", privateEndpointConnectionName);
+ 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.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}").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));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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;
+ }
+
+ ///
+ /// Update the state of specified private endpoint connection associated with
+ /// the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure
+ /// resource
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionName, privateEndpointConnection, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes the specified private endpoint connection associated with the
+ /// device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure
+ /// resource
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Update the state of specified private endpoint connection associated with
+ /// the device update account.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// Account name.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure
+ /// resource
+ ///
+ ///
+ /// The parameters for creating a private endpoint connection.
+ ///
+ ///
+ /// 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, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ 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 (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ if (privateEndpointConnection == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnection");
+ }
+ // 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("privateEndpointConnectionName", privateEndpointConnectionName);
+ tracingParameters.Add("privateEndpointConnection", privateEndpointConnection);
+ 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.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}").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));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ 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(privateEndpointConnection != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointConnection, 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 != 201)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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