-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
PredictionOperationsExtensions.cs
97 lines (93 loc) · 4.28 KB
/
PredictionOperationsExtensions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime
{
using Models;
using System.Threading;
using System.Threading.Tasks;
/// <summary>
/// Extension methods for PredictionOperations.
/// </summary>
public static partial class PredictionOperationsExtensions
{
/// <summary>
/// Gets the predictions for an application version.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='appId'>
/// The application ID.
/// </param>
/// <param name='versionId'>
/// The application version ID.
/// </param>
/// <param name='predictionRequest'>
/// The prediction request parameters.
/// </param>
/// <param name='verbose'>
/// Indicates whether to get extra metadata for the entities predictions or
/// not.
/// </param>
/// <param name='showAllIntents'>
/// Indicates whether to return all the intents in the response or just the top
/// intent.
/// </param>
/// <param name='log'>
/// Indicates whether to log the endpoint query or not.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<PredictionResponse> GetVersionPredictionAsync(this IPredictionOperations operations, System.Guid appId, string versionId, PredictionRequest predictionRequest, bool? verbose = default(bool?), bool? showAllIntents = default(bool?), bool? log = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetVersionPredictionWithHttpMessagesAsync(appId, versionId, predictionRequest, verbose, showAllIntents, log, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Gets the predictions for an application slot.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='appId'>
/// The application ID.
/// </param>
/// <param name='slotName'>
/// The application slot name.
/// </param>
/// <param name='predictionRequest'>
/// The prediction request parameters.
/// </param>
/// <param name='verbose'>
/// Indicates whether to get extra metadata for the entities predictions or
/// not.
/// </param>
/// <param name='showAllIntents'>
/// Indicates whether to return all the intents in the response or just the top
/// intent.
/// </param>
/// <param name='log'>
/// Indicates whether to log the endpoint query or not.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<PredictionResponse> GetSlotPredictionAsync(this IPredictionOperations operations, System.Guid appId, string slotName, PredictionRequest predictionRequest, bool? verbose = default(bool?), bool? showAllIntents = default(bool?), bool? log = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetSlotPredictionWithHttpMessagesAsync(appId, slotName, predictionRequest, verbose, showAllIntents, log, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
}
}