| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring |
| | 12 | | { |
| | 13 | | using Models; |
| | 14 | | using System.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Threading; |
| | 17 | | using System.Threading.Tasks; |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// Extension methods for AzureAccounts. |
| | 21 | | /// </summary> |
| | 22 | | public static partial class AzureAccountsExtensions |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// apps - Assign a LUIS Azure account to an application |
| | 26 | | /// </summary> |
| | 27 | | /// <remarks> |
| | 28 | | /// Assigns an Azure account to the application. |
| | 29 | | /// </remarks> |
| | 30 | | /// <param name='operations'> |
| | 31 | | /// The operations group for this extension method. |
| | 32 | | /// </param> |
| | 33 | | /// <param name='appId'> |
| | 34 | | /// The application ID. |
| | 35 | | /// </param> |
| | 36 | | /// <param name='armToken'> |
| | 37 | | /// The custom arm token header to use; containing the user's ARM token used to |
| | 38 | | /// validate azure accounts information. |
| | 39 | | /// </param> |
| | 40 | | /// <param name='azureAccountInfoObject'> |
| | 41 | | /// The Azure account information object. |
| | 42 | | /// </param> |
| | 43 | | /// <param name='cancellationToken'> |
| | 44 | | /// The cancellation token. |
| | 45 | | /// </param> |
| | 46 | | public static async Task<OperationStatus> AssignToAppAsync(this IAzureAccounts operations, System.Guid appId |
| | 47 | | { |
| 0 | 48 | | using (var _result = await operations.AssignToAppWithHttpMessagesAsync(appId, armToken, azureAccountInfo |
| | 49 | | { |
| 0 | 50 | | return _result.Body; |
| | 51 | | } |
| 0 | 52 | | } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// apps - Get LUIS Azure accounts assigned to the application |
| | 56 | | /// </summary> |
| | 57 | | /// <remarks> |
| | 58 | | /// Gets the LUIS Azure accounts assigned to the application for the user using |
| | 59 | | /// his ARM token. |
| | 60 | | /// </remarks> |
| | 61 | | /// <param name='operations'> |
| | 62 | | /// The operations group for this extension method. |
| | 63 | | /// </param> |
| | 64 | | /// <param name='appId'> |
| | 65 | | /// The application ID. |
| | 66 | | /// </param> |
| | 67 | | /// <param name='armToken'> |
| | 68 | | /// The custom arm token header to use; containing the user's ARM token used to |
| | 69 | | /// validate azure accounts information. |
| | 70 | | /// </param> |
| | 71 | | /// <param name='cancellationToken'> |
| | 72 | | /// The cancellation token. |
| | 73 | | /// </param> |
| | 74 | | public static async Task<IList<AzureAccountInfoObject>> GetAssignedAsync(this IAzureAccounts operations, Sys |
| | 75 | | { |
| 0 | 76 | | using (var _result = await operations.GetAssignedWithHttpMessagesAsync(appId, armToken, null, cancellati |
| | 77 | | { |
| 0 | 78 | | return _result.Body; |
| | 79 | | } |
| 0 | 80 | | } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// apps - Removes an assigned LUIS Azure account from an application |
| | 84 | | /// </summary> |
| | 85 | | /// <remarks> |
| | 86 | | /// Removes assigned Azure account from the application. |
| | 87 | | /// </remarks> |
| | 88 | | /// <param name='operations'> |
| | 89 | | /// The operations group for this extension method. |
| | 90 | | /// </param> |
| | 91 | | /// <param name='appId'> |
| | 92 | | /// The application ID. |
| | 93 | | /// </param> |
| | 94 | | /// <param name='armToken'> |
| | 95 | | /// The custom arm token header to use; containing the user's ARM token used to |
| | 96 | | /// validate azure accounts information. |
| | 97 | | /// </param> |
| | 98 | | /// <param name='azureAccountInfoObject'> |
| | 99 | | /// The Azure account information object. |
| | 100 | | /// </param> |
| | 101 | | /// <param name='cancellationToken'> |
| | 102 | | /// The cancellation token. |
| | 103 | | /// </param> |
| | 104 | | public static async Task<OperationStatus> RemoveFromAppAsync(this IAzureAccounts operations, System.Guid app |
| | 105 | | { |
| 0 | 106 | | using (var _result = await operations.RemoveFromAppWithHttpMessagesAsync(appId, armToken, azureAccountIn |
| | 107 | | { |
| 0 | 108 | | return _result.Body; |
| | 109 | | } |
| 0 | 110 | | } |
| | 111 | |
|
| | 112 | | /// <summary> |
| | 113 | | /// user - Get LUIS Azure accounts |
| | 114 | | /// </summary> |
| | 115 | | /// <remarks> |
| | 116 | | /// Gets the LUIS Azure accounts for the user using his ARM token. |
| | 117 | | /// </remarks> |
| | 118 | | /// <param name='operations'> |
| | 119 | | /// The operations group for this extension method. |
| | 120 | | /// </param> |
| | 121 | | /// <param name='armToken'> |
| | 122 | | /// The custom arm token header to use; containing the user's ARM token used to |
| | 123 | | /// validate azure accounts information. |
| | 124 | | /// </param> |
| | 125 | | /// <param name='cancellationToken'> |
| | 126 | | /// The cancellation token. |
| | 127 | | /// </param> |
| | 128 | | public static async Task<IList<AzureAccountInfoObject>> ListUserLUISAccountsAsync(this IAzureAccounts operat |
| | 129 | | { |
| 0 | 130 | | using (var _result = await operations.ListUserLUISAccountsWithHttpMessagesAsync(armToken, null, cancella |
| | 131 | | { |
| 0 | 132 | | return _result.Body; |
| | 133 | | } |
| 0 | 134 | | } |
| | 135 | |
|
| | 136 | | } |
| | 137 | | } |