Skip to content

Commit

Permalink
migrate DevTestLabs to autorest.powershell
Browse files Browse the repository at this point in the history
  • Loading branch information
JoyerJin committed Nov 1, 2024
1 parent d4c7c05 commit 19be19a
Show file tree
Hide file tree
Showing 240 changed files with 24,749 additions and 19,824 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,158 +1,145 @@
// <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.DevTestLabs
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
using Models;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for ArmTemplatesOperations.
/// Extension methods for ArmTemplatesOperations
/// </summary>
public static partial class ArmTemplatesOperationsExtensions
{
/// <summary>
/// List azure resource manager templates in a given artifact source.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='labName'>
/// The name of the lab.
/// </param>
/// <param name='artifactSourceName'>
/// The name of the artifact source.
/// </param>
/// <param name='odataQuery'>
/// OData parameters to apply to the operation.
/// </param>
public static IPage<ArmTemplate> List(this IArmTemplatesOperations operations, string labName, string artifactSourceName, ODataQuery<ArmTemplate> odataQuery = default(ODataQuery<ArmTemplate>))
{
return operations.ListAsync(labName, artifactSourceName, odataQuery).GetAwaiter().GetResult();
}

/// <summary>
/// List azure resource manager templates in a given artifact source.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='labName'>
/// The name of the lab.
/// </param>
/// <param name='artifactSourceName'>
/// The name of the artifact source.
/// </param>
/// <param name='odataQuery'>
/// OData parameters to apply to the operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<ArmTemplate>> ListAsync(this IArmTemplatesOperations operations, string labName, string artifactSourceName, ODataQuery<ArmTemplate> odataQuery = default(ODataQuery<ArmTemplate>), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(labName, artifactSourceName, odataQuery, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// List azure resource manager templates in a given artifact source.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='odataQuery'>
///
/// </param>
/// <param name='labName'>
/// The name of the lab.
/// </param>
/// <param name='artifactSourceName'>
/// The name of the artifact source.
/// </param>
public static Microsoft.Rest.Azure.IPage<ArmTemplate> List(this IArmTemplatesOperations operations, string labName, string artifactSourceName, Microsoft.Rest.Azure.OData.ODataQuery<ArmTemplate> odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery<ArmTemplate>))
{
return ((IArmTemplatesOperations)operations).ListAsync(labName, artifactSourceName, odataQuery).GetAwaiter().GetResult();
}

/// <summary>
/// Get azure resource manager template.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='labName'>
/// The name of the lab.
/// </param>
/// <param name='artifactSourceName'>
/// The name of the artifact source.
/// </param>
/// <param name='name'>
/// The name of the azure Resource Manager template.
/// </param>
/// <param name='expand'>
/// Specify the $expand query. Example: 'properties($select=displayName)'
/// </param>
public static ArmTemplate Get(this IArmTemplatesOperations operations, string labName, string artifactSourceName, string name, string expand = default(string))
/// <summary>
/// List azure resource manager templates in a given artifact source.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='odataQuery'>
///
/// </param>
/// <param name='labName'>
/// The name of the lab.
/// </param>
/// <param name='artifactSourceName'>
/// The name of the artifact source.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<ArmTemplate>> ListAsync(this IArmTemplatesOperations operations, string labName, string artifactSourceName, Microsoft.Rest.Azure.OData.ODataQuery<ArmTemplate> odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery<ArmTemplate>), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(labName, artifactSourceName, odataQuery, null, cancellationToken).ConfigureAwait(false))
{
return operations.GetAsync(labName, artifactSourceName, name, expand).GetAwaiter().GetResult();
return _result.Body;
}
}
/// <summary>
/// Get azure resource manager template.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='labName'>
/// The name of the lab.
/// </param>
/// <param name='artifactSourceName'>
/// The name of the artifact source.
/// </param>
/// <param name='name'>
/// The name of the azure Resource Manager template.
/// </param>
/// <param name='expand'>
/// Specify the $expand query. Example: &#39;properties($select=displayName)&#39;
/// </param>
public static ArmTemplate Get(this IArmTemplatesOperations operations, string labName, string artifactSourceName, string name, string expand = default(string))
{
return ((IArmTemplatesOperations)operations).GetAsync(labName, artifactSourceName, name, expand).GetAwaiter().GetResult();
}

/// <summary>
/// Get azure resource manager template.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='labName'>
/// The name of the lab.
/// </param>
/// <param name='artifactSourceName'>
/// The name of the artifact source.
/// </param>
/// <param name='name'>
/// The name of the azure Resource Manager template.
/// </param>
/// <param name='expand'>
/// Specify the $expand query. Example: 'properties($select=displayName)'
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ArmTemplate> GetAsync(this IArmTemplatesOperations operations, string labName, string artifactSourceName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
/// <summary>
/// Get azure resource manager template.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='labName'>
/// The name of the lab.
/// </param>
/// <param name='artifactSourceName'>
/// The name of the artifact source.
/// </param>
/// <param name='name'>
/// The name of the azure Resource Manager template.
/// </param>
/// <param name='expand'>
/// Specify the $expand query. Example: &#39;properties($select=displayName)&#39;
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<ArmTemplate> GetAsync(this IArmTemplatesOperations operations, string labName, string artifactSourceName, string name, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(labName, artifactSourceName, name, expand, null, cancellationToken).ConfigureAwait(false))
{
using (var _result = await operations.GetWithHttpMessagesAsync(labName, artifactSourceName, name, expand, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
return _result.Body;
}
}
/// <summary>
/// List azure resource manager templates in a given artifact source.
/// </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<ArmTemplate> ListNext(this IArmTemplatesOperations operations, string nextPageLink)
{
return ((IArmTemplatesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// List azure resource manager templates in a given artifact source.
/// </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<ArmTemplate> ListNext(this IArmTemplatesOperations operations, string nextPageLink)
/// <summary>
/// List azure resource manager templates in a given artifact source.
/// </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<ArmTemplate>> ListNextAsync(this IArmTemplatesOperations 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>
/// List azure resource manager templates in a given artifact source.
/// </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<ArmTemplate>> ListNextAsync(this IArmTemplatesOperations 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 19be19a

Please sign in to comment.