|
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. See License.txt in the project root for license information. |
| 3 | +// Code generated by Microsoft (R) AutoRest Code Generator. |
| 4 | +// Changes may cause incorrect behavior and will be lost if the code is regenerated. |
| 5 | +namespace Microsoft.Azure.Management.DevTestLabs |
| 6 | +{ |
| 7 | + using Microsoft.Rest.Azure; |
| 8 | + using Models; |
| 9 | + |
| 10 | + /// <summary> |
| 11 | + /// Extension methods for ArmTemplatesOperations |
| 12 | + /// </summary> |
| 13 | + public static partial class ArmTemplatesOperationsExtensions |
| 14 | + { |
| 15 | + /// <summary> |
| 16 | + /// List azure resource manager templates in a given artifact source. |
| 17 | + /// </summary> |
| 18 | + /// <param name='operations'> |
| 19 | + /// The operations group for this extension method. |
| 20 | + /// </param> |
| 21 | + /// <param name='odataQuery'> |
| 22 | + /// |
| 23 | + /// </param> |
| 24 | + /// <param name='labName'> |
| 25 | + /// The name of the lab. |
| 26 | + /// </param> |
| 27 | + /// <param name='artifactSourceName'> |
| 28 | + /// The name of the artifact source. |
| 29 | + /// </param> |
| 30 | + 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>)) |
| 31 | + { |
| 32 | + return ((IArmTemplatesOperations)operations).ListAsync(labName, artifactSourceName, odataQuery).GetAwaiter().GetResult(); |
| 33 | + } |
| 34 | + |
| 35 | + /// <summary> |
| 36 | + /// List azure resource manager templates in a given artifact source. |
| 37 | + /// </summary> |
| 38 | + /// <param name='operations'> |
| 39 | + /// The operations group for this extension method. |
| 40 | + /// </param> |
| 41 | + /// <param name='odataQuery'> |
| 42 | + /// |
| 43 | + /// </param> |
| 44 | + /// <param name='labName'> |
| 45 | + /// The name of the lab. |
| 46 | + /// </param> |
| 47 | + /// <param name='artifactSourceName'> |
| 48 | + /// The name of the artifact source. |
| 49 | + /// </param> |
| 50 | + /// <param name='cancellationToken'> |
| 51 | + /// The cancellation token. |
| 52 | + /// </param> |
| 53 | + 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)) |
| 54 | + { |
| 55 | + using (var _result = await operations.ListWithHttpMessagesAsync(labName, artifactSourceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) |
| 56 | + { |
| 57 | + return _result.Body; |
| 58 | + } |
| 59 | + } |
| 60 | + /// <summary> |
| 61 | + /// Get azure resource manager template. |
| 62 | + /// </summary> |
| 63 | + /// <param name='operations'> |
| 64 | + /// The operations group for this extension method. |
| 65 | + /// </param> |
| 66 | + /// <param name='labName'> |
| 67 | + /// The name of the lab. |
| 68 | + /// </param> |
| 69 | + /// <param name='artifactSourceName'> |
| 70 | + /// The name of the artifact source. |
| 71 | + /// </param> |
| 72 | + /// <param name='name'> |
| 73 | + /// The name of the azure Resource Manager template. |
| 74 | + /// </param> |
| 75 | + /// <param name='expand'> |
| 76 | + /// Specify the $expand query. Example: 'properties($select=displayName)' |
| 77 | + /// </param> |
| 78 | + public static ArmTemplate Get(this IArmTemplatesOperations operations, string labName, string artifactSourceName, string name, string expand = default(string)) |
| 79 | + { |
| 80 | + return ((IArmTemplatesOperations)operations).GetAsync(labName, artifactSourceName, name, expand).GetAwaiter().GetResult(); |
| 81 | + } |
| 82 | + |
| 83 | + /// <summary> |
| 84 | + /// Get azure resource manager template. |
| 85 | + /// </summary> |
| 86 | + /// <param name='operations'> |
| 87 | + /// The operations group for this extension method. |
| 88 | + /// </param> |
| 89 | + /// <param name='labName'> |
| 90 | + /// The name of the lab. |
| 91 | + /// </param> |
| 92 | + /// <param name='artifactSourceName'> |
| 93 | + /// The name of the artifact source. |
| 94 | + /// </param> |
| 95 | + /// <param name='name'> |
| 96 | + /// The name of the azure Resource Manager template. |
| 97 | + /// </param> |
| 98 | + /// <param name='expand'> |
| 99 | + /// Specify the $expand query. Example: 'properties($select=displayName)' |
| 100 | + /// </param> |
| 101 | + /// <param name='cancellationToken'> |
| 102 | + /// The cancellation token. |
| 103 | + /// </param> |
| 104 | + 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)) |
| 105 | + { |
| 106 | + using (var _result = await operations.GetWithHttpMessagesAsync(labName, artifactSourceName, name, expand, null, cancellationToken).ConfigureAwait(false)) |
| 107 | + { |
| 108 | + return _result.Body; |
| 109 | + } |
| 110 | + } |
| 111 | + /// <summary> |
| 112 | + /// List azure resource manager templates in a given artifact source. |
| 113 | + /// </summary> |
| 114 | + /// <param name='operations'> |
| 115 | + /// The operations group for this extension method. |
| 116 | + /// </param> |
| 117 | + /// <param name='nextPageLink'> |
| 118 | + /// The NextLink from the previous successful call to List operation. |
| 119 | + /// </param> |
| 120 | + public static Microsoft.Rest.Azure.IPage<ArmTemplate> ListNext(this IArmTemplatesOperations operations, string nextPageLink) |
| 121 | + { |
| 122 | + return ((IArmTemplatesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); |
| 123 | + } |
| 124 | + |
| 125 | + /// <summary> |
| 126 | + /// List azure resource manager templates in a given artifact source. |
| 127 | + /// </summary> |
| 128 | + /// <param name='operations'> |
| 129 | + /// The operations group for this extension method. |
| 130 | + /// </param> |
| 131 | + /// <param name='nextPageLink'> |
| 132 | + /// The NextLink from the previous successful call to List operation. |
| 133 | + /// </param> |
| 134 | + /// <param name='cancellationToken'> |
| 135 | + /// The cancellation token. |
| 136 | + /// </param> |
| 137 | + 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)) |
| 138 | + { |
| 139 | + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) |
| 140 | + { |
| 141 | + return _result.Body; |
| 142 | + } |
| 143 | + } |
| 144 | + } |
| 145 | +} |
0 commit comments