| | 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 Examples. |
| | 21 | | /// </summary> |
| | 22 | | public static partial class ExamplesExtensions |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Adds a labeled example utterance 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='exampleLabelObject'> |
| | 37 | | /// A labeled example utterance with the expected intent and entities. |
| | 38 | | /// </param> |
| | 39 | | /// <param name='enableNestedChildren'> |
| | 40 | | /// Toggles nested/flat format |
| | 41 | | /// </param> |
| | 42 | | /// <param name='cancellationToken'> |
| | 43 | | /// The cancellation token. |
| | 44 | | /// </param> |
| | 45 | | public static async Task<LabelExampleResponse> AddAsync(this IExamples operations, System.Guid appId, string |
| | 46 | | { |
| 3 | 47 | | using (var _result = await operations.AddWithHttpMessagesAsync(appId, versionId, exampleLabelObject, ena |
| | 48 | | { |
| 3 | 49 | | return _result.Body; |
| | 50 | | } |
| 3 | 51 | | } |
| | 52 | |
|
| | 53 | | /// <summary> |
| | 54 | | /// Adds a batch of labeled example utterances to a version of the application. |
| | 55 | | /// </summary> |
| | 56 | | /// <param name='operations'> |
| | 57 | | /// The operations group for this extension method. |
| | 58 | | /// </param> |
| | 59 | | /// <param name='appId'> |
| | 60 | | /// The application ID. |
| | 61 | | /// </param> |
| | 62 | | /// <param name='versionId'> |
| | 63 | | /// The version ID. |
| | 64 | | /// </param> |
| | 65 | | /// <param name='exampleLabelObjectArray'> |
| | 66 | | /// Array of example utterances. |
| | 67 | | /// </param> |
| | 68 | | /// <param name='enableNestedChildren'> |
| | 69 | | /// Toggles nested/flat format |
| | 70 | | /// </param> |
| | 71 | | /// <param name='cancellationToken'> |
| | 72 | | /// The cancellation token. |
| | 73 | | /// </param> |
| | 74 | | public static async Task<IList<BatchLabelExample>> BatchAsync(this IExamples operations, System.Guid appId, |
| | 75 | | { |
| 2 | 76 | | using (var _result = await operations.BatchWithHttpMessagesAsync(appId, versionId, exampleLabelObjectArr |
| | 77 | | { |
| 2 | 78 | | return _result.Body; |
| | 79 | | } |
| 2 | 80 | | } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Returns example utterances to be reviewed from a version of the |
| | 84 | | /// application. |
| | 85 | | /// </summary> |
| | 86 | | /// <param name='operations'> |
| | 87 | | /// The operations group for this extension method. |
| | 88 | | /// </param> |
| | 89 | | /// <param name='appId'> |
| | 90 | | /// The application ID. |
| | 91 | | /// </param> |
| | 92 | | /// <param name='versionId'> |
| | 93 | | /// The version ID. |
| | 94 | | /// </param> |
| | 95 | | /// <param name='skip'> |
| | 96 | | /// The number of entries to skip. Default value is 0. |
| | 97 | | /// </param> |
| | 98 | | /// <param name='take'> |
| | 99 | | /// The number of entries to return. Maximum page size is 500. Default is 100. |
| | 100 | | /// </param> |
| | 101 | | /// <param name='enableNestedChildren'> |
| | 102 | | /// Toggles nested/flat format |
| | 103 | | /// </param> |
| | 104 | | /// <param name='cancellationToken'> |
| | 105 | | /// The cancellation token. |
| | 106 | | /// </param> |
| | 107 | | public static async Task<IList<LabeledUtterance>> ListAsync(this IExamples operations, System.Guid appId, st |
| | 108 | | { |
| 4 | 109 | | using (var _result = await operations.ListWithHttpMessagesAsync(appId, versionId, skip, take, enableNest |
| | 110 | | { |
| 4 | 111 | | return _result.Body; |
| | 112 | | } |
| 4 | 113 | | } |
| | 114 | |
|
| | 115 | | /// <summary> |
| | 116 | | /// Deletes the labeled example utterances with the specified ID from a version |
| | 117 | | /// of the application. |
| | 118 | | /// </summary> |
| | 119 | | /// <param name='operations'> |
| | 120 | | /// The operations group for this extension method. |
| | 121 | | /// </param> |
| | 122 | | /// <param name='appId'> |
| | 123 | | /// The application ID. |
| | 124 | | /// </param> |
| | 125 | | /// <param name='versionId'> |
| | 126 | | /// The version ID. |
| | 127 | | /// </param> |
| | 128 | | /// <param name='exampleId'> |
| | 129 | | /// The example ID. |
| | 130 | | /// </param> |
| | 131 | | /// <param name='cancellationToken'> |
| | 132 | | /// The cancellation token. |
| | 133 | | /// </param> |
| | 134 | | public static async Task<OperationStatus> DeleteAsync(this IExamples operations, System.Guid appId, string v |
| | 135 | | { |
| 1 | 136 | | using (var _result = await operations.DeleteWithHttpMessagesAsync(appId, versionId, exampleId, null, can |
| | 137 | | { |
| 1 | 138 | | return _result.Body; |
| | 139 | | } |
| 1 | 140 | | } |
| | 141 | |
|
| | 142 | | } |
| | 143 | | } |