diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/HybridComputeManagementClient.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/HybridComputeManagementClient.cs
new file mode 100644
index 0000000000000..06745e9dde0d2
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/HybridComputeManagementClient.cs
@@ -0,0 +1,625 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Serialization;
+ 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;
+
+ public partial class HybridComputeManagementClient : ServiceClient, IHybridComputeManagementClient, IAzureClient
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ public System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ public JsonSerializerSettings SerializationSettings { get; private set; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ public JsonSerializerSettings DeserializationSettings { get; private set; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ public ServiceClientCredentials Credentials { get; private set; }
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ public string ApiVersion { get; private set; }
+
+ ///
+ /// The ID of the target subscription.
+ ///
+ public string SubscriptionId { get; set; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ public string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default value is
+ /// 30.
+ ///
+ public int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When set to
+ /// true a unique x-ms-client-request-id value is generated and included in
+ /// each request. Default is true.
+ ///
+ public bool? GenerateClientRequestId { get; set; }
+
+ ///
+ /// Gets the IMachinesOperations.
+ ///
+ public virtual IMachinesOperations Machines { get; private set; }
+
+ ///
+ /// Gets the IMachineExtensionsOperations.
+ ///
+ public virtual IMachineExtensionsOperations MachineExtensions { get; private set; }
+
+ ///
+ /// Gets the IOperations.
+ ///
+ public virtual IOperations Operations { get; private set; }
+
+ ///
+ /// Gets the IPrivateLinkScopesOperations.
+ ///
+ public virtual IPrivateLinkScopesOperations PrivateLinkScopes { get; private set; }
+
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; }
+
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling HybridComputeManagementClient.Dispose(). False: will not dispose provided httpClient
+ protected HybridComputeManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected HybridComputeManagementClient(params DelegatingHandler[] handlers) : base(handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected HybridComputeManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected HybridComputeManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ BaseUri = baseUri;
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected HybridComputeManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ BaseUri = baseUri;
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public HybridComputeManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling HybridComputeManagementClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public HybridComputeManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public HybridComputeManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public HybridComputeManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputeManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public HybridComputeManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// An optional partial-method to perform custom initialization.
+ ///
+ partial void CustomInitialize();
+ ///
+ /// Initializes client properties.
+ ///
+ private void Initialize()
+ {
+ Machines = new MachinesOperations(this);
+ MachineExtensions = new MachineExtensionsOperations(this);
+ Operations = new Operations(this);
+ PrivateLinkScopes = new PrivateLinkScopesOperations(this);
+ PrivateLinkResources = new PrivateLinkResourcesOperations(this);
+ PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
+ BaseUri = new System.Uri("https://management.azure.com");
+ ApiVersion = "2021-05-20";
+ AcceptLanguage = "en-US";
+ LongRunningOperationRetryTimeout = 30;
+ GenerateClientRequestId = true;
+ SerializationSettings = new JsonSerializerSettings
+ {
+ Formatting = Newtonsoft.Json.Formatting.Indented,
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
+ {
+ new Iso8601TimeSpanConverter()
+ }
+ };
+ DeserializationSettings = new JsonSerializerSettings
+ {
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
+ {
+ new Iso8601TimeSpanConverter()
+ }
+ };
+ CustomInitialize();
+ DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
+ }
+ ///
+ /// The operation to Upgrade Machine Extensions.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// Parameters supplied to the Upgrade Extensions operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task UpgradeExtensionsWithHttpMessagesAsync(string resourceGroupName, string machineName, MachineExtensionUpgrade extensionUpgradeParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginUpgradeExtensionsWithHttpMessagesAsync(resourceGroupName, machineName, extensionUpgradeParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// The operation to Upgrade Machine Extensions.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// Parameters supplied to the Upgrade Extensions operation.
+ ///
+ ///
+ /// 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 BeginUpgradeExtensionsWithHttpMessagesAsync(string resourceGroupName, string machineName, MachineExtensionUpgrade extensionUpgradeParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
+ }
+ if (ApiVersion != null)
+ {
+ if (ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "ApiVersion", 1);
+ }
+ }
+ if (SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
+ }
+ if (SubscriptionId != null)
+ {
+ if (SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (machineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "machineName");
+ }
+ if (extensionUpgradeParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "extensionUpgradeParameters");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("machineName", machineName);
+ tracingParameters.Add("extensionUpgradeParameters", extensionUpgradeParameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpgradeExtensions", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{machineName}", System.Uri.EscapeDataString(machineName));
+ 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(extensionUpgradeParameters != null)
+ {
+ _requestContent = SafeJsonConvert.SerializeObject(extensionUpgradeParameters, 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 != 202)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = 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();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/HybridComputeManagementClientExtensions.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/HybridComputeManagementClientExtensions.cs
new file mode 100644
index 0000000000000..5f5a775dea953
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/HybridComputeManagementClientExtensions.cs
@@ -0,0 +1,111 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for HybridComputeManagementClient.
+ ///
+ public static partial class HybridComputeManagementClientExtensions
+ {
+ ///
+ /// The operation to Upgrade Machine Extensions.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// Parameters supplied to the Upgrade Extensions operation.
+ ///
+ public static void UpgradeExtensions(this IHybridComputeManagementClient operations, string resourceGroupName, string machineName, MachineExtensionUpgrade extensionUpgradeParameters)
+ {
+ operations.UpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to Upgrade Machine Extensions.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// Parameters supplied to the Upgrade Extensions operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpgradeExtensionsAsync(this IHybridComputeManagementClient operations, string resourceGroupName, string machineName, MachineExtensionUpgrade extensionUpgradeParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.UpgradeExtensionsWithHttpMessagesAsync(resourceGroupName, machineName, extensionUpgradeParameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// The operation to Upgrade Machine Extensions.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// Parameters supplied to the Upgrade Extensions operation.
+ ///
+ public static void BeginUpgradeExtensions(this IHybridComputeManagementClient operations, string resourceGroupName, string machineName, MachineExtensionUpgrade extensionUpgradeParameters)
+ {
+ operations.BeginUpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to Upgrade Machine Extensions.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// Parameters supplied to the Upgrade Extensions operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginUpgradeExtensionsAsync(this IHybridComputeManagementClient operations, string resourceGroupName, string machineName, MachineExtensionUpgrade extensionUpgradeParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginUpgradeExtensionsWithHttpMessagesAsync(resourceGroupName, machineName, extensionUpgradeParameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IHybridComputeManagementClient.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IHybridComputeManagementClient.cs
new file mode 100644
index 0000000000000..e2715da980653
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IHybridComputeManagementClient.cs
@@ -0,0 +1,146 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ ///
+ public partial interface IHybridComputeManagementClient : System.IDisposable
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ JsonSerializerSettings SerializationSettings { get; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ JsonSerializerSettings DeserializationSettings { get; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ ServiceClientCredentials Credentials { get; }
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// The ID of the target subscription.
+ ///
+ string SubscriptionId { get; set; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// value is 30.
+ ///
+ int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// set to true a unique x-ms-client-request-id value is generated and
+ /// included in each request. Default is true.
+ ///
+ bool? GenerateClientRequestId { get; set; }
+
+
+ ///
+ /// Gets the IMachinesOperations.
+ ///
+ IMachinesOperations Machines { get; }
+
+ ///
+ /// Gets the IMachineExtensionsOperations.
+ ///
+ IMachineExtensionsOperations MachineExtensions { get; }
+
+ ///
+ /// Gets the IOperations.
+ ///
+ IOperations Operations { get; }
+
+ ///
+ /// Gets the IPrivateLinkScopesOperations.
+ ///
+ IPrivateLinkScopesOperations PrivateLinkScopes { get; }
+
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ IPrivateLinkResourcesOperations PrivateLinkResources { get; }
+
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+
+ ///
+ /// The operation to Upgrade Machine Extensions.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// Parameters supplied to the Upgrade Extensions operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ Task UpgradeExtensionsWithHttpMessagesAsync(string resourceGroupName, string machineName, MachineExtensionUpgrade extensionUpgradeParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// The operation to Upgrade Machine Extensions.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// Parameters supplied to the Upgrade Extensions operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ Task BeginUpgradeExtensionsWithHttpMessagesAsync(string resourceGroupName, string machineName, MachineExtensionUpgrade extensionUpgradeParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IMachineExtensionsOperations.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IMachineExtensionsOperations.cs
new file mode 100644
index 0000000000000..c291d8fe699dd
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IMachineExtensionsOperations.cs
@@ -0,0 +1,283 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// MachineExtensionsOperations operations.
+ ///
+ public partial interface IMachineExtensionsOperations
+ {
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or
+ /// updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string machineName, string extensionName, MachineExtension extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or
+ /// updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string machineName, string extensionName, MachineExtensionUpdate extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// The operation to delete the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be deleted.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// 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 machineName, string extensionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// The operation to get the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine containing the extension.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// 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 machineName, string extensionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// The operation to get all extensions of a non-Azure machine
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine containing the extension.
+ ///
+ ///
+ /// The expand expression to apply on the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string machineName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or
+ /// updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string machineName, string extensionName, MachineExtension extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or
+ /// updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string machineName, string extensionName, MachineExtensionUpdate extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// The operation to delete the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be deleted.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// 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 machineName, string extensionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// The operation to get all extensions of a non-Azure machine
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IMachinesOperations.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IMachinesOperations.cs
new file mode 100644
index 0000000000000..12c18cfe96ccc
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IMachinesOperations.cs
@@ -0,0 +1,172 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// MachinesOperations operations.
+ ///
+ public partial interface IMachinesOperations
+ {
+ ///
+ /// The operation to remove a hybrid machine identity in Azure.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// 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 machineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves information about the model view or the instance view of
+ /// a hybrid machine.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// The expand expression to apply on the operation. Possible values
+ /// include: 'instanceView'
+ ///
+ ///
+ /// 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 machineName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the hybrid machines in the specified resource group. Use
+ /// the nextLink property in the response to get the next page of
+ /// hybrid machines.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the hybrid machines in the specified subscription. Use
+ /// the nextLink property in the response to get the next page of
+ /// hybrid machines.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the hybrid machines in the specified resource group. Use
+ /// the nextLink property in the response to get the next page of
+ /// hybrid machines.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the hybrid machines in the specified subscription. Use
+ /// the nextLink property in the response to get the next page of
+ /// hybrid machines.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IOperations.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IOperations.cs
new file mode 100644
index 0000000000000..ba20f1fd6abc2
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IOperations.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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// Gets a list of hybrid compute operations.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IPrivateEndpointConnectionsOperations.cs
new file mode 100644
index 0000000000000..4021c2ba7abd9
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IPrivateEndpointConnectionsOperations.cs
@@ -0,0 +1,212 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateEndpointConnectionsOperations operations.
+ ///
+ public partial interface IPrivateEndpointConnectionsOperations
+ {
+ ///
+ /// Gets a private endpoint connection.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope resource.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string scopeName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope resource.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string scopeName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope resource.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string scopeName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all private endpoint connections on a private link scope.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope 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>> ListByPrivateLinkScopeWithHttpMessagesAsync(string resourceGroupName, string scopeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope resource.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string scopeName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope resource.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string scopeName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all private endpoint connections on a private link scope.
+ ///
+ ///
+ /// 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>> ListByPrivateLinkScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IPrivateLinkResourcesOperations.cs
new file mode 100644
index 0000000000000..38fb2862419d4
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IPrivateLinkResourcesOperations.cs
@@ -0,0 +1,105 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateLinkResourcesOperations operations.
+ ///
+ public partial interface IPrivateLinkResourcesOperations
+ {
+ ///
+ /// Gets the private link resources that need to be created for a Azure
+ /// Monitor PrivateLinkScope.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope 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>> ListByPrivateLinkScopeWithHttpMessagesAsync(string resourceGroupName, string scopeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the private link resources that need to be created for a Azure
+ /// Monitor PrivateLinkScope.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope resource.
+ ///
+ ///
+ /// The name 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 scopeName, string groupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the private link resources that need to be created for a Azure
+ /// Monitor PrivateLinkScope.
+ ///
+ ///
+ /// 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>> ListByPrivateLinkScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IPrivateLinkScopesOperations.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IPrivateLinkScopesOperations.cs
new file mode 100644
index 0000000000000..4a4da9e6b4874
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/IPrivateLinkScopesOperations.cs
@@ -0,0 +1,295 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateLinkScopesOperations operations.
+ ///
+ public partial interface IPrivateLinkScopesOperations
+ {
+ ///
+ /// Gets a list of all Azure Arc PrivateLinkScopes within a
+ /// subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of Azure Arc PrivateLinkScopes within a resource group.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a Azure Arc PrivateLinkScope.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope 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 scopeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Returns a Azure Arc PrivateLinkScope.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope 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 scopeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot
+ /// specify a different value for InstrumentationKey nor AppId in the
+ /// Put operation.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope resource.
+ ///
+ ///
+ /// Properties that need to be specified to create or update a Azure
+ /// Arc for Servers and Clusters PrivateLinkScope.
+ ///
+ ///
+ /// 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 scopeName, HybridComputePrivateLinkScope parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates an existing PrivateLinkScope's tags. To update other fields
+ /// use the CreateOrUpdate method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope resource.
+ ///
+ ///
+ /// Updated tag information to set into the PrivateLinkScope instance.
+ ///
+ ///
+ /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string scopeName, TagsResource privateLinkScopeTags, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Returns a Azure Arc PrivateLinkScope's validation details.
+ ///
+ ///
+ /// The location of the target resource.
+ ///
+ ///
+ /// The id (Guid) of the Azure Arc PrivateLinkScope 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> GetValidationDetailsWithHttpMessagesAsync(string location, string privateLinkScopeId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Returns a Azure Arc PrivateLinkScope's validation details for a
+ /// given machine.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the target machine to get the private link scope
+ /// validation details for.
+ ///
+ ///
+ /// 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> GetValidationDetailsForMachineWithHttpMessagesAsync(string resourceGroupName, string machineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a Azure Arc PrivateLinkScope.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the Azure Arc PrivateLinkScope 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 scopeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of all Azure Arc PrivateLinkScopes within a
+ /// subscription.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of Azure Arc PrivateLinkScopes within a resource group.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachineExtensionsOperations.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachineExtensionsOperations.cs
new file mode 100644
index 0000000000000..da3bc3b481286
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachineExtensionsOperations.cs
@@ -0,0 +1,1458 @@
+//
+// 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.HybridCompute
+{
+ 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;
+
+ ///
+ /// MachineExtensionsOperations operations.
+ ///
+ internal partial class MachineExtensionsOperations : IServiceOperations, IMachineExtensionsOperations
+ {
+ ///
+ /// Initializes a new instance of the MachineExtensionsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal MachineExtensionsOperations(HybridComputeManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the HybridComputeManagementClient
+ ///
+ public HybridComputeManagementClient Client { get; private set; }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string machineName, string extensionName, MachineExtension extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, extensionParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string machineName, string extensionName, MachineExtensionUpdate extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, extensionParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// The operation to delete the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be deleted.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string machineName, string extensionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// The operation to get the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine containing the extension.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// 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 machineName, string extensionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (machineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "machineName");
+ }
+ if (extensionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "extensionName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("machineName", machineName);
+ tracingParameters.Add("extensionName", extensionName);
+ 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.HybridCompute/machines/{machineName}/extensions/{extensionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{machineName}", System.Uri.EscapeDataString(machineName));
+ _url = _url.Replace("{extensionName}", System.Uri.EscapeDataString(extensionName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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;
+ }
+
+ ///
+ /// The operation to get all extensions of a non-Azure machine
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine containing the extension.
+ ///
+ ///
+ /// The expand expression to apply on the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string machineName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (machineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "machineName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("machineName", machineName);
+ tracingParameters.Add("expand", expand);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{machineName}", System.Uri.EscapeDataString(machineName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (expand != null)
+ {
+ _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
+ }
+ 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;
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string machineName, string extensionName, MachineExtension extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (machineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "machineName");
+ }
+ if (extensionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "extensionName");
+ }
+ if (extensionParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "extensionParameters");
+ }
+ if (extensionParameters != null)
+ {
+ extensionParameters.Validate();
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("machineName", machineName);
+ tracingParameters.Add("extensionName", extensionName);
+ tracingParameters.Add("extensionParameters", extensionParameters);
+ 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.HybridCompute/machines/{machineName}/extensions/{extensionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{machineName}", System.Uri.EscapeDataString(machineName));
+ _url = _url.Replace("{extensionName}", System.Uri.EscapeDataString(extensionName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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(extensionParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(extensionParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new 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;
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string machineName, string extensionName, MachineExtensionUpdate extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (machineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "machineName");
+ }
+ if (extensionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "extensionName");
+ }
+ if (extensionParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "extensionParameters");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("machineName", machineName);
+ tracingParameters.Add("extensionName", extensionName);
+ tracingParameters.Add("extensionParameters", extensionParameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{machineName}", System.Uri.EscapeDataString(machineName));
+ _url = _url.Replace("{extensionName}", System.Uri.EscapeDataString(extensionName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(extensionParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(extensionParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new 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;
+ }
+
+ ///
+ /// The operation to delete the extension.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be deleted.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// 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 machineName, string extensionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (machineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "machineName");
+ }
+ if (extensionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "extensionName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("machineName", machineName);
+ tracingParameters.Add("extensionName", extensionName);
+ 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.HybridCompute/machines/{machineName}/extensions/{extensionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{machineName}", System.Uri.EscapeDataString(machineName));
+ _url = _url.Replace("{extensionName}", System.Uri.EscapeDataString(extensionName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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;
+ }
+
+ ///
+ /// The operation to get all extensions of a non-Azure machine
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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, "ListNext", 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;
+ }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachineExtensionsOperationsExtensions.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachineExtensionsOperationsExtensions.cs
new file mode 100644
index 0000000000000..cc92c97008857
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachineExtensionsOperationsExtensions.cs
@@ -0,0 +1,445 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for MachineExtensionsOperations.
+ ///
+ public static partial class MachineExtensionsOperationsExtensions
+ {
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ public static MachineExtension CreateOrUpdate(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, MachineExtension extensionParameters)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, MachineExtension extensionParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, extensionParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ public static MachineExtension Update(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, MachineExtensionUpdate extensionParameters)
+ {
+ return operations.UpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, MachineExtensionUpdate extensionParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, extensionParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// The operation to delete the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be deleted.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ public static void Delete(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName)
+ {
+ operations.DeleteAsync(resourceGroupName, machineName, extensionName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to delete the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be deleted.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// The operation to get the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine containing the extension.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ public static MachineExtension Get(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName)
+ {
+ return operations.GetAsync(resourceGroupName, machineName, extensionName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to get the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine containing the extension.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// The operation to get all extensions of a non-Azure machine
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine containing the extension.
+ ///
+ ///
+ /// The expand expression to apply on the operation.
+ ///
+ public static IPage List(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string expand = default(string))
+ {
+ return operations.ListAsync(resourceGroupName, machineName, expand).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to get all extensions of a non-Azure machine
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine containing the extension.
+ ///
+ ///
+ /// The expand expression to apply on the operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, machineName, expand, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ public static MachineExtension BeginCreateOrUpdate(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, MachineExtension extensionParameters)
+ {
+ return operations.BeginCreateOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateOrUpdateAsync(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, MachineExtension extensionParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, extensionParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ public static MachineExtension BeginUpdate(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, MachineExtensionUpdate extensionParameters)
+ {
+ return operations.BeginUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to create or update the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be created or updated.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// Parameters supplied to the Create Machine Extension operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginUpdateAsync(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, MachineExtensionUpdate extensionParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, extensionParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// The operation to delete the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be deleted.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ public static void BeginDelete(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, machineName, extensionName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to delete the extension.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the machine where the extension should be deleted.
+ ///
+ ///
+ /// The name of the machine extension.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this IMachineExtensionsOperations operations, string resourceGroupName, string machineName, string extensionName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, machineName, extensionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// The operation to get all extensions of a non-Azure machine
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IMachineExtensionsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to get all extensions of a non-Azure machine
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IMachineExtensionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachinesOperations.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachinesOperations.cs
new file mode 100644
index 0000000000000..6fa0daa0c628d
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachinesOperations.cs
@@ -0,0 +1,1221 @@
+//
+// 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.HybridCompute
+{
+ 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;
+
+ ///
+ /// MachinesOperations operations.
+ ///
+ internal partial class MachinesOperations : IServiceOperations, IMachinesOperations
+ {
+ ///
+ /// Initializes a new instance of the MachinesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal MachinesOperations(HybridComputeManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the HybridComputeManagementClient
+ ///
+ public HybridComputeManagementClient Client { get; private set; }
+
+ ///
+ /// The operation to remove a hybrid machine identity in Azure.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string machineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (machineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "machineName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("machineName", machineName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", 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.HybridCompute/machines/{machineName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{machineName}", System.Uri.EscapeDataString(machineName));
+ 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 != 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;
+ }
+
+ ///
+ /// Retrieves information about the model view or the instance view of a hybrid
+ /// machine.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// The expand expression to apply on the operation. Possible values include:
+ /// 'instanceView'
+ ///
+ ///
+ /// 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 machineName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (machineName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "machineName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("machineName", machineName);
+ tracingParameters.Add("expand", expand);
+ 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.HybridCompute/machines/{machineName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{machineName}", System.Uri.EscapeDataString(machineName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (expand != null)
+ {
+ _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
+ }
+ 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;
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified resource group. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_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;
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified subscription. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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;
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified resource group. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new 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;
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified subscription. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// 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;
+ }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachinesOperationsExtensions.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachinesOperationsExtensions.cs
new file mode 100644
index 0000000000000..4b4a1b9045679
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/MachinesOperationsExtensions.cs
@@ -0,0 +1,250 @@
+//
+// 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.HybridCompute
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for MachinesOperations.
+ ///
+ public static partial class MachinesOperationsExtensions
+ {
+ ///
+ /// The operation to remove a hybrid machine identity in Azure.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ public static void Delete(this IMachinesOperations operations, string resourceGroupName, string machineName)
+ {
+ operations.DeleteAsync(resourceGroupName, machineName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to remove a hybrid machine identity in Azure.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IMachinesOperations operations, string resourceGroupName, string machineName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, machineName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Retrieves information about the model view or the instance view of a hybrid
+ /// machine.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// The expand expression to apply on the operation. Possible values include:
+ /// 'instanceView'
+ ///
+ public static Machine Get(this IMachinesOperations operations, string resourceGroupName, string machineName, string expand = default(string))
+ {
+ return operations.GetAsync(resourceGroupName, machineName, expand).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Retrieves information about the model view or the instance view of a hybrid
+ /// machine.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the hybrid machine.
+ ///
+ ///
+ /// The expand expression to apply on the operation. Possible values include:
+ /// 'instanceView'
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IMachinesOperations operations, string resourceGroupName, string machineName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, machineName, expand, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified resource group. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ public static IPage ListByResourceGroup(this IMachinesOperations operations, string resourceGroupName)
+ {
+ return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified resource group. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupAsync(this IMachinesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified subscription. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IPage ListBySubscription(this IMachinesOperations operations)
+ {
+ return operations.ListBySubscriptionAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified subscription. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListBySubscriptionAsync(this IMachinesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified resource group. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListByResourceGroupNext(this IMachinesOperations operations, string nextPageLink)
+ {
+ return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified resource group. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupNextAsync(this IMachinesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified subscription. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListBySubscriptionNext(this IMachinesOperations operations, string nextPageLink)
+ {
+ return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all the hybrid machines in the specified subscription. Use the
+ /// nextLink property in the response to get the next page of hybrid machines.
+ ///
+ ///
+ /// 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 IMachinesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/AzureEntityResource.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/AzureEntityResource.cs
new file mode 100644
index 0000000000000..8ac324e41d0e1
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/AzureEntityResource.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Entity Resource
+ ///
+ ///
+ /// The resource model definition for an Azure Resource Manager resource
+ /// with an etag.
+ ///
+ public partial class AzureEntityResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the AzureEntityResource class.
+ ///
+ public AzureEntityResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureEntityResource 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"
+ /// Resource Etag.
+ public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string))
+ : base(id, name, type)
+ {
+ Etag = etag;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets resource Etag.
+ ///
+ [JsonProperty(PropertyName = "etag")]
+ public string Etag { get; private set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ConnectionDetail.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ConnectionDetail.cs
new file mode 100644
index 0000000000000..8270966c56456
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ConnectionDetail.cs
@@ -0,0 +1,84 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class ConnectionDetail
+ {
+ ///
+ /// Initializes a new instance of the ConnectionDetail class.
+ ///
+ public ConnectionDetail()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectionDetail class.
+ ///
+ /// Azure resource Id
+ /// The private endpoint connection
+ /// private ip address
+ /// The private endpoint connection link
+ /// identifier
+ /// The private endpoint connection group
+ /// id
+ /// The private endpoint connection member
+ /// name
+ public ConnectionDetail(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 azure resource Id
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the private endpoint connection private ip address
+ ///
+ [JsonProperty(PropertyName = "privateIpAddress")]
+ public string PrivateIpAddress { get; private set; }
+
+ ///
+ /// Gets the private endpoint connection link identifier
+ ///
+ [JsonProperty(PropertyName = "linkIdentifier")]
+ public string LinkIdentifier { get; private set; }
+
+ ///
+ /// Gets the private endpoint connection group id
+ ///
+ [JsonProperty(PropertyName = "groupId")]
+ public string GroupId { get; private set; }
+
+ ///
+ /// Gets the private endpoint connection member name
+ ///
+ [JsonProperty(PropertyName = "memberName")]
+ public string MemberName { get; private set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/CreatedByType.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/CreatedByType.cs
new file mode 100644
index 0000000000000..dd66a15c27842
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/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.HybridCompute.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/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorAdditionalInfo.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorAdditionalInfo.cs
new file mode 100644
index 0000000000000..866a63cf5a3e8
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/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.HybridCompute.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/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorDetail.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorDetail.cs
new file mode 100644
index 0000000000000..6f05819954f78
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/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.HybridCompute.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/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorResponse.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorResponse.cs
new file mode 100644
index 0000000000000..9e3d275f4fd31
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorResponse.cs
@@ -0,0 +1,56 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// 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
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ public ErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ /// The error object.
+ public ErrorResponse(ErrorDetail error = default(ErrorDetail))
+ {
+ Error = error;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the error object.
+ ///
+ [JsonProperty(PropertyName = "error")]
+ public ErrorDetail Error { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorResponseException.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorResponseException.cs
new file mode 100644
index 0000000000000..e4e72adf58bfe
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ErrorResponseException.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Microsoft.Rest;
+
+ ///
+ /// Exception thrown for an invalid response with ErrorResponse
+ /// information.
+ ///
+ public partial class ErrorResponseException : RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public ErrorResponse Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ public ErrorResponseException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ /// The exception message.
+ public ErrorResponseException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ErrorResponseException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ExtensionTargetProperties.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ExtensionTargetProperties.cs
new file mode 100644
index 0000000000000..69c2d0cdac854
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/ExtensionTargetProperties.cs
@@ -0,0 +1,52 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes the Machine Extension Target Version Properties
+ ///
+ public partial class ExtensionTargetProperties
+ {
+ ///
+ /// Initializes a new instance of the ExtensionTargetProperties class.
+ ///
+ public ExtensionTargetProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ExtensionTargetProperties class.
+ ///
+ /// Properties for the specified Extension
+ /// to Upgrade.
+ public ExtensionTargetProperties(string targetVersion = default(string))
+ {
+ TargetVersion = targetVersion;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets properties for the specified Extension to Upgrade.
+ ///
+ [JsonProperty(PropertyName = "targetVersion")]
+ public string TargetVersion { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScope.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScope.cs
new file mode 100644
index 0000000000000..dace93e370f1c
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScope.cs
@@ -0,0 +1,82 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An Azure Arc PrivateLinkScope definition.
+ ///
+ public partial class HybridComputePrivateLinkScope : PrivateLinkScopesResource
+ {
+ ///
+ /// Initializes a new instance of the HybridComputePrivateLinkScope
+ /// class.
+ ///
+ public HybridComputePrivateLinkScope()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the HybridComputePrivateLinkScope
+ /// class.
+ ///
+ /// Resource location
+ /// Azure resource Id
+ /// Azure resource name
+ /// Azure resource type
+ /// Resource tags
+ /// Properties that define a Azure Arc
+ /// PrivateLinkScope resource.
+ /// The system meta data relating to this
+ /// resource.
+ public HybridComputePrivateLinkScope(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), HybridComputePrivateLinkScopeProperties properties = default(HybridComputePrivateLinkScopeProperties), SystemData systemData = default(SystemData))
+ : base(location, id, name, type, tags)
+ {
+ Properties = properties;
+ SystemData = systemData;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets properties that define a Azure Arc PrivateLinkScope
+ /// resource.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public HybridComputePrivateLinkScopeProperties Properties { get; set; }
+
+ ///
+ /// Gets the system meta data relating to this resource.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.cs
new file mode 100644
index 0000000000000..d5e803f01b00d
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.cs
@@ -0,0 +1,82 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Properties that define a Azure Arc PrivateLinkScope resource.
+ ///
+ public partial class HybridComputePrivateLinkScopeProperties
+ {
+ ///
+ /// Initializes a new instance of the
+ /// HybridComputePrivateLinkScopeProperties class.
+ ///
+ public HybridComputePrivateLinkScopeProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// HybridComputePrivateLinkScopeProperties class.
+ ///
+ /// Indicates whether machines
+ /// associated with the private link scope can also use public Azure
+ /// Arc service endpoints. Possible values include: 'Enabled',
+ /// 'Disabled'
+ /// Current state of this
+ /// PrivateLinkScope: whether or not is has been provisioned within the
+ /// resource group it is defined. Users cannot change this value but
+ /// are able to read from it. Values will include Provisioning
+ /// ,Succeeded, Canceled and Failed.
+ /// The Guid id of the private link
+ /// scope.
+ public HybridComputePrivateLinkScopeProperties(string publicNetworkAccess = default(string), string provisioningState = default(string), string privateLinkScopeId = default(string))
+ {
+ PublicNetworkAccess = publicNetworkAccess;
+ ProvisioningState = provisioningState;
+ PrivateLinkScopeId = privateLinkScopeId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets indicates whether machines associated with the private
+ /// link scope can also use public Azure Arc service endpoints.
+ /// Possible values include: 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
+ ///
+ /// Gets current state of this PrivateLinkScope: whether or not is has
+ /// been provisioned within the resource group it is defined. Users
+ /// cannot change this value but are able to read from it. Values will
+ /// include Provisioning ,Succeeded, Canceled and Failed.
+ ///
+ [JsonProperty(PropertyName = "provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets the Guid id of the private link scope.
+ ///
+ [JsonProperty(PropertyName = "privateLinkScopeId")]
+ public string PrivateLinkScopeId { get; private set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/Identity.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/Identity.cs
new file mode 100644
index 0000000000000..b7672f9bd1923
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/Identity.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Identity for the resource.
+ ///
+ public partial class Identity
+ {
+ ///
+ /// Initializes a new instance of the Identity class.
+ ///
+ public Identity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Identity class.
+ ///
+ /// The principal ID of resource
+ /// identity.
+ /// The tenant ID of resource.
+ /// The identity type. Possible values include:
+ /// 'SystemAssigned'
+ public Identity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?))
+ {
+ PrincipalId = principalId;
+ TenantId = tenantId;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the principal ID of resource identity.
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public string PrincipalId { get; private set; }
+
+ ///
+ /// Gets the tenant ID of resource.
+ ///
+ [JsonProperty(PropertyName = "tenantId")]
+ public string TenantId { get; private set; }
+
+ ///
+ /// Gets or sets the identity type. Possible values include:
+ /// 'SystemAssigned'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public ResourceIdentityType? Type { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/InstanceViewTypes.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/InstanceViewTypes.cs
new file mode 100644
index 0000000000000..521419160c931
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/InstanceViewTypes.cs
@@ -0,0 +1,21 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+
+ ///
+ /// Defines values for InstanceViewTypes.
+ ///
+ public static class InstanceViewTypes
+ {
+ public const string InstanceView = "instanceView";
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/LocationData.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/LocationData.cs
new file mode 100644
index 0000000000000..5b1523baf3563
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/LocationData.cs
@@ -0,0 +1,102 @@
+//
+// 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.HybridCompute.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Metadata pertaining to the geographic location of the resource.
+ ///
+ public partial class LocationData
+ {
+ ///
+ /// Initializes a new instance of the LocationData class.
+ ///
+ public LocationData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the LocationData class.
+ ///
+ /// A canonical name for the geographic or physical
+ /// location.
+ /// The city or locality where the resource is
+ /// located.
+ /// The district, state, or province where the
+ /// resource is located.
+ /// The country or region where the
+ /// resource is located
+ public LocationData(string name, string city = default(string), string district = default(string), string countryOrRegion = default(string))
+ {
+ Name = name;
+ City = city;
+ District = district;
+ CountryOrRegion = countryOrRegion;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets a canonical name for the geographic or physical
+ /// location.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the city or locality where the resource is located.
+ ///
+ [JsonProperty(PropertyName = "city")]
+ public string City { get; set; }
+
+ ///
+ /// Gets or sets the district, state, or province where the resource is
+ /// located.
+ ///
+ [JsonProperty(PropertyName = "district")]
+ public string District { get; set; }
+
+ ///
+ /// Gets or sets the country or region where the resource is located
+ ///
+ [JsonProperty(PropertyName = "countryOrRegion")]
+ public string CountryOrRegion { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ if (Name != null)
+ {
+ if (Name.Length > 256)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "Name", 256);
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/Machine.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/Machine.cs
new file mode 100644
index 0000000000000..4690e7fe89264
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/Machine.cs
@@ -0,0 +1,92 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes a hybrid machine.
+ ///
+ public partial class Machine : TrackedResource
+ {
+ ///
+ /// Initializes a new instance of the Machine class.
+ ///
+ public Machine()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Machine class.
+ ///
+ /// The geo-location where the resource
+ /// lives
+ /// 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"
+ /// Resource tags.
+ /// Hybrid Compute Machine properties
+ /// The system meta data relating to this
+ /// resource.
+ public Machine(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), MachineProperties properties = default(MachineProperties), Identity identity = default(Identity), SystemData systemData = default(SystemData))
+ : base(location, id, name, type, tags)
+ {
+ Properties = properties;
+ Identity = identity;
+ SystemData = systemData;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets hybrid Compute Machine properties
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public MachineProperties Properties { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public Identity Identity { get; set; }
+
+ ///
+ /// Gets the system meta data relating to this resource.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ if (Properties != null)
+ {
+ Properties.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtension.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtension.cs
new file mode 100644
index 0000000000000..50e638b88215e
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtension.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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes a Machine Extension.
+ ///
+ public partial class MachineExtension : TrackedResource
+ {
+ ///
+ /// Initializes a new instance of the MachineExtension class.
+ ///
+ public MachineExtension()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MachineExtension class.
+ ///
+ /// The geo-location where the resource
+ /// lives
+ /// 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"
+ /// Resource tags.
+ /// Describes Machine Extension
+ /// Properties.
+ /// The system meta data relating to this
+ /// resource.
+ public MachineExtension(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), MachineExtensionProperties properties = default(MachineExtensionProperties), SystemData systemData = default(SystemData))
+ : base(location, id, name, type, tags)
+ {
+ Properties = properties;
+ SystemData = systemData;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets describes Machine Extension Properties.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public MachineExtensionProperties Properties { get; set; }
+
+ ///
+ /// Gets the system meta data relating to this resource.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.cs
new file mode 100644
index 0000000000000..718e930b8b2a3
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes the Machine Extension Instance View.
+ ///
+ public partial class MachineExtensionInstanceView
+ {
+ ///
+ /// Initializes a new instance of the MachineExtensionInstanceView
+ /// class.
+ ///
+ public MachineExtensionInstanceView()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MachineExtensionInstanceView
+ /// class.
+ ///
+ /// The machine extension name.
+ /// Specifies the type of the extension; an example
+ /// is "CustomScriptExtension".
+ /// Specifies the version of the
+ /// script handler.
+ /// Instance view status.
+ public MachineExtensionInstanceView(string name = default(string), string type = default(string), string typeHandlerVersion = default(string), MachineExtensionInstanceViewStatus status = default(MachineExtensionInstanceViewStatus))
+ {
+ Name = name;
+ Type = type;
+ TypeHandlerVersion = typeHandlerVersion;
+ Status = status;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the machine extension name.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets specifies the type of the extension; an example is
+ /// "CustomScriptExtension".
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets specifies the version of the script handler.
+ ///
+ [JsonProperty(PropertyName = "typeHandlerVersion")]
+ public string TypeHandlerVersion { get; set; }
+
+ ///
+ /// Gets or sets instance view status.
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public MachineExtensionInstanceViewStatus Status { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.cs
new file mode 100644
index 0000000000000..cd39240e2e01d
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.cs
@@ -0,0 +1,90 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Instance view status.
+ ///
+ public partial class MachineExtensionInstanceViewStatus
+ {
+ ///
+ /// Initializes a new instance of the
+ /// MachineExtensionInstanceViewStatus class.
+ ///
+ public MachineExtensionInstanceViewStatus()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// MachineExtensionInstanceViewStatus class.
+ ///
+ /// The status code.
+ /// The level code. Possible values include:
+ /// 'Info', 'Warning', 'Error'
+ /// The short localizable label for the
+ /// status.
+ /// The detailed status message, including for
+ /// alerts and error messages.
+ /// The time of the status.
+ public MachineExtensionInstanceViewStatus(string code = default(string), string level = default(string), string displayStatus = default(string), string message = default(string), System.DateTime? time = default(System.DateTime?))
+ {
+ Code = code;
+ Level = level;
+ DisplayStatus = displayStatus;
+ Message = message;
+ Time = time;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the status code.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets the level code. Possible values include: 'Info',
+ /// 'Warning', 'Error'
+ ///
+ [JsonProperty(PropertyName = "level")]
+ public string Level { get; set; }
+
+ ///
+ /// Gets or sets the short localizable label for the status.
+ ///
+ [JsonProperty(PropertyName = "displayStatus")]
+ public string DisplayStatus { get; set; }
+
+ ///
+ /// Gets or sets the detailed status message, including for alerts and
+ /// error messages.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ ///
+ /// Gets or sets the time of the status.
+ ///
+ [JsonProperty(PropertyName = "time")]
+ public System.DateTime? Time { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionProperties.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionProperties.cs
new file mode 100644
index 0000000000000..b78391b0328c4
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionProperties.cs
@@ -0,0 +1,135 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes the properties of a Machine Extension.
+ ///
+ public partial class MachineExtensionProperties
+ {
+ ///
+ /// Initializes a new instance of the MachineExtensionProperties class.
+ ///
+ public MachineExtensionProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MachineExtensionProperties class.
+ ///
+ /// How the extension handler should be
+ /// forced to update even if the extension configuration has not
+ /// changed.
+ /// The name of the extension handler
+ /// publisher.
+ /// Specifies the type of the extension; an example
+ /// is "CustomScriptExtension".
+ /// Specifies the version of the
+ /// script handler.
+ /// Indicates whether the
+ /// extension should use a newer minor version if one is available at
+ /// deployment time. Once deployed, however, the extension will not
+ /// upgrade minor versions unless redeployed, even with this property
+ /// set to true.
+ /// Json formatted public settings for the
+ /// extension.
+ /// The extension can contain either
+ /// protectedSettings or protectedSettingsFromKeyVault or no protected
+ /// settings at all.
+ /// The provisioning state, which only
+ /// appears in the response.
+ /// The machine extension instance
+ /// view.
+ public MachineExtensionProperties(string forceUpdateTag = default(string), string publisher = default(string), string type = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), object settings = default(object), object protectedSettings = default(object), string provisioningState = default(string), MachineExtensionInstanceView instanceView = default(MachineExtensionInstanceView))
+ {
+ ForceUpdateTag = forceUpdateTag;
+ Publisher = publisher;
+ Type = type;
+ TypeHandlerVersion = typeHandlerVersion;
+ AutoUpgradeMinorVersion = autoUpgradeMinorVersion;
+ Settings = settings;
+ ProtectedSettings = protectedSettings;
+ ProvisioningState = provisioningState;
+ InstanceView = instanceView;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets how the extension handler should be forced to update
+ /// even if the extension configuration has not changed.
+ ///
+ [JsonProperty(PropertyName = "forceUpdateTag")]
+ public string ForceUpdateTag { get; set; }
+
+ ///
+ /// Gets or sets the name of the extension handler publisher.
+ ///
+ [JsonProperty(PropertyName = "publisher")]
+ public string Publisher { get; set; }
+
+ ///
+ /// Gets or sets specifies the type of the extension; an example is
+ /// "CustomScriptExtension".
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets specifies the version of the script handler.
+ ///
+ [JsonProperty(PropertyName = "typeHandlerVersion")]
+ public string TypeHandlerVersion { get; set; }
+
+ ///
+ /// Gets or sets indicates whether the extension should use a newer
+ /// minor version if one is available at deployment time. Once
+ /// deployed, however, the extension will not upgrade minor versions
+ /// unless redeployed, even with this property set to true.
+ ///
+ [JsonProperty(PropertyName = "autoUpgradeMinorVersion")]
+ public bool? AutoUpgradeMinorVersion { get; set; }
+
+ ///
+ /// Gets or sets json formatted public settings for the extension.
+ ///
+ [JsonProperty(PropertyName = "settings")]
+ public object Settings { get; set; }
+
+ ///
+ /// Gets or sets the extension can contain either protectedSettings or
+ /// protectedSettingsFromKeyVault or no protected settings at all.
+ ///
+ [JsonProperty(PropertyName = "protectedSettings")]
+ public object ProtectedSettings { get; set; }
+
+ ///
+ /// Gets the provisioning state, which only appears in the response.
+ ///
+ [JsonProperty(PropertyName = "provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets or sets the machine extension instance view.
+ ///
+ [JsonProperty(PropertyName = "instanceView")]
+ public MachineExtensionInstanceView InstanceView { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionUpdate.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionUpdate.cs
new file mode 100644
index 0000000000000..17004a4bac02e
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionUpdate.cs
@@ -0,0 +1,56 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes a Machine Extension Update.
+ ///
+ public partial class MachineExtensionUpdate : ResourceUpdate
+ {
+ ///
+ /// Initializes a new instance of the MachineExtensionUpdate class.
+ ///
+ public MachineExtensionUpdate()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MachineExtensionUpdate class.
+ ///
+ /// Resource tags
+ /// Describes Machine Extension Update
+ /// Properties.
+ public MachineExtensionUpdate(IDictionary tags = default(IDictionary), MachineExtensionUpdateProperties properties = default(MachineExtensionUpdateProperties))
+ : base(tags)
+ {
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets describes Machine Extension Update Properties.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public MachineExtensionUpdateProperties Properties { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionUpdateProperties.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionUpdateProperties.cs
new file mode 100644
index 0000000000000..38d9c8e6a11fb
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionUpdateProperties.cs
@@ -0,0 +1,119 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes the properties of a Machine Extension.
+ ///
+ public partial class MachineExtensionUpdateProperties
+ {
+ ///
+ /// Initializes a new instance of the MachineExtensionUpdateProperties
+ /// class.
+ ///
+ public MachineExtensionUpdateProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MachineExtensionUpdateProperties
+ /// class.
+ ///
+ /// How the extension handler should be
+ /// forced to update even if the extension configuration has not
+ /// changed.
+ /// The name of the extension handler
+ /// publisher.
+ /// Specifies the type of the extension; an example
+ /// is "CustomScriptExtension".
+ /// Specifies the version of the
+ /// script handler.
+ /// Indicates whether the
+ /// extension should use a newer minor version if one is available at
+ /// deployment time. Once deployed, however, the extension will not
+ /// upgrade minor versions unless redeployed, even with this property
+ /// set to true.
+ /// Json formatted public settings for the
+ /// extension.
+ /// The extension can contain either
+ /// protectedSettings or protectedSettingsFromKeyVault or no protected
+ /// settings at all.
+ public MachineExtensionUpdateProperties(string forceUpdateTag = default(string), string publisher = default(string), string type = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), object settings = default(object), object protectedSettings = default(object))
+ {
+ ForceUpdateTag = forceUpdateTag;
+ Publisher = publisher;
+ Type = type;
+ TypeHandlerVersion = typeHandlerVersion;
+ AutoUpgradeMinorVersion = autoUpgradeMinorVersion;
+ Settings = settings;
+ ProtectedSettings = protectedSettings;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets how the extension handler should be forced to update
+ /// even if the extension configuration has not changed.
+ ///
+ [JsonProperty(PropertyName = "forceUpdateTag")]
+ public string ForceUpdateTag { get; set; }
+
+ ///
+ /// Gets or sets the name of the extension handler publisher.
+ ///
+ [JsonProperty(PropertyName = "publisher")]
+ public string Publisher { get; set; }
+
+ ///
+ /// Gets or sets specifies the type of the extension; an example is
+ /// "CustomScriptExtension".
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets specifies the version of the script handler.
+ ///
+ [JsonProperty(PropertyName = "typeHandlerVersion")]
+ public string TypeHandlerVersion { get; set; }
+
+ ///
+ /// Gets or sets indicates whether the extension should use a newer
+ /// minor version if one is available at deployment time. Once
+ /// deployed, however, the extension will not upgrade minor versions
+ /// unless redeployed, even with this property set to true.
+ ///
+ [JsonProperty(PropertyName = "autoUpgradeMinorVersion")]
+ public bool? AutoUpgradeMinorVersion { get; set; }
+
+ ///
+ /// Gets or sets json formatted public settings for the extension.
+ ///
+ [JsonProperty(PropertyName = "settings")]
+ public object Settings { get; set; }
+
+ ///
+ /// Gets or sets the extension can contain either protectedSettings or
+ /// protectedSettingsFromKeyVault or no protected settings at all.
+ ///
+ [JsonProperty(PropertyName = "protectedSettings")]
+ public object ProtectedSettings { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionUpgrade.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionUpgrade.cs
new file mode 100644
index 0000000000000..f2e6fb2290768
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineExtensionUpgrade.cs
@@ -0,0 +1,54 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes the Machine Extension Upgrade Properties
+ ///
+ public partial class MachineExtensionUpgrade
+ {
+ ///
+ /// Initializes a new instance of the MachineExtensionUpgrade class.
+ ///
+ public MachineExtensionUpgrade()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MachineExtensionUpgrade class.
+ ///
+ /// Describes the Extension Target
+ /// Properties.
+ public MachineExtensionUpgrade(IDictionary extensionTargets = default(IDictionary))
+ {
+ ExtensionTargets = extensionTargets;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets describes the Extension Target Properties.
+ ///
+ [JsonProperty(PropertyName = "extensionTargets")]
+ public IDictionary ExtensionTargets { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineProperties.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineProperties.cs
new file mode 100644
index 0000000000000..73efc6f05a7bf
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineProperties.cs
@@ -0,0 +1,255 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes the properties of a hybrid machine.
+ ///
+ public partial class MachineProperties
+ {
+ ///
+ /// Initializes a new instance of the MachineProperties class.
+ ///
+ public MachineProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MachineProperties class.
+ ///
+ /// Specifies the operating system settings for
+ /// the hybrid machine.
+ /// The provisioning state, which only
+ /// appears in the response.
+ /// The status of the hybrid machine agent.
+ /// Possible values include: 'Connected', 'Disconnected',
+ /// 'Error'
+ /// The time of the last status
+ /// change.
+ /// Details about the error state.
+ /// The hybrid machine agent full
+ /// version.
+ /// Specifies the hybrid machine unique ID.
+ /// Specifies the hybrid machine display
+ /// name.
+ /// Specifies the hybrid machine
+ /// FQDN.
+ /// Public Key that the client provides
+ /// to be used during initial resource onboarding
+ /// The Operating System running on the hybrid
+ /// machine.
+ /// The version of Operating System running on
+ /// the hybrid machine.
+ /// Specifies the Arc Machine's unique SMBIOS
+ /// ID
+ /// Machine Extensions information
+ /// Specifies the Operating System product
+ /// SKU.
+ /// Specifies the Windows domain name.
+ /// Specifies the AD fully qualified display
+ /// name.
+ /// Specifies the DNS fully qualified display
+ /// name.
+ /// The resource id of the
+ /// private link scope this machine is assigned to, if any.
+ /// The resource id of the parent
+ /// cluster (Azure HCI) this machine is assigned to, if any.
+ /// Detected properties from the
+ /// machine.
+ public MachineProperties(LocationData locationData = default(LocationData), OSProfile osProfile = default(OSProfile), string provisioningState = default(string), string status = default(string), System.DateTime? lastStatusChange = default(System.DateTime?), IList errorDetails = default(IList), string agentVersion = default(string), string vmId = default(string), string displayName = default(string), string machineFqdn = default(string), string clientPublicKey = default(string), string osName = default(string), string osVersion = default(string), string vmUuid = default(string), IList extensions = default(IList), string osSku = default(string), string domainName = default(string), string adFqdn = default(string), string dnsFqdn = default(string), string privateLinkScopeResourceId = default(string), string parentClusterResourceId = default(string), IDictionary detectedProperties = default(IDictionary))
+ {
+ LocationData = locationData;
+ OsProfile = osProfile;
+ ProvisioningState = provisioningState;
+ Status = status;
+ LastStatusChange = lastStatusChange;
+ ErrorDetails = errorDetails;
+ AgentVersion = agentVersion;
+ VmId = vmId;
+ DisplayName = displayName;
+ MachineFqdn = machineFqdn;
+ ClientPublicKey = clientPublicKey;
+ OsName = osName;
+ OsVersion = osVersion;
+ VmUuid = vmUuid;
+ Extensions = extensions;
+ OsSku = osSku;
+ DomainName = domainName;
+ AdFqdn = adFqdn;
+ DnsFqdn = dnsFqdn;
+ PrivateLinkScopeResourceId = privateLinkScopeResourceId;
+ ParentClusterResourceId = parentClusterResourceId;
+ DetectedProperties = detectedProperties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "locationData")]
+ public LocationData LocationData { get; set; }
+
+ ///
+ /// Gets or sets specifies the operating system settings for the hybrid
+ /// machine.
+ ///
+ [JsonProperty(PropertyName = "osProfile")]
+ public OSProfile OsProfile { get; set; }
+
+ ///
+ /// Gets the provisioning state, which only appears in the response.
+ ///
+ [JsonProperty(PropertyName = "provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets the status of the hybrid machine agent. Possible values
+ /// include: 'Connected', 'Disconnected', 'Error'
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; private set; }
+
+ ///
+ /// Gets the time of the last status change.
+ ///
+ [JsonProperty(PropertyName = "lastStatusChange")]
+ public System.DateTime? LastStatusChange { get; private set; }
+
+ ///
+ /// Gets details about the error state.
+ ///
+ [JsonProperty(PropertyName = "errorDetails")]
+ public IList ErrorDetails { get; private set; }
+
+ ///
+ /// Gets the hybrid machine agent full version.
+ ///
+ [JsonProperty(PropertyName = "agentVersion")]
+ public string AgentVersion { get; private set; }
+
+ ///
+ /// Gets or sets specifies the hybrid machine unique ID.
+ ///
+ [JsonProperty(PropertyName = "vmId")]
+ public string VmId { get; set; }
+
+ ///
+ /// Gets specifies the hybrid machine display name.
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; private set; }
+
+ ///
+ /// Gets specifies the hybrid machine FQDN.
+ ///
+ [JsonProperty(PropertyName = "machineFqdn")]
+ public string MachineFqdn { get; private set; }
+
+ ///
+ /// Gets or sets public Key that the client provides to be used during
+ /// initial resource onboarding
+ ///
+ [JsonProperty(PropertyName = "clientPublicKey")]
+ public string ClientPublicKey { get; set; }
+
+ ///
+ /// Gets the Operating System running on the hybrid machine.
+ ///
+ [JsonProperty(PropertyName = "osName")]
+ public string OsName { get; private set; }
+
+ ///
+ /// Gets the version of Operating System running on the hybrid machine.
+ ///
+ [JsonProperty(PropertyName = "osVersion")]
+ public string OsVersion { get; private set; }
+
+ ///
+ /// Gets specifies the Arc Machine's unique SMBIOS ID
+ ///
+ [JsonProperty(PropertyName = "vmUuid")]
+ public string VmUuid { get; private set; }
+
+ ///
+ /// Gets or sets machine Extensions information
+ ///
+ [JsonProperty(PropertyName = "extensions")]
+ public IList Extensions { get; set; }
+
+ ///
+ /// Gets specifies the Operating System product SKU.
+ ///
+ [JsonProperty(PropertyName = "osSku")]
+ public string OsSku { get; private set; }
+
+ ///
+ /// Gets specifies the Windows domain name.
+ ///
+ [JsonProperty(PropertyName = "domainName")]
+ public string DomainName { get; private set; }
+
+ ///
+ /// Gets specifies the AD fully qualified display name.
+ ///
+ [JsonProperty(PropertyName = "adFqdn")]
+ public string AdFqdn { get; private set; }
+
+ ///
+ /// Gets specifies the DNS fully qualified display name.
+ ///
+ [JsonProperty(PropertyName = "dnsFqdn")]
+ public string DnsFqdn { get; private set; }
+
+ ///
+ /// Gets or sets the resource id of the private link scope this machine
+ /// is assigned to, if any.
+ ///
+ [JsonProperty(PropertyName = "privateLinkScopeResourceId")]
+ public string PrivateLinkScopeResourceId { get; set; }
+
+ ///
+ /// Gets or sets the resource id of the parent cluster (Azure HCI) this
+ /// machine is assigned to, if any.
+ ///
+ [JsonProperty(PropertyName = "parentClusterResourceId")]
+ public string ParentClusterResourceId { get; set; }
+
+ ///
+ /// Gets or sets detected properties from the machine.
+ ///
+ [JsonProperty(PropertyName = "detectedProperties")]
+ public IDictionary DetectedProperties { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (LocationData != null)
+ {
+ LocationData.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineUpdate.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineUpdate.cs
new file mode 100644
index 0000000000000..8f99a703be0d6
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineUpdate.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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes a hybrid machine Update.
+ ///
+ public partial class MachineUpdate : ResourceUpdate
+ {
+ ///
+ /// Initializes a new instance of the MachineUpdate class.
+ ///
+ public MachineUpdate()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MachineUpdate class.
+ ///
+ /// Resource tags
+ /// Hybrid Compute Machine properties
+ public MachineUpdate(IDictionary tags = default(IDictionary), Identity identity = default(Identity), MachineUpdateProperties properties = default(MachineUpdateProperties))
+ : base(tags)
+ {
+ Identity = identity;
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public Identity Identity { get; set; }
+
+ ///
+ /// Gets or sets hybrid Compute Machine properties
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public MachineUpdateProperties Properties { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Properties != null)
+ {
+ Properties.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineUpdateProperties.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineUpdateProperties.cs
new file mode 100644
index 0000000000000..ed678a1b99f27
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/MachineUpdateProperties.cs
@@ -0,0 +1,82 @@
+//
+// 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.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes the ARM updatable properties of a hybrid machine.
+ ///
+ public partial class MachineUpdateProperties
+ {
+ ///
+ /// Initializes a new instance of the MachineUpdateProperties class.
+ ///
+ public MachineUpdateProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MachineUpdateProperties class.
+ ///
+ /// The resource id of the parent
+ /// cluster (Azure HCI) this machine is assigned to, if any.
+ /// The resource id of the
+ /// private link scope this machine is assigned to, if any.
+ public MachineUpdateProperties(LocationData locationData = default(LocationData), string parentClusterResourceId = default(string), string privateLinkScopeResourceId = default(string))
+ {
+ LocationData = locationData;
+ ParentClusterResourceId = parentClusterResourceId;
+ PrivateLinkScopeResourceId = privateLinkScopeResourceId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "locationData")]
+ public LocationData LocationData { get; set; }
+
+ ///
+ /// Gets or sets the resource id of the parent cluster (Azure HCI) this
+ /// machine is assigned to, if any.
+ ///
+ [JsonProperty(PropertyName = "parentClusterResourceId")]
+ public string ParentClusterResourceId { get; set; }
+
+ ///
+ /// Gets or sets the resource id of the private link scope this machine
+ /// is assigned to, if any.
+ ///
+ [JsonProperty(PropertyName = "privateLinkScopeResourceId")]
+ public string PrivateLinkScopeResourceId { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (LocationData != null)
+ {
+ LocationData.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/OSProfile.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/OSProfile.cs
new file mode 100644
index 0000000000000..86faaf9937bf8
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/OSProfile.cs
@@ -0,0 +1,52 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Specifies the operating system settings for the hybrid machine.
+ ///
+ public partial class OSProfile
+ {
+ ///
+ /// Initializes a new instance of the OSProfile class.
+ ///
+ public OSProfile()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OSProfile class.
+ ///
+ /// Specifies the host OS name of the hybrid
+ /// machine.
+ public OSProfile(string computerName = default(string))
+ {
+ ComputerName = computerName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets specifies the host OS name of the hybrid machine.
+ ///
+ [JsonProperty(PropertyName = "computerName")]
+ public string ComputerName { get; private set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/OperationValue.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/OperationValue.cs
new file mode 100644
index 0000000000000..a8287d171012b
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/OperationValue.cs
@@ -0,0 +1,67 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes the properties of a Compute Operation value.
+ ///
+ public partial class OperationValue
+ {
+ ///
+ /// Initializes a new instance of the OperationValue class.
+ ///
+ public OperationValue()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationValue class.
+ ///
+ /// The origin of the compute operation.
+ /// The name of the compute operation.
+ /// Display properties
+ public OperationValue(string origin = default(string), string name = default(string), OperationValueDisplay display = default(OperationValueDisplay))
+ {
+ Origin = origin;
+ Name = name;
+ Display = display;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the origin of the compute operation.
+ ///
+ [JsonProperty(PropertyName = "origin")]
+ public string Origin { get; private set; }
+
+ ///
+ /// Gets the name of the compute operation.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets or sets display properties
+ ///
+ [JsonProperty(PropertyName = "display")]
+ public OperationValueDisplay Display { get; set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/OperationValueDisplay.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/OperationValueDisplay.cs
new file mode 100644
index 0000000000000..50eb801e3072a
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/OperationValueDisplay.cs
@@ -0,0 +1,78 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes the properties of a Hybrid Compute Operation Value Display.
+ ///
+ public partial class OperationValueDisplay
+ {
+ ///
+ /// Initializes a new instance of the OperationValueDisplay class.
+ ///
+ public OperationValueDisplay()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationValueDisplay class.
+ ///
+ /// The display name of the compute
+ /// operation.
+ /// The display name of the resource the
+ /// operation applies to.
+ /// The description of the operation.
+ /// The resource provider for the
+ /// operation.
+ public OperationValueDisplay(string operation = default(string), string resource = default(string), string description = default(string), string provider = default(string))
+ {
+ Operation = operation;
+ Resource = resource;
+ Description = description;
+ Provider = provider;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the display name of the compute operation.
+ ///
+ [JsonProperty(PropertyName = "operation")]
+ public string Operation { get; private set; }
+
+ ///
+ /// Gets the display name of the resource the operation applies to.
+ ///
+ [JsonProperty(PropertyName = "resource")]
+ public string Resource { get; private set; }
+
+ ///
+ /// Gets the description of the operation.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; private set; }
+
+ ///
+ /// Gets the resource provider for the operation.
+ ///
+ [JsonProperty(PropertyName = "provider")]
+ public string Provider { get; private set; }
+
+ }
+}
diff --git a/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/Page.cs b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/Page.cs
new file mode 100644
index 0000000000000..57dd3271bae7a
--- /dev/null
+++ b/sdk/HybridCompute/Microsoft.Azure.Management.HybridCompute/src/Generated/Models/Page.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.HybridCompute.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [JsonObject]
+ public class Page : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("nextLink")]
+ public string NextPageLink { get; private set; }
+
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public IEnumerator GetEnumerator()
+ {
+ return Items == null ? System.Linq.Enumerable.Empty