Skip to content

Commit

Permalink
Generated Network SDK based on Swagger's October release (#4981)
Browse files Browse the repository at this point in the history
* Generated Network SDK based on Swagger's October release

* Update Network's change log
  • Loading branch information
anton-evseev authored and shahabhijeet committed Oct 31, 2018
1 parent a50c4ab commit b5365ba
Show file tree
Hide file tree
Showing 44 changed files with 5,952 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 404)
if ((int)_statusCode != 200)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
// <auto-generated>
// 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.
// </auto-generated>

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 ExpressRouteLinksOperations.
/// </summary>
public static partial class ExpressRouteLinksOperationsExtensions
{
/// <summary>
/// Retrieves the specified ExpressRouteLink resource.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='expressRoutePortName'>
/// The name of the ExpressRoutePort resource.
/// </param>
/// <param name='linkName'>
/// The name of the ExpressRouteLink resource.
/// </param>
public static ExpressRouteLink Get(this IExpressRouteLinksOperations operations, string resourceGroupName, string expressRoutePortName, string linkName)
{
return operations.GetAsync(resourceGroupName, expressRoutePortName, linkName).GetAwaiter().GetResult();
}

/// <summary>
/// Retrieves the specified ExpressRouteLink resource.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='expressRoutePortName'>
/// The name of the ExpressRoutePort resource.
/// </param>
/// <param name='linkName'>
/// The name of the ExpressRouteLink resource.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ExpressRouteLink> GetAsync(this IExpressRouteLinksOperations operations, string resourceGroupName, string expressRoutePortName, string linkName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, expressRoutePortName, linkName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Retrieve the ExpressRouteLink sub-resources of the specified
/// ExpressRoutePort resource.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='expressRoutePortName'>
/// The name of the ExpressRoutePort resource.
/// </param>
public static IPage<ExpressRouteLink> List(this IExpressRouteLinksOperations operations, string resourceGroupName, string expressRoutePortName)
{
return operations.ListAsync(resourceGroupName, expressRoutePortName).GetAwaiter().GetResult();
}

/// <summary>
/// Retrieve the ExpressRouteLink sub-resources of the specified
/// ExpressRoutePort resource.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='expressRoutePortName'>
/// The name of the ExpressRoutePort resource.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<ExpressRouteLink>> ListAsync(this IExpressRouteLinksOperations operations, string resourceGroupName, string expressRoutePortName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, expressRoutePortName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Retrieve the ExpressRouteLink sub-resources of the specified
/// ExpressRoutePort resource.
/// </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<ExpressRouteLink> ListNext(this IExpressRouteLinksOperations operations, string nextPageLink)
{
return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Retrieve the ExpressRouteLink sub-resources of the specified
/// ExpressRoutePort resource.
/// </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<ExpressRouteLink>> ListNextAsync(this IExpressRouteLinksOperations 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 b5365ba

Please sign in to comment.