Skip to content

Commit

Permalink
[Devtestlabs] Migrated DevTestLabs SDK to generated SDK (Azure#26648)
Browse files Browse the repository at this point in the history
* generate DevTestLabs by autorest v2

* add DevTestLabs.Management.Sdk

* use 2016-05-15 api vesion

* migrate DevTestLabs to autorest.powershell

* update and record the test

* Update ChangeLog.md

* Revert "Update ChangeLog.md"

This reverts commit 4788e93.

* Update ChangeLog.md

---------

Co-authored-by: Yabo Hu <yabhu@microsoft.com>
  • Loading branch information
JoyerJin and VeryEarly authored Nov 12, 2024
1 parent f59a747 commit 7efe0db
Show file tree
Hide file tree
Showing 252 changed files with 58,189 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PsModuleName>DevTestLabs</PsModuleName>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.Azure.PowerShell.DevTestLabs.Management.Sdk</AssemblyName>
<RootNamespace>Microsoft.Azure.Management.DevTestLabs</RootNamespace>
<NoWarn>$(NoWarn);CS0108;CS1573</NoWarn>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
</Project>

Large diffs are not rendered by default.

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

/// <summary>
/// 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='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>
/// 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 _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: &#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))
{
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>
/// <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 _result.Body;
}
}
}
}
Loading

0 comments on commit 7efe0db

Please sign in to comment.