| | 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 Pattern. |
| | 21 | | /// </summary> |
| | 22 | | public static partial class PatternExtensions |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Adds a pattern to 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='pattern'> |
| | 37 | | /// The input pattern. |
| | 38 | | /// </param> |
| | 39 | | /// <param name='cancellationToken'> |
| | 40 | | /// The cancellation token. |
| | 41 | | /// </param> |
| | 42 | | public static async Task<PatternRuleInfo> AddPatternAsync(this IPattern operations, System.Guid appId, strin |
| | 43 | | { |
| 3 | 44 | | using (var _result = await operations.AddPatternWithHttpMessagesAsync(appId, versionId, pattern, null, c |
| | 45 | | { |
| 3 | 46 | | return _result.Body; |
| | 47 | | } |
| 3 | 48 | | } |
| | 49 | |
|
| | 50 | | /// <summary> |
| | 51 | | /// Gets patterns in a version of the application. |
| | 52 | | /// </summary> |
| | 53 | | /// <param name='operations'> |
| | 54 | | /// The operations group for this extension method. |
| | 55 | | /// </param> |
| | 56 | | /// <param name='appId'> |
| | 57 | | /// The application ID. |
| | 58 | | /// </param> |
| | 59 | | /// <param name='versionId'> |
| | 60 | | /// The version ID. |
| | 61 | | /// </param> |
| | 62 | | /// <param name='skip'> |
| | 63 | | /// The number of entries to skip. Default value is 0. |
| | 64 | | /// </param> |
| | 65 | | /// <param name='take'> |
| | 66 | | /// The number of entries to return. Maximum page size is 500. Default is 100. |
| | 67 | | /// </param> |
| | 68 | | /// <param name='cancellationToken'> |
| | 69 | | /// The cancellation token. |
| | 70 | | /// </param> |
| | 71 | | public static async Task<IList<PatternRuleInfo>> ListPatternsAsync(this IPattern operations, System.Guid app |
| | 72 | | { |
| 3 | 73 | | using (var _result = await operations.ListPatternsWithHttpMessagesAsync(appId, versionId, skip, take, nu |
| | 74 | | { |
| 3 | 75 | | return _result.Body; |
| | 76 | | } |
| 3 | 77 | | } |
| | 78 | |
|
| | 79 | | /// <summary> |
| | 80 | | /// Updates patterns in a version of the application. |
| | 81 | | /// </summary> |
| | 82 | | /// <param name='operations'> |
| | 83 | | /// The operations group for this extension method. |
| | 84 | | /// </param> |
| | 85 | | /// <param name='appId'> |
| | 86 | | /// The application ID. |
| | 87 | | /// </param> |
| | 88 | | /// <param name='versionId'> |
| | 89 | | /// The version ID. |
| | 90 | | /// </param> |
| | 91 | | /// <param name='patterns'> |
| | 92 | | /// An array represents the patterns. |
| | 93 | | /// </param> |
| | 94 | | /// <param name='cancellationToken'> |
| | 95 | | /// The cancellation token. |
| | 96 | | /// </param> |
| | 97 | | public static async Task<IList<PatternRuleInfo>> UpdatePatternsAsync(this IPattern operations, System.Guid a |
| | 98 | | { |
| 1 | 99 | | using (var _result = await operations.UpdatePatternsWithHttpMessagesAsync(appId, versionId, patterns, nu |
| | 100 | | { |
| 1 | 101 | | return _result.Body; |
| | 102 | | } |
| 1 | 103 | | } |
| | 104 | |
|
| | 105 | | /// <summary> |
| | 106 | | /// Adds a batch of patterns in a version of the application. |
| | 107 | | /// </summary> |
| | 108 | | /// <param name='operations'> |
| | 109 | | /// The operations group for this extension method. |
| | 110 | | /// </param> |
| | 111 | | /// <param name='appId'> |
| | 112 | | /// The application ID. |
| | 113 | | /// </param> |
| | 114 | | /// <param name='versionId'> |
| | 115 | | /// The version ID. |
| | 116 | | /// </param> |
| | 117 | | /// <param name='patterns'> |
| | 118 | | /// A JSON array containing patterns. |
| | 119 | | /// </param> |
| | 120 | | /// <param name='cancellationToken'> |
| | 121 | | /// The cancellation token. |
| | 122 | | /// </param> |
| | 123 | | public static async Task<IList<PatternRuleInfo>> BatchAddPatternsAsync(this IPattern operations, System.Guid |
| | 124 | | { |
| 5 | 125 | | using (var _result = await operations.BatchAddPatternsWithHttpMessagesAsync(appId, versionId, patterns, |
| | 126 | | { |
| 5 | 127 | | return _result.Body; |
| | 128 | | } |
| 5 | 129 | | } |
| | 130 | |
|
| | 131 | | /// <summary> |
| | 132 | | /// Deletes a list of patterns in a version of the application. |
| | 133 | | /// </summary> |
| | 134 | | /// <param name='operations'> |
| | 135 | | /// The operations group for this extension method. |
| | 136 | | /// </param> |
| | 137 | | /// <param name='appId'> |
| | 138 | | /// The application ID. |
| | 139 | | /// </param> |
| | 140 | | /// <param name='versionId'> |
| | 141 | | /// The version ID. |
| | 142 | | /// </param> |
| | 143 | | /// <param name='patternIds'> |
| | 144 | | /// The patterns IDs. |
| | 145 | | /// </param> |
| | 146 | | /// <param name='cancellationToken'> |
| | 147 | | /// The cancellation token. |
| | 148 | | /// </param> |
| | 149 | | public static async Task<OperationStatus> DeletePatternsAsync(this IPattern operations, System.Guid appId, s |
| | 150 | | { |
| 5 | 151 | | using (var _result = await operations.DeletePatternsWithHttpMessagesAsync(appId, versionId, patternIds, |
| | 152 | | { |
| 5 | 153 | | return _result.Body; |
| | 154 | | } |
| 5 | 155 | | } |
| | 156 | |
|
| | 157 | | /// <summary> |
| | 158 | | /// Updates a pattern in a version of the application. |
| | 159 | | /// </summary> |
| | 160 | | /// <param name='operations'> |
| | 161 | | /// The operations group for this extension method. |
| | 162 | | /// </param> |
| | 163 | | /// <param name='appId'> |
| | 164 | | /// The application ID. |
| | 165 | | /// </param> |
| | 166 | | /// <param name='versionId'> |
| | 167 | | /// The version ID. |
| | 168 | | /// </param> |
| | 169 | | /// <param name='patternId'> |
| | 170 | | /// The pattern ID. |
| | 171 | | /// </param> |
| | 172 | | /// <param name='pattern'> |
| | 173 | | /// An object representing a pattern. |
| | 174 | | /// </param> |
| | 175 | | /// <param name='cancellationToken'> |
| | 176 | | /// The cancellation token. |
| | 177 | | /// </param> |
| | 178 | | public static async Task<PatternRuleInfo> UpdatePatternAsync(this IPattern operations, System.Guid appId, st |
| | 179 | | { |
| 1 | 180 | | using (var _result = await operations.UpdatePatternWithHttpMessagesAsync(appId, versionId, patternId, pa |
| | 181 | | { |
| 1 | 182 | | return _result.Body; |
| | 183 | | } |
| 1 | 184 | | } |
| | 185 | |
|
| | 186 | | /// <summary> |
| | 187 | | /// Deletes the pattern with the specified ID from a version of the |
| | 188 | | /// application.. |
| | 189 | | /// </summary> |
| | 190 | | /// <param name='operations'> |
| | 191 | | /// The operations group for this extension method. |
| | 192 | | /// </param> |
| | 193 | | /// <param name='appId'> |
| | 194 | | /// The application ID. |
| | 195 | | /// </param> |
| | 196 | | /// <param name='versionId'> |
| | 197 | | /// The version ID. |
| | 198 | | /// </param> |
| | 199 | | /// <param name='patternId'> |
| | 200 | | /// The pattern ID. |
| | 201 | | /// </param> |
| | 202 | | /// <param name='cancellationToken'> |
| | 203 | | /// The cancellation token. |
| | 204 | | /// </param> |
| | 205 | | public static async Task<OperationStatus> DeletePatternAsync(this IPattern operations, System.Guid appId, st |
| | 206 | | { |
| 3 | 207 | | using (var _result = await operations.DeletePatternWithHttpMessagesAsync(appId, versionId, patternId, nu |
| | 208 | | { |
| 3 | 209 | | return _result.Body; |
| | 210 | | } |
| 3 | 211 | | } |
| | 212 | |
|
| | 213 | | /// <summary> |
| | 214 | | /// Returns patterns for the specific intent in a version of the application. |
| | 215 | | /// </summary> |
| | 216 | | /// <param name='operations'> |
| | 217 | | /// The operations group for this extension method. |
| | 218 | | /// </param> |
| | 219 | | /// <param name='appId'> |
| | 220 | | /// The application ID. |
| | 221 | | /// </param> |
| | 222 | | /// <param name='versionId'> |
| | 223 | | /// The version ID. |
| | 224 | | /// </param> |
| | 225 | | /// <param name='intentId'> |
| | 226 | | /// The intent classifier ID. |
| | 227 | | /// </param> |
| | 228 | | /// <param name='skip'> |
| | 229 | | /// The number of entries to skip. Default value is 0. |
| | 230 | | /// </param> |
| | 231 | | /// <param name='take'> |
| | 232 | | /// The number of entries to return. Maximum page size is 500. Default is 100. |
| | 233 | | /// </param> |
| | 234 | | /// <param name='cancellationToken'> |
| | 235 | | /// The cancellation token. |
| | 236 | | /// </param> |
| | 237 | | public static async Task<IList<PatternRuleInfo>> ListIntentPatternsAsync(this IPattern operations, System.Gu |
| | 238 | | { |
| 1 | 239 | | using (var _result = await operations.ListIntentPatternsWithHttpMessagesAsync(appId, versionId, intentId |
| | 240 | | { |
| 1 | 241 | | return _result.Body; |
| | 242 | | } |
| 1 | 243 | | } |
| | 244 | |
|
| | 245 | | } |
| | 246 | | } |