| | 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 Features. |
| | 21 | | /// </summary> |
| | 22 | | public static partial class FeaturesExtensions |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Creates a new phraselist feature in a version of the application. |
| | 26 | | /// </summary> |
| | 27 | | /// <param name='operations'> |
| | 28 | | /// The operations group for this extension method. |
| | 29 | | /// </param> |
| | 30 | | /// <param name='appId'> |
| | 31 | | /// The application ID. |
| | 32 | | /// </param> |
| | 33 | | /// <param name='versionId'> |
| | 34 | | /// The version ID. |
| | 35 | | /// </param> |
| | 36 | | /// <param name='phraselistCreateObject'> |
| | 37 | | /// A Phraselist object containing Name, comma-separated Phrases and the |
| | 38 | | /// isExchangeable boolean. Default value for isExchangeable is true. |
| | 39 | | /// </param> |
| | 40 | | /// <param name='cancellationToken'> |
| | 41 | | /// The cancellation token. |
| | 42 | | /// </param> |
| | 43 | | public static async Task<int?> AddPhraseListAsync(this IFeatures operations, System.Guid appId, string versi |
| | 44 | | { |
| 11 | 45 | | using (var _result = await operations.AddPhraseListWithHttpMessagesAsync(appId, versionId, phraselistCre |
| | 46 | | { |
| 11 | 47 | | return _result.Body; |
| | 48 | | } |
| 11 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Gets all the phraselist features in a version of the application. |
| | 53 | | /// </summary> |
| | 54 | | /// <param name='operations'> |
| | 55 | | /// The operations group for this extension method. |
| | 56 | | /// </param> |
| | 57 | | /// <param name='appId'> |
| | 58 | | /// The application ID. |
| | 59 | | /// </param> |
| | 60 | | /// <param name='versionId'> |
| | 61 | | /// The version ID. |
| | 62 | | /// </param> |
| | 63 | | /// <param name='skip'> |
| | 64 | | /// The number of entries to skip. Default value is 0. |
| | 65 | | /// </param> |
| | 66 | | /// <param name='take'> |
| | 67 | | /// The number of entries to return. Maximum page size is 500. Default is 100. |
| | 68 | | /// </param> |
| | 69 | | /// <param name='cancellationToken'> |
| | 70 | | /// The cancellation token. |
| | 71 | | /// </param> |
| | 72 | | public static async Task<IList<PhraseListFeatureInfo>> ListPhraseListsAsync(this IFeatures operations, Syste |
| | 73 | | { |
| 2 | 74 | | using (var _result = await operations.ListPhraseListsWithHttpMessagesAsync(appId, versionId, skip, take, |
| | 75 | | { |
| 2 | 76 | | return _result.Body; |
| | 77 | | } |
| 2 | 78 | | } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Gets all the extraction phraselist and pattern features in a version of the |
| | 82 | | /// application. |
| | 83 | | /// </summary> |
| | 84 | | /// <param name='operations'> |
| | 85 | | /// The operations group for this extension method. |
| | 86 | | /// </param> |
| | 87 | | /// <param name='appId'> |
| | 88 | | /// The application ID. |
| | 89 | | /// </param> |
| | 90 | | /// <param name='versionId'> |
| | 91 | | /// The version ID. |
| | 92 | | /// </param> |
| | 93 | | /// <param name='skip'> |
| | 94 | | /// The number of entries to skip. Default value is 0. |
| | 95 | | /// </param> |
| | 96 | | /// <param name='take'> |
| | 97 | | /// The number of entries to return. Maximum page size is 500. Default is 100. |
| | 98 | | /// </param> |
| | 99 | | /// <param name='cancellationToken'> |
| | 100 | | /// The cancellation token. |
| | 101 | | /// </param> |
| | 102 | | public static async Task<FeaturesResponseObject> ListAsync(this IFeatures operations, System.Guid appId, str |
| | 103 | | { |
| 0 | 104 | | using (var _result = await operations.ListWithHttpMessagesAsync(appId, versionId, skip, take, null, canc |
| | 105 | | { |
| 0 | 106 | | return _result.Body; |
| | 107 | | } |
| 0 | 108 | | } |
| | 109 | |
|
| | 110 | | /// <summary> |
| | 111 | | /// Gets phraselist feature info in a version of the application. |
| | 112 | | /// </summary> |
| | 113 | | /// <param name='operations'> |
| | 114 | | /// The operations group for this extension method. |
| | 115 | | /// </param> |
| | 116 | | /// <param name='appId'> |
| | 117 | | /// The application ID. |
| | 118 | | /// </param> |
| | 119 | | /// <param name='versionId'> |
| | 120 | | /// The version ID. |
| | 121 | | /// </param> |
| | 122 | | /// <param name='phraselistId'> |
| | 123 | | /// The ID of the feature to be retrieved. |
| | 124 | | /// </param> |
| | 125 | | /// <param name='cancellationToken'> |
| | 126 | | /// The cancellation token. |
| | 127 | | /// </param> |
| | 128 | | public static async Task<PhraseListFeatureInfo> GetPhraseListAsync(this IFeatures operations, System.Guid ap |
| | 129 | | { |
| 3 | 130 | | using (var _result = await operations.GetPhraseListWithHttpMessagesAsync(appId, versionId, phraselistId, |
| | 131 | | { |
| 3 | 132 | | return _result.Body; |
| | 133 | | } |
| 3 | 134 | | } |
| | 135 | |
|
| | 136 | | /// <summary> |
| | 137 | | /// Updates the phrases, the state and the name of the phraselist feature in a |
| | 138 | | /// version of the application. |
| | 139 | | /// </summary> |
| | 140 | | /// <param name='operations'> |
| | 141 | | /// The operations group for this extension method. |
| | 142 | | /// </param> |
| | 143 | | /// <param name='appId'> |
| | 144 | | /// The application ID. |
| | 145 | | /// </param> |
| | 146 | | /// <param name='versionId'> |
| | 147 | | /// The version ID. |
| | 148 | | /// </param> |
| | 149 | | /// <param name='phraselistId'> |
| | 150 | | /// The ID of the feature to be updated. |
| | 151 | | /// </param> |
| | 152 | | /// <param name='phraselistUpdateObject'> |
| | 153 | | /// The new values for: - Just a boolean called IsActive, in which case the |
| | 154 | | /// status of the feature will be changed. - Name, Pattern, Mode, and a boolean |
| | 155 | | /// called IsActive to update the feature. |
| | 156 | | /// </param> |
| | 157 | | /// <param name='cancellationToken'> |
| | 158 | | /// The cancellation token. |
| | 159 | | /// </param> |
| | 160 | | public static async Task<OperationStatus> UpdatePhraseListAsync(this IFeatures operations, System.Guid appId |
| | 161 | | { |
| 0 | 162 | | using (var _result = await operations.UpdatePhraseListWithHttpMessagesAsync(appId, versionId, phraselist |
| | 163 | | { |
| 0 | 164 | | return _result.Body; |
| | 165 | | } |
| 0 | 166 | | } |
| | 167 | |
|
| | 168 | | /// <summary> |
| | 169 | | /// Deletes a phraselist feature from a version of the application. |
| | 170 | | /// </summary> |
| | 171 | | /// <param name='operations'> |
| | 172 | | /// The operations group for this extension method. |
| | 173 | | /// </param> |
| | 174 | | /// <param name='appId'> |
| | 175 | | /// The application ID. |
| | 176 | | /// </param> |
| | 177 | | /// <param name='versionId'> |
| | 178 | | /// The version ID. |
| | 179 | | /// </param> |
| | 180 | | /// <param name='phraselistId'> |
| | 181 | | /// The ID of the feature to be deleted. |
| | 182 | | /// </param> |
| | 183 | | /// <param name='cancellationToken'> |
| | 184 | | /// The cancellation token. |
| | 185 | | /// </param> |
| | 186 | | public static async Task<OperationStatus> DeletePhraseListAsync(this IFeatures operations, System.Guid appId |
| | 187 | | { |
| 11 | 188 | | using (var _result = await operations.DeletePhraseListWithHttpMessagesAsync(appId, versionId, phraselist |
| | 189 | | { |
| 11 | 190 | | return _result.Body; |
| | 191 | | } |
| 11 | 192 | | } |
| | 193 | |
|
| | 194 | | /// <summary> |
| | 195 | | /// Adds a new feature relation to be used by the intent in a version of the |
| | 196 | | /// application. |
| | 197 | | /// </summary> |
| | 198 | | /// <param name='operations'> |
| | 199 | | /// The operations group for this extension method. |
| | 200 | | /// </param> |
| | 201 | | /// <param name='appId'> |
| | 202 | | /// The application ID. |
| | 203 | | /// </param> |
| | 204 | | /// <param name='versionId'> |
| | 205 | | /// The version ID. |
| | 206 | | /// </param> |
| | 207 | | /// <param name='intentId'> |
| | 208 | | /// The intent classifier ID. |
| | 209 | | /// </param> |
| | 210 | | /// <param name='featureRelationCreateObject'> |
| | 211 | | /// A Feature relation information object. |
| | 212 | | /// </param> |
| | 213 | | /// <param name='cancellationToken'> |
| | 214 | | /// The cancellation token. |
| | 215 | | /// </param> |
| | 216 | | public static async Task<OperationStatus> AddIntentFeatureAsync(this IFeatures operations, System.Guid appId |
| | 217 | | { |
| 4 | 218 | | using (var _result = await operations.AddIntentFeatureWithHttpMessagesAsync(appId, versionId, intentId, |
| | 219 | | { |
| 4 | 220 | | return _result.Body; |
| | 221 | | } |
| 4 | 222 | | } |
| | 223 | |
|
| | 224 | | /// <summary> |
| | 225 | | /// Adds a new feature relation to be used by the entity in a version of the |
| | 226 | | /// application. |
| | 227 | | /// </summary> |
| | 228 | | /// <param name='operations'> |
| | 229 | | /// The operations group for this extension method. |
| | 230 | | /// </param> |
| | 231 | | /// <param name='appId'> |
| | 232 | | /// The application ID. |
| | 233 | | /// </param> |
| | 234 | | /// <param name='versionId'> |
| | 235 | | /// The version ID. |
| | 236 | | /// </param> |
| | 237 | | /// <param name='entityId'> |
| | 238 | | /// The entity extractor ID. |
| | 239 | | /// </param> |
| | 240 | | /// <param name='featureRelationCreateObject'> |
| | 241 | | /// A Feature relation information object. |
| | 242 | | /// </param> |
| | 243 | | /// <param name='cancellationToken'> |
| | 244 | | /// The cancellation token. |
| | 245 | | /// </param> |
| | 246 | | public static async Task<OperationStatus> AddEntityFeatureAsync(this IFeatures operations, System.Guid appId |
| | 247 | | { |
| 5 | 248 | | using (var _result = await operations.AddEntityFeatureWithHttpMessagesAsync(appId, versionId, entityId, |
| | 249 | | { |
| 5 | 250 | | return _result.Body; |
| | 251 | | } |
| 5 | 252 | | } |
| | 253 | |
|
| | 254 | | } |
| | 255 | | } |