Skip to content

Commit

Permalink
Use autorest.powershell to generate SDK for Az.Network (Azure#23590)
Browse files Browse the repository at this point in the history
* Generate SDK for network with autorest.powershell

* Redo migration based on API 06-01
  • Loading branch information
dolauli authored Dec 1, 2023
1 parent bc82aa6 commit 5b585ff
Show file tree
Hide file tree
Showing 1,450 changed files with 146,139 additions and 120,884 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ internal partial class ConnectionMonitorsOperations : IServiceOperations<Network
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
_httpRequest.Method = new HttpMethod("PUT");
_httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
Expand Down Expand Up @@ -429,7 +429,7 @@ internal partial class ConnectionMonitorsOperations : IServiceOperations<Network
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
_httpRequest.Method = new HttpMethod("GET");
_httpRequest.Method = new System.Net.Http.HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
Expand Down Expand Up @@ -651,7 +651,7 @@ internal partial class ConnectionMonitorsOperations : IServiceOperations<Network
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
_httpRequest.Method = new HttpMethod("POST");
_httpRequest.Method = new System.Net.Http.HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
Expand Down Expand Up @@ -854,7 +854,7 @@ internal partial class ConnectionMonitorsOperations : IServiceOperations<Network
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
_httpRequest.Method = new HttpMethod("POST");
_httpRequest.Method = new System.Net.Http.HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

591 changes: 333 additions & 258 deletions src/Network/Network.Management.Sdk/Generated/AdminRulesOperations.cs

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,99 +1,88 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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.
// </auto-generated>

// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Azure.Management.Network
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for ApplicationGatewayPrivateLinkResourcesOperations.
/// Extension methods for ApplicationGatewayPrivateLinkResourcesOperations
/// </summary>
public static partial class ApplicationGatewayPrivateLinkResourcesOperationsExtensions
{
/// <summary>
/// Lists all private link resources on an application gateway.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='applicationGatewayName'>
/// The name of the application gateway.
/// </param>
public static IPage<ApplicationGatewayPrivateLinkResource> List(this IApplicationGatewayPrivateLinkResourcesOperations operations, string resourceGroupName, string applicationGatewayName)
{
return operations.ListAsync(resourceGroupName, applicationGatewayName).GetAwaiter().GetResult();
}
/// <summary>
/// Lists all private link resources on an application gateway.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='applicationGatewayName'>
/// The name of the application gateway.
/// </param>
public static Microsoft.Rest.Azure.IPage<ApplicationGatewayPrivateLinkResource> List(this IApplicationGatewayPrivateLinkResourcesOperations operations, string resourceGroupName, string applicationGatewayName)
{
return ((IApplicationGatewayPrivateLinkResourcesOperations)operations).ListAsync(resourceGroupName, applicationGatewayName).GetAwaiter().GetResult();
}

/// <summary>
/// Lists all private link resources on an application gateway.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='applicationGatewayName'>
/// The name of the application gateway.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<ApplicationGatewayPrivateLinkResource>> ListAsync(this IApplicationGatewayPrivateLinkResourcesOperations operations, string resourceGroupName, string applicationGatewayName, CancellationToken cancellationToken = default(CancellationToken))
/// <summary>
/// Lists all private link resources on an application gateway.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='applicationGatewayName'>
/// The name of the application gateway.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<ApplicationGatewayPrivateLinkResource>> ListAsync(this IApplicationGatewayPrivateLinkResourcesOperations operations, string resourceGroupName, string applicationGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, applicationGatewayName, null, cancellationToken).ConfigureAwait(false))
{
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, applicationGatewayName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
return _result.Body;
}
}
/// <summary>
/// Lists all private link resources on an application gateway.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static Microsoft.Rest.Azure.IPage<ApplicationGatewayPrivateLinkResource> ListNext(this IApplicationGatewayPrivateLinkResourcesOperations operations, string nextPageLink)
{
return ((IApplicationGatewayPrivateLinkResourcesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Lists all private link resources on an application gateway.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static IPage<ApplicationGatewayPrivateLinkResource> ListNext(this IApplicationGatewayPrivateLinkResourcesOperations operations, string nextPageLink)
/// <summary>
/// Lists all private link resources on an application gateway.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<ApplicationGatewayPrivateLinkResource>> ListNextAsync(this IApplicationGatewayPrivateLinkResourcesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
return _result.Body;
}

/// <summary>
/// Lists all private link resources on an application gateway.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<ApplicationGatewayPrivateLinkResource>> ListNextAsync(this IApplicationGatewayPrivateLinkResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

}
}
}
Loading

0 comments on commit 5b585ff

Please sign in to comment.