| | | 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.IO; |
| | | 17 | | using System.Threading; |
| | | 18 | | using System.Threading.Tasks; |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Extension methods for Apps. |
| | | 22 | | /// </summary> |
| | | 23 | | public static partial class AppsExtensions |
| | | 24 | | { |
| | | 25 | | /// <summary> |
| | | 26 | | /// Creates a new LUIS app. |
| | | 27 | | /// </summary> |
| | | 28 | | /// <param name='operations'> |
| | | 29 | | /// The operations group for this extension method. |
| | | 30 | | /// </param> |
| | | 31 | | /// <param name='applicationCreateObject'> |
| | | 32 | | /// An application containing Name, Description (optional), Culture, Usage |
| | | 33 | | /// Scenario (optional), Domain (optional) and initial version ID (optional) of |
| | | 34 | | /// the application. Default value for the version ID is "0.1". Note: the |
| | | 35 | | /// culture cannot be changed after the app is created. |
| | | 36 | | /// </param> |
| | | 37 | | /// <param name='cancellationToken'> |
| | | 38 | | /// The cancellation token. |
| | | 39 | | /// </param> |
| | | 40 | | public static async Task<System.Guid> AddAsync(this IApps operations, ApplicationCreateObject applicationCre |
| | | 41 | | { |
| | 27 | 42 | | using (var _result = await operations.AddWithHttpMessagesAsync(applicationCreateObject, null, cancellati |
| | | 43 | | { |
| | 27 | 44 | | return _result.Body; |
| | | 45 | | } |
| | 27 | 46 | | } |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Lists all of the user's applications. |
| | | 50 | | /// </summary> |
| | | 51 | | /// <param name='operations'> |
| | | 52 | | /// The operations group for this extension method. |
| | | 53 | | /// </param> |
| | | 54 | | /// <param name='skip'> |
| | | 55 | | /// The number of entries to skip. Default value is 0. |
| | | 56 | | /// </param> |
| | | 57 | | /// <param name='take'> |
| | | 58 | | /// The number of entries to return. Maximum page size is 500. Default is 100. |
| | | 59 | | /// </param> |
| | | 60 | | /// <param name='cancellationToken'> |
| | | 61 | | /// The cancellation token. |
| | | 62 | | /// </param> |
| | | 63 | | public static async Task<IList<ApplicationInfoResponse>> ListAsync(this IApps operations, int? skip = 0, int |
| | | 64 | | { |
| | 2 | 65 | | using (var _result = await operations.ListWithHttpMessagesAsync(skip, take, null, cancellationToken).Con |
| | | 66 | | { |
| | 2 | 67 | | return _result.Body; |
| | | 68 | | } |
| | 2 | 69 | | } |
| | | 70 | | |
| | | 71 | | /// <summary> |
| | | 72 | | /// Imports an application to LUIS, the application's structure is included in |
| | | 73 | | /// the request body. |
| | | 74 | | /// </summary> |
| | | 75 | | /// <param name='operations'> |
| | | 76 | | /// The operations group for this extension method. |
| | | 77 | | /// </param> |
| | | 78 | | /// <param name='luisApp'> |
| | | 79 | | /// A LUIS application structure. |
| | | 80 | | /// </param> |
| | | 81 | | /// <param name='appName'> |
| | | 82 | | /// The application name to create. If not specified, the application name will |
| | | 83 | | /// be read from the imported object. If the application name already exists, |
| | | 84 | | /// an error is returned. |
| | | 85 | | /// </param> |
| | | 86 | | /// <param name='cancellationToken'> |
| | | 87 | | /// The cancellation token. |
| | | 88 | | /// </param> |
| | | 89 | | public static async Task<System.Guid> ImportAsync(this IApps operations, LuisApp luisApp, string appName = d |
| | | 90 | | { |
| | 2 | 91 | | using (var _result = await operations.ImportWithHttpMessagesAsync(luisApp, appName, null, cancellationTo |
| | | 92 | | { |
| | 2 | 93 | | return _result.Body; |
| | | 94 | | } |
| | 2 | 95 | | } |
| | | 96 | | |
| | | 97 | | /// <summary> |
| | | 98 | | /// Gets the endpoint URLs for the prebuilt Cortana applications. |
| | | 99 | | /// </summary> |
| | | 100 | | /// <param name='operations'> |
| | | 101 | | /// The operations group for this extension method. |
| | | 102 | | /// </param> |
| | | 103 | | /// <param name='cancellationToken'> |
| | | 104 | | /// The cancellation token. |
| | | 105 | | /// </param> |
| | | 106 | | public static async Task<PersonalAssistantsResponse> ListCortanaEndpointsAsync(this IApps operations, Cancel |
| | | 107 | | { |
| | 0 | 108 | | using (var _result = await operations.ListCortanaEndpointsWithHttpMessagesAsync(null, cancellationToken) |
| | | 109 | | { |
| | 0 | 110 | | return _result.Body; |
| | | 111 | | } |
| | 0 | 112 | | } |
| | | 113 | | |
| | | 114 | | /// <summary> |
| | | 115 | | /// Gets the available application domains. |
| | | 116 | | /// </summary> |
| | | 117 | | /// <param name='operations'> |
| | | 118 | | /// The operations group for this extension method. |
| | | 119 | | /// </param> |
| | | 120 | | /// <param name='cancellationToken'> |
| | | 121 | | /// The cancellation token. |
| | | 122 | | /// </param> |
| | | 123 | | public static async Task<IList<string>> ListDomainsAsync(this IApps operations, CancellationToken cancellati |
| | | 124 | | { |
| | 1 | 125 | | using (var _result = await operations.ListDomainsWithHttpMessagesAsync(null, cancellationToken).Configur |
| | | 126 | | { |
| | 1 | 127 | | return _result.Body; |
| | | 128 | | } |
| | 1 | 129 | | } |
| | | 130 | | |
| | | 131 | | /// <summary> |
| | | 132 | | /// Gets the application available usage scenarios. |
| | | 133 | | /// </summary> |
| | | 134 | | /// <param name='operations'> |
| | | 135 | | /// The operations group for this extension method. |
| | | 136 | | /// </param> |
| | | 137 | | /// <param name='cancellationToken'> |
| | | 138 | | /// The cancellation token. |
| | | 139 | | /// </param> |
| | | 140 | | public static async Task<IList<string>> ListUsageScenariosAsync(this IApps operations, CancellationToken can |
| | | 141 | | { |
| | 1 | 142 | | using (var _result = await operations.ListUsageScenariosWithHttpMessagesAsync(null, cancellationToken).C |
| | | 143 | | { |
| | 1 | 144 | | return _result.Body; |
| | | 145 | | } |
| | 1 | 146 | | } |
| | | 147 | | |
| | | 148 | | /// <summary> |
| | | 149 | | /// Gets a list of supported cultures. Cultures are equivalent to the written |
| | | 150 | | /// language and locale. For example,"en-us" represents the U.S. variation of |
| | | 151 | | /// English. |
| | | 152 | | /// </summary> |
| | | 153 | | /// <param name='operations'> |
| | | 154 | | /// The operations group for this extension method. |
| | | 155 | | /// </param> |
| | | 156 | | /// <param name='cancellationToken'> |
| | | 157 | | /// The cancellation token. |
| | | 158 | | /// </param> |
| | | 159 | | public static async Task<IList<AvailableCulture>> ListSupportedCulturesAsync(this IApps operations, Cancella |
| | | 160 | | { |
| | 1 | 161 | | using (var _result = await operations.ListSupportedCulturesWithHttpMessagesAsync(null, cancellationToken |
| | | 162 | | { |
| | 1 | 163 | | return _result.Body; |
| | | 164 | | } |
| | 1 | 165 | | } |
| | | 166 | | |
| | | 167 | | /// <summary> |
| | | 168 | | /// Gets the logs of the past month's endpoint queries for the application. |
| | | 169 | | /// </summary> |
| | | 170 | | /// <param name='operations'> |
| | | 171 | | /// The operations group for this extension method. |
| | | 172 | | /// </param> |
| | | 173 | | /// <param name='appId'> |
| | | 174 | | /// The application ID. |
| | | 175 | | /// </param> |
| | | 176 | | /// <param name='cancellationToken'> |
| | | 177 | | /// The cancellation token. |
| | | 178 | | /// </param> |
| | | 179 | | public static async Task<Stream> DownloadQueryLogsAsync(this IApps operations, System.Guid appId, Cancellati |
| | | 180 | | { |
| | 1 | 181 | | var _result = await operations.DownloadQueryLogsWithHttpMessagesAsync(appId, null, cancellationToken).Co |
| | 1 | 182 | | _result.Request.Dispose(); |
| | 1 | 183 | | return _result.Body; |
| | 1 | 184 | | } |
| | | 185 | | |
| | | 186 | | /// <summary> |
| | | 187 | | /// Gets the application info. |
| | | 188 | | /// </summary> |
| | | 189 | | /// <param name='operations'> |
| | | 190 | | /// The operations group for this extension method. |
| | | 191 | | /// </param> |
| | | 192 | | /// <param name='appId'> |
| | | 193 | | /// The application ID. |
| | | 194 | | /// </param> |
| | | 195 | | /// <param name='cancellationToken'> |
| | | 196 | | /// The cancellation token. |
| | | 197 | | /// </param> |
| | | 198 | | public static async Task<ApplicationInfoResponse> GetAsync(this IApps operations, System.Guid appId, Cancell |
| | | 199 | | { |
| | 7 | 200 | | using (var _result = await operations.GetWithHttpMessagesAsync(appId, null, cancellationToken).Configure |
| | | 201 | | { |
| | 7 | 202 | | return _result.Body; |
| | | 203 | | } |
| | 7 | 204 | | } |
| | | 205 | | |
| | | 206 | | /// <summary> |
| | | 207 | | /// Updates the name or description of the application. |
| | | 208 | | /// </summary> |
| | | 209 | | /// <param name='operations'> |
| | | 210 | | /// The operations group for this extension method. |
| | | 211 | | /// </param> |
| | | 212 | | /// <param name='appId'> |
| | | 213 | | /// The application ID. |
| | | 214 | | /// </param> |
| | | 215 | | /// <param name='applicationUpdateObject'> |
| | | 216 | | /// A model containing Name and Description of the application. |
| | | 217 | | /// </param> |
| | | 218 | | /// <param name='cancellationToken'> |
| | | 219 | | /// The cancellation token. |
| | | 220 | | /// </param> |
| | | 221 | | public static async Task<OperationStatus> UpdateAsync(this IApps operations, System.Guid appId, ApplicationU |
| | | 222 | | { |
| | 1 | 223 | | using (var _result = await operations.UpdateWithHttpMessagesAsync(appId, applicationUpdateObject, null, |
| | | 224 | | { |
| | 1 | 225 | | return _result.Body; |
| | | 226 | | } |
| | 1 | 227 | | } |
| | | 228 | | |
| | | 229 | | /// <summary> |
| | | 230 | | /// Deletes an application. |
| | | 231 | | /// </summary> |
| | | 232 | | /// <param name='operations'> |
| | | 233 | | /// The operations group for this extension method. |
| | | 234 | | /// </param> |
| | | 235 | | /// <param name='appId'> |
| | | 236 | | /// The application ID. |
| | | 237 | | /// </param> |
| | | 238 | | /// <param name='force'> |
| | | 239 | | /// A flag to indicate whether to force an operation. |
| | | 240 | | /// </param> |
| | | 241 | | /// <param name='cancellationToken'> |
| | | 242 | | /// The cancellation token. |
| | | 243 | | /// </param> |
| | | 244 | | public static async Task<OperationStatus> DeleteAsync(this IApps operations, System.Guid appId, bool? force |
| | | 245 | | { |
| | 32 | 246 | | using (var _result = await operations.DeleteWithHttpMessagesAsync(appId, force, null, cancellationToken) |
| | | 247 | | { |
| | 32 | 248 | | return _result.Body; |
| | | 249 | | } |
| | 32 | 250 | | } |
| | | 251 | | |
| | | 252 | | /// <summary> |
| | | 253 | | /// Publishes a specific version of the application. |
| | | 254 | | /// </summary> |
| | | 255 | | /// <param name='operations'> |
| | | 256 | | /// The operations group for this extension method. |
| | | 257 | | /// </param> |
| | | 258 | | /// <param name='appId'> |
| | | 259 | | /// The application ID. |
| | | 260 | | /// </param> |
| | | 261 | | /// <param name='applicationPublishObject'> |
| | | 262 | | /// The application publish object. The region is the target region that the |
| | | 263 | | /// application is published to. |
| | | 264 | | /// </param> |
| | | 265 | | /// <param name='cancellationToken'> |
| | | 266 | | /// The cancellation token. |
| | | 267 | | /// </param> |
| | | 268 | | public static async Task<ProductionOrStagingEndpointInfo> PublishAsync(this IApps operations, System.Guid ap |
| | | 269 | | { |
| | 1 | 270 | | using (var _result = await operations.PublishWithHttpMessagesAsync(appId, applicationPublishObject, null |
| | | 271 | | { |
| | 1 | 272 | | return _result.Body; |
| | | 273 | | } |
| | 1 | 274 | | } |
| | | 275 | | |
| | | 276 | | /// <summary> |
| | | 277 | | /// Get the application settings including 'UseAllTrainingData'. |
| | | 278 | | /// </summary> |
| | | 279 | | /// <param name='operations'> |
| | | 280 | | /// The operations group for this extension method. |
| | | 281 | | /// </param> |
| | | 282 | | /// <param name='appId'> |
| | | 283 | | /// The application ID. |
| | | 284 | | /// </param> |
| | | 285 | | /// <param name='cancellationToken'> |
| | | 286 | | /// The cancellation token. |
| | | 287 | | /// </param> |
| | | 288 | | public static async Task<ApplicationSettings> GetSettingsAsync(this IApps operations, System.Guid appId, Can |
| | | 289 | | { |
| | 2 | 290 | | using (var _result = await operations.GetSettingsWithHttpMessagesAsync(appId, null, cancellationToken).C |
| | | 291 | | { |
| | 2 | 292 | | return _result.Body; |
| | | 293 | | } |
| | 2 | 294 | | } |
| | | 295 | | |
| | | 296 | | /// <summary> |
| | | 297 | | /// Updates the application settings including 'UseAllTrainingData'. |
| | | 298 | | /// </summary> |
| | | 299 | | /// <param name='operations'> |
| | | 300 | | /// The operations group for this extension method. |
| | | 301 | | /// </param> |
| | | 302 | | /// <param name='appId'> |
| | | 303 | | /// The application ID. |
| | | 304 | | /// </param> |
| | | 305 | | /// <param name='applicationSettingUpdateObject'> |
| | | 306 | | /// An object containing the new application settings. |
| | | 307 | | /// </param> |
| | | 308 | | /// <param name='cancellationToken'> |
| | | 309 | | /// The cancellation token. |
| | | 310 | | /// </param> |
| | | 311 | | public static async Task<OperationStatus> UpdateSettingsAsync(this IApps operations, System.Guid appId, Appl |
| | | 312 | | { |
| | 1 | 313 | | using (var _result = await operations.UpdateSettingsWithHttpMessagesAsync(appId, applicationSettingUpdat |
| | | 314 | | { |
| | 1 | 315 | | return _result.Body; |
| | | 316 | | } |
| | 1 | 317 | | } |
| | | 318 | | |
| | | 319 | | /// <summary> |
| | | 320 | | /// Get the application publish settings including 'UseAllTrainingData'. |
| | | 321 | | /// </summary> |
| | | 322 | | /// <param name='operations'> |
| | | 323 | | /// The operations group for this extension method. |
| | | 324 | | /// </param> |
| | | 325 | | /// <param name='appId'> |
| | | 326 | | /// The application ID. |
| | | 327 | | /// </param> |
| | | 328 | | /// <param name='cancellationToken'> |
| | | 329 | | /// The cancellation token. |
| | | 330 | | /// </param> |
| | | 331 | | public static async Task<PublishSettings> GetPublishSettingsAsync(this IApps operations, System.Guid appId, |
| | | 332 | | { |
| | 2 | 333 | | using (var _result = await operations.GetPublishSettingsWithHttpMessagesAsync(appId, null, cancellationT |
| | | 334 | | { |
| | 2 | 335 | | return _result.Body; |
| | | 336 | | } |
| | 2 | 337 | | } |
| | | 338 | | |
| | | 339 | | /// <summary> |
| | | 340 | | /// Updates the application publish settings including 'UseAllTrainingData'. |
| | | 341 | | /// </summary> |
| | | 342 | | /// <param name='operations'> |
| | | 343 | | /// The operations group for this extension method. |
| | | 344 | | /// </param> |
| | | 345 | | /// <param name='appId'> |
| | | 346 | | /// The application ID. |
| | | 347 | | /// </param> |
| | | 348 | | /// <param name='publishSettingUpdateObject'> |
| | | 349 | | /// An object containing the new publish application settings. |
| | | 350 | | /// </param> |
| | | 351 | | /// <param name='cancellationToken'> |
| | | 352 | | /// The cancellation token. |
| | | 353 | | /// </param> |
| | | 354 | | public static async Task<OperationStatus> UpdatePublishSettingsAsync(this IApps operations, System.Guid appI |
| | | 355 | | { |
| | 1 | 356 | | using (var _result = await operations.UpdatePublishSettingsWithHttpMessagesAsync(appId, publishSettingUp |
| | | 357 | | { |
| | 1 | 358 | | return _result.Body; |
| | | 359 | | } |
| | 1 | 360 | | } |
| | | 361 | | |
| | | 362 | | /// <summary> |
| | | 363 | | /// Returns the available endpoint deployment regions and URLs. |
| | | 364 | | /// </summary> |
| | | 365 | | /// <param name='operations'> |
| | | 366 | | /// The operations group for this extension method. |
| | | 367 | | /// </param> |
| | | 368 | | /// <param name='appId'> |
| | | 369 | | /// The application ID. |
| | | 370 | | /// </param> |
| | | 371 | | /// <param name='cancellationToken'> |
| | | 372 | | /// The cancellation token. |
| | | 373 | | /// </param> |
| | | 374 | | public static async Task<IDictionary<string, string>> ListEndpointsAsync(this IApps operations, System.Guid |
| | | 375 | | { |
| | 1 | 376 | | using (var _result = await operations.ListEndpointsWithHttpMessagesAsync(appId, null, cancellationToken) |
| | | 377 | | { |
| | 1 | 378 | | return _result.Body; |
| | | 379 | | } |
| | 1 | 380 | | } |
| | | 381 | | |
| | | 382 | | /// <summary> |
| | | 383 | | /// Gets all the available custom prebuilt domains for all cultures. |
| | | 384 | | /// </summary> |
| | | 385 | | /// <param name='operations'> |
| | | 386 | | /// The operations group for this extension method. |
| | | 387 | | /// </param> |
| | | 388 | | /// <param name='cancellationToken'> |
| | | 389 | | /// The cancellation token. |
| | | 390 | | /// </param> |
| | | 391 | | public static async Task<IList<PrebuiltDomain>> ListAvailableCustomPrebuiltDomainsAsync(this IApps operation |
| | | 392 | | { |
| | 1 | 393 | | using (var _result = await operations.ListAvailableCustomPrebuiltDomainsWithHttpMessagesAsync(null, canc |
| | | 394 | | { |
| | 1 | 395 | | return _result.Body; |
| | | 396 | | } |
| | 1 | 397 | | } |
| | | 398 | | |
| | | 399 | | /// <summary> |
| | | 400 | | /// Adds a prebuilt domain along with its intent and entity models as a new |
| | | 401 | | /// application. |
| | | 402 | | /// </summary> |
| | | 403 | | /// <param name='operations'> |
| | | 404 | | /// The operations group for this extension method. |
| | | 405 | | /// </param> |
| | | 406 | | /// <param name='prebuiltDomainCreateObject'> |
| | | 407 | | /// A prebuilt domain create object containing the name and culture of the |
| | | 408 | | /// domain. |
| | | 409 | | /// </param> |
| | | 410 | | /// <param name='cancellationToken'> |
| | | 411 | | /// The cancellation token. |
| | | 412 | | /// </param> |
| | | 413 | | public static async Task<System.Guid> AddCustomPrebuiltDomainAsync(this IApps operations, PrebuiltDomainCrea |
| | | 414 | | { |
| | 1 | 415 | | using (var _result = await operations.AddCustomPrebuiltDomainWithHttpMessagesAsync(prebuiltDomainCreateO |
| | | 416 | | { |
| | 1 | 417 | | return _result.Body; |
| | | 418 | | } |
| | 1 | 419 | | } |
| | | 420 | | |
| | | 421 | | /// <summary> |
| | | 422 | | /// Gets all the available prebuilt domains for a specific culture. |
| | | 423 | | /// </summary> |
| | | 424 | | /// <param name='operations'> |
| | | 425 | | /// The operations group for this extension method. |
| | | 426 | | /// </param> |
| | | 427 | | /// <param name='culture'> |
| | | 428 | | /// Culture. |
| | | 429 | | /// </param> |
| | | 430 | | /// <param name='cancellationToken'> |
| | | 431 | | /// The cancellation token. |
| | | 432 | | /// </param> |
| | | 433 | | public static async Task<IList<PrebuiltDomain>> ListAvailableCustomPrebuiltDomainsForCultureAsync(this IApps |
| | | 434 | | { |
| | 2 | 435 | | using (var _result = await operations.ListAvailableCustomPrebuiltDomainsForCultureWithHttpMessagesAsync( |
| | | 436 | | { |
| | 2 | 437 | | return _result.Body; |
| | | 438 | | } |
| | 2 | 439 | | } |
| | | 440 | | |
| | | 441 | | /// <summary> |
| | | 442 | | /// package - Gets published LUIS application package in binary stream GZip |
| | | 443 | | /// format |
| | | 444 | | /// </summary> |
| | | 445 | | /// <remarks> |
| | | 446 | | /// Packages a published LUIS application as a GZip file to be used in the LUIS |
| | | 447 | | /// container. |
| | | 448 | | /// </remarks> |
| | | 449 | | /// <param name='operations'> |
| | | 450 | | /// The operations group for this extension method. |
| | | 451 | | /// </param> |
| | | 452 | | /// <param name='appId'> |
| | | 453 | | /// The application ID. |
| | | 454 | | /// </param> |
| | | 455 | | /// <param name='slotName'> |
| | | 456 | | /// The publishing slot name. |
| | | 457 | | /// </param> |
| | | 458 | | /// <param name='cancellationToken'> |
| | | 459 | | /// The cancellation token. |
| | | 460 | | /// </param> |
| | | 461 | | public static async Task<Stream> PackagePublishedApplicationAsGzipAsync(this IApps operations, System.Guid a |
| | | 462 | | { |
| | 0 | 463 | | var _result = await operations.PackagePublishedApplicationAsGzipWithHttpMessagesAsync(appId, slotName, n |
| | 0 | 464 | | _result.Request.Dispose(); |
| | 0 | 465 | | return _result.Body; |
| | 0 | 466 | | } |
| | | 467 | | |
| | | 468 | | /// <summary> |
| | | 469 | | /// package - Gets trained LUIS application package in binary stream GZip |
| | | 470 | | /// format |
| | | 471 | | /// </summary> |
| | | 472 | | /// <remarks> |
| | | 473 | | /// Packages trained LUIS application as GZip file to be used in the LUIS |
| | | 474 | | /// container. |
| | | 475 | | /// </remarks> |
| | | 476 | | /// <param name='operations'> |
| | | 477 | | /// The operations group for this extension method. |
| | | 478 | | /// </param> |
| | | 479 | | /// <param name='appId'> |
| | | 480 | | /// The application ID. |
| | | 481 | | /// </param> |
| | | 482 | | /// <param name='versionId'> |
| | | 483 | | /// The version ID. |
| | | 484 | | /// </param> |
| | | 485 | | /// <param name='cancellationToken'> |
| | | 486 | | /// The cancellation token. |
| | | 487 | | /// </param> |
| | | 488 | | public static async Task<Stream> PackageTrainedApplicationAsGzipAsync(this IApps operations, System.Guid app |
| | | 489 | | { |
| | 0 | 490 | | var _result = await operations.PackageTrainedApplicationAsGzipWithHttpMessagesAsync(appId, versionId, nu |
| | 0 | 491 | | _result.Request.Dispose(); |
| | 0 | 492 | | return _result.Body; |
| | 0 | 493 | | } |
| | | 494 | | |
| | | 495 | | /// <summary> |
| | | 496 | | /// Imports an application to LUIS, the application's structure is included in |
| | | 497 | | /// the request body. |
| | | 498 | | /// </summary> |
| | | 499 | | /// <param name='operations'> |
| | | 500 | | /// The operations group for this extension method. |
| | | 501 | | /// </param> |
| | | 502 | | /// <param name='luisAppV2'> |
| | | 503 | | /// A LUIS application structure. |
| | | 504 | | /// </param> |
| | | 505 | | /// <param name='appName'> |
| | | 506 | | /// The application name to create. If not specified, the application name will |
| | | 507 | | /// be read from the imported object. If the application name already exists, |
| | | 508 | | /// an error is returned. |
| | | 509 | | /// </param> |
| | | 510 | | /// <param name='cancellationToken'> |
| | | 511 | | /// The cancellation token. |
| | | 512 | | /// </param> |
| | | 513 | | public static async Task<System.Guid> ImportV2AppAsync(this IApps operations, LuisAppV2 luisAppV2, string ap |
| | | 514 | | { |
| | 1 | 515 | | using (var _result = await operations.ImportV2AppWithHttpMessagesAsync(luisAppV2, appName, null, cancell |
| | | 516 | | { |
| | 1 | 517 | | return _result.Body; |
| | | 518 | | } |
| | 1 | 519 | | } |
| | | 520 | | |
| | | 521 | | /// <summary> |
| | | 522 | | /// Imports an application to LUIS, the application's structure is included in |
| | | 523 | | /// the request body. |
| | | 524 | | /// </summary> |
| | | 525 | | /// <param name='operations'> |
| | | 526 | | /// The operations group for this extension method. |
| | | 527 | | /// </param> |
| | | 528 | | /// <param name='luisAppLu'> |
| | | 529 | | /// A LUIS application structure. |
| | | 530 | | /// </param> |
| | | 531 | | /// <param name='appName'> |
| | | 532 | | /// The application name to create. If not specified, the application name will |
| | | 533 | | /// be read from the imported object. If the application name already exists, |
| | | 534 | | /// an error is returned. |
| | | 535 | | /// </param> |
| | | 536 | | /// <param name='cancellationToken'> |
| | | 537 | | /// The cancellation token. |
| | | 538 | | /// </param> |
| | | 539 | | public static async Task<System.Guid> ImportLuFormatAsync(this IApps operations, string luisAppLu, string ap |
| | | 540 | | { |
| | 1 | 541 | | using (var _result = await operations.ImportLuFormatWithHttpMessagesAsync(luisAppLu, appName, null, canc |
| | | 542 | | { |
| | 1 | 543 | | return _result.Body; |
| | | 544 | | } |
| | 1 | 545 | | } |
| | | 546 | | |
| | | 547 | | } |
| | | 548 | | } |