From 0fa925e3a9dbf44c9e8e4c7259e8707ae4e1ec71 Mon Sep 17 00:00:00 2001
From: Anand <44665487+bingisbestest@users.noreply.github.com>
Date: Fri, 10 Jan 2020 11:30:44 +0530
Subject: [PATCH] Update/Regenerate QnAMaker SDK from latest rest specs and
bump version for release (#9375)
* Regenerate QnAMaker SDk and bump version
* missing files
* fix build
* fs
* preview
* preview
---
.../cognitiveservices_data-plane_QnAMaker.txt | 14 +
.../src/Generated/EndpointSettings.cs | 356 ++++++++++++++++++
.../Generated/EndpointSettingsExtensions.cs | 60 +++
.../src/Generated/IEndpointSettings.cs | 67 ++++
.../src/Generated/IQnAMakerClient.cs | 5 +
.../src/Generated/IQnAMakerRuntimeClient.cs | 2 +-
.../src/Generated/IRuntime.cs | 2 +-
.../Models/ActiveLearningSettingsDTO.cs | 52 +++
.../src/Generated/Models/CreateKbDTO.cs | 56 ++-
.../src/Generated/Models/EndpointKeysDTO.cs | 10 +-
.../Generated/Models/EndpointSettingsDTO.cs | 52 +++
.../EndpointSettingsDTOActiveLearning.cs | 47 +++
.../src/Generated/Models/FeedbackRecordDTO.cs | 2 +-
.../Generated/Models/FeedbackRecordsDTO.cs | 2 +-
.../Models/KnowledgebaseEnvironmentType.cs | 22 --
.../src/Generated/Models/QnASearchResult.cs | 2 +-
.../Models/QnASearchResultContext.cs | 2 +-
.../Generated/Models/QnASearchResultList.cs | 2 +-
.../src/Generated/Models/QueryContextDTO.cs | 2 +-
.../src/Generated/Models/QueryDTO.cs | 14 +-
.../src/Generated/Models/QueryDTOContext.cs | 2 +-
.../Generated/Models/UpdateKbOperationDTO.cs | 48 ++-
.../src/Generated/QnAMakerClient.cs | 6 +
.../src/Generated/QnAMakerRuntimeClient.cs | 2 +-
.../src/Generated/Runtime.cs | 2 +-
.../src/Generated/RuntimeExtensions.cs | 36 +-
.../src/Generated/SdkInfo_QnAMakerClient.cs | 30 +-
...ognitiveServices.Knowledge.QnAMaker.csproj | 2 +-
.../tests/QnAMakerRuntimeTests.cs | 2 +-
29 files changed, 811 insertions(+), 90 deletions(-)
create mode 100644 eng/mgmt/mgmtmetadata/cognitiveservices_data-plane_QnAMaker.txt
create mode 100644 sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/EndpointSettings.cs
create mode 100644 sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/EndpointSettingsExtensions.cs
create mode 100644 sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IEndpointSettings.cs
create mode 100644 sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/ActiveLearningSettingsDTO.cs
create mode 100644 sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointSettingsDTO.cs
create mode 100644 sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointSettingsDTOActiveLearning.cs
delete mode 100644 sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/KnowledgebaseEnvironmentType.cs
diff --git a/eng/mgmt/mgmtmetadata/cognitiveservices_data-plane_QnAMaker.txt b/eng/mgmt/mgmtmetadata/cognitiveservices_data-plane_QnAMaker.txt
new file mode 100644
index 0000000000000..60a222b02f693
--- /dev/null
+++ b/eng/mgmt/mgmtmetadata/cognitiveservices_data-plane_QnAMaker.txt
@@ -0,0 +1,14 @@
+Installing AutoRest version: latest
+AutoRest installed successfully.
+Commencing code generation
+Generating CSharp code
+Executing AutoRest command
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/QnAMaker/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\dev\sdk\sdkb\sdk
+2020-01-08 08:49:08 UTC
+Azure-rest-api-specs repository information
+GitHub fork: Azure
+Branch: master
+Commit: 44fe2e5cffa496d6cd0fe900f648e24623549b93
+AutoRest information
+Requested version: latest
+Bootstrapper version: autorest@2.0.4407
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/EndpointSettings.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/EndpointSettings.cs
new file mode 100644
index 0000000000000..f4770420f41ce
--- /dev/null
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/EndpointSettings.cs
@@ -0,0 +1,356 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker
+{
+ using Microsoft.Rest;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// EndpointSettings operations.
+ ///
+ public partial class EndpointSettings : IServiceOperations, IEndpointSettings
+ {
+ ///
+ /// Initializes a new instance of the EndpointSettings class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public EndpointSettings(QnAMakerClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the QnAMakerClient
+ ///
+ public QnAMakerClient Client { get; private set; }
+
+ ///
+ /// Gets endpoint settings for an endpoint.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetSettingsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.Endpoint == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetSettings", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri;
+ var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "endpointSettings";
+ _url = _url.Replace("{Endpoint}", Client.Endpoint);
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new HttpOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Updates endpoint settings for an endpoint.
+ ///
+ ///
+ /// Post body of the request.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> UpdateSettingsWithHttpMessagesAsync(EndpointSettingsDTO endpointSettingsPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.Endpoint == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint");
+ }
+ if (endpointSettingsPayload == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "endpointSettingsPayload");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("endpointSettingsPayload", endpointSettingsPayload);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "UpdateSettings", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri;
+ var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "endpointSettings";
+ _url = _url.Replace("{Endpoint}", Client.Endpoint);
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(endpointSettingsPayload != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(endpointSettingsPayload, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new HttpOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/EndpointSettingsExtensions.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/EndpointSettingsExtensions.cs
new file mode 100644
index 0000000000000..701932c1722b7
--- /dev/null
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/EndpointSettingsExtensions.cs
@@ -0,0 +1,60 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker
+{
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for EndpointSettings.
+ ///
+ public static partial class EndpointSettingsExtensions
+ {
+ ///
+ /// Gets endpoint settings for an endpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetSettingsAsync(this IEndpointSettings operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetSettingsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Updates endpoint settings for an endpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Post body of the request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateSettingsAsync(this IEndpointSettings operations, EndpointSettingsDTO endpointSettingsPayload, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateSettingsWithHttpMessagesAsync(endpointSettingsPayload, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IEndpointSettings.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IEndpointSettings.cs
new file mode 100644
index 0000000000000..33dcba88c9295
--- /dev/null
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IEndpointSettings.cs
@@ -0,0 +1,67 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker
+{
+ using Microsoft.Rest;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// EndpointSettings operations.
+ ///
+ public partial interface IEndpointSettings
+ {
+ ///
+ /// Gets endpoint settings for an endpoint.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetSettingsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates endpoint settings for an endpoint.
+ ///
+ ///
+ /// Post body of the request.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateSettingsWithHttpMessagesAsync(EndpointSettingsDTO endpointSettingsPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IQnAMakerClient.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IQnAMakerClient.cs
index d4bbbf247d39e..8133122a671ad 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IQnAMakerClient.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IQnAMakerClient.cs
@@ -46,6 +46,11 @@ public partial interface IQnAMakerClient : System.IDisposable
ServiceClientCredentials Credentials { get; }
+ ///
+ /// Gets the IEndpointSettings.
+ ///
+ IEndpointSettings EndpointSettings { get; }
+
///
/// Gets the IEndpointKeys.
///
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IQnAMakerRuntimeClient.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IQnAMakerRuntimeClient.cs
index 15b5c72c464be..d406f3f737a85 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IQnAMakerRuntimeClient.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IQnAMakerRuntimeClient.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IRuntime.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IRuntime.cs
index da35f0e3a96e6..fdf4d89ff567b 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IRuntime.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/IRuntime.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/ActiveLearningSettingsDTO.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/ActiveLearningSettingsDTO.cs
new file mode 100644
index 0000000000000..0fb5bd71670d1
--- /dev/null
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/ActiveLearningSettingsDTO.cs
@@ -0,0 +1,52 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Active Learning settings of the endpoint.
+ ///
+ public partial class ActiveLearningSettingsDTO
+ {
+ ///
+ /// Initializes a new instance of the ActiveLearningSettingsDTO class.
+ ///
+ public ActiveLearningSettingsDTO()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ActiveLearningSettingsDTO class.
+ ///
+ /// True/False string providing Active
+ /// Learning
+ public ActiveLearningSettingsDTO(string enable = default(string))
+ {
+ Enable = enable;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets true/False string providing Active Learning
+ ///
+ [JsonProperty(PropertyName = "enable")]
+ public string Enable { get; set; }
+
+ }
+}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/CreateKbDTO.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/CreateKbDTO.cs
index 36d0a40dd5a42..cf758f768b6ef 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/CreateKbDTO.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/CreateKbDTO.cs
@@ -40,12 +40,23 @@ public CreateKbDTO()
/// Q-A.
/// List of files from which to Extract
/// Q-A.
- public CreateKbDTO(string name, IList qnaList = default(IList), IList urls = default(IList), IList files = default(IList))
+ /// Enable hierarchical
+ /// extraction of Q-A from files and urls. Value to be considered False
+ /// if this field is not present.
+ /// Text string to be used
+ /// as the answer in any Q-A which has no extracted answer from the
+ /// document but has a hierarchy. Required when
+ /// EnableHierarchicalExtraction field is set to True.
+ /// Language of the knowledgebase.
+ public CreateKbDTO(string name, IList qnaList = default(IList), IList urls = default(IList), IList files = default(IList), bool? enableHierarchicalExtraction = default(bool?), string defaultAnswerUsedForExtraction = default(string), string language = default(string))
{
Name = name;
QnaList = qnaList;
Urls = urls;
Files = files;
+ EnableHierarchicalExtraction = enableHierarchicalExtraction;
+ DefaultAnswerUsedForExtraction = defaultAnswerUsedForExtraction;
+ Language = language;
CustomInit();
}
@@ -79,6 +90,27 @@ public CreateKbDTO()
[JsonProperty(PropertyName = "files")]
public IList Files { get; set; }
+ ///
+ /// Gets or sets enable hierarchical extraction of Q-A from files and
+ /// urls. Value to be considered False if this field is not present.
+ ///
+ [JsonProperty(PropertyName = "enableHierarchicalExtraction")]
+ public bool? EnableHierarchicalExtraction { get; set; }
+
+ ///
+ /// Gets or sets text string to be used as the answer in any Q-A which
+ /// has no extracted answer from the document but has a hierarchy.
+ /// Required when EnableHierarchicalExtraction field is set to True.
+ ///
+ [JsonProperty(PropertyName = "defaultAnswerUsedForExtraction")]
+ public string DefaultAnswerUsedForExtraction { get; set; }
+
+ ///
+ /// Gets or sets language of the knowledgebase.
+ ///
+ [JsonProperty(PropertyName = "language")]
+ public string Language { get; set; }
+
///
/// Validate the object.
///
@@ -122,6 +154,28 @@ public virtual void Validate()
}
}
}
+ if (DefaultAnswerUsedForExtraction != null)
+ {
+ if (DefaultAnswerUsedForExtraction.Length > 300)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "DefaultAnswerUsedForExtraction", 300);
+ }
+ if (DefaultAnswerUsedForExtraction.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "DefaultAnswerUsedForExtraction", 1);
+ }
+ }
+ if (Language != null)
+ {
+ if (Language.Length > 100)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "Language", 100);
+ }
+ if (Language.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Language", 1);
+ }
+ }
}
}
}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointKeysDTO.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointKeysDTO.cs
index 9845e55b095dd..d03a645a24049 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointKeysDTO.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointKeysDTO.cs
@@ -33,12 +33,14 @@ public EndpointKeysDTO()
/// Secondary Access Key.
/// Current version of runtime.
/// Latest version of runtime.
- public EndpointKeysDTO(string primaryEndpointKey = default(string), string secondaryEndpointKey = default(string), string installedVersion = default(string), string lastStableVersion = default(string))
+ /// Language setting of runtime.
+ public EndpointKeysDTO(string primaryEndpointKey = default(string), string secondaryEndpointKey = default(string), string installedVersion = default(string), string lastStableVersion = default(string), string language = default(string))
{
PrimaryEndpointKey = primaryEndpointKey;
SecondaryEndpointKey = secondaryEndpointKey;
InstalledVersion = installedVersion;
LastStableVersion = lastStableVersion;
+ Language = language;
CustomInit();
}
@@ -71,5 +73,11 @@ public EndpointKeysDTO()
[JsonProperty(PropertyName = "lastStableVersion")]
public string LastStableVersion { get; set; }
+ ///
+ /// Gets or sets language setting of runtime.
+ ///
+ [JsonProperty(PropertyName = "language")]
+ public string Language { get; set; }
+
}
}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointSettingsDTO.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointSettingsDTO.cs
new file mode 100644
index 0000000000000..175a800e9f367
--- /dev/null
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointSettingsDTO.cs
@@ -0,0 +1,52 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Endpoint settings.
+ ///
+ public partial class EndpointSettingsDTO
+ {
+ ///
+ /// Initializes a new instance of the EndpointSettingsDTO class.
+ ///
+ public EndpointSettingsDTO()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the EndpointSettingsDTO class.
+ ///
+ /// Active Learning settings of the
+ /// endpoint.
+ public EndpointSettingsDTO(EndpointSettingsDTOActiveLearning activeLearning = default(EndpointSettingsDTOActiveLearning))
+ {
+ ActiveLearning = activeLearning;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets active Learning settings of the endpoint.
+ ///
+ [JsonProperty(PropertyName = "activeLearning")]
+ public EndpointSettingsDTOActiveLearning ActiveLearning { get; set; }
+
+ }
+}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointSettingsDTOActiveLearning.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointSettingsDTOActiveLearning.cs
new file mode 100644
index 0000000000000..d610bed74d586
--- /dev/null
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/EndpointSettingsDTOActiveLearning.cs
@@ -0,0 +1,47 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models
+{
+ using System.Linq;
+
+ ///
+ /// Active Learning settings of the endpoint.
+ ///
+ public partial class EndpointSettingsDTOActiveLearning : ActiveLearningSettingsDTO
+ {
+ ///
+ /// Initializes a new instance of the EndpointSettingsDTOActiveLearning
+ /// class.
+ ///
+ public EndpointSettingsDTOActiveLearning()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the EndpointSettingsDTOActiveLearning
+ /// class.
+ ///
+ /// True/False string providing Active
+ /// Learning
+ public EndpointSettingsDTOActiveLearning(string enable = default(string))
+ : base(enable)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/FeedbackRecordDTO.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/FeedbackRecordDTO.cs
index 2609dc66675b0..e77c6c00c327e 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/FeedbackRecordDTO.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/FeedbackRecordDTO.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/FeedbackRecordsDTO.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/FeedbackRecordsDTO.cs
index d39429c51f970..be2da0f206a87 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/FeedbackRecordsDTO.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/FeedbackRecordsDTO.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/KnowledgebaseEnvironmentType.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/KnowledgebaseEnvironmentType.cs
deleted file mode 100644
index 8e9881b64e6b2..0000000000000
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/KnowledgebaseEnvironmentType.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// 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.
-//
-
-namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models
-{
-
- ///
- /// Defines values for KnowledgebaseEnvironmentType.
- ///
- public static class KnowledgebaseEnvironmentType
- {
- public const string Prod = "Prod";
- public const string Test = "Test";
- }
-}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResult.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResult.cs
index b7c74a3d62122..2e2a56dd6b021 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResult.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResult.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResultContext.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResultContext.cs
index 8cbb0e40c4ae8..f7a01ea1217be 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResultContext.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResultContext.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResultList.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResultList.cs
index 0c4e76ebca8d4..88b445aa841c0 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResultList.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QnASearchResultList.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryContextDTO.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryContextDTO.cs
index 5c1e5ac17a378..fa9d3cc462e2a 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryContextDTO.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryContextDTO.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryDTO.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryDTO.cs
index 5a21b6a49cbc2..fa6a74322ac96 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryDTO.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryDTO.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
@@ -43,9 +43,11 @@ public QueryDTO()
/// on score.
/// Context object with previous QnA's
/// information.
+ /// Optional field. Set to 'QuestionOnly' for
+ /// using a question only Ranker.
/// Find only answers that contain these
/// metadata.
- public QueryDTO(string qnaId = default(string), string question = default(string), int? top = default(int?), string userId = default(string), bool? isTest = default(bool?), double? scoreThreshold = default(double?), QueryDTOContext context = default(QueryDTOContext), IList strictFilters = default(IList))
+ public QueryDTO(string qnaId = default(string), string question = default(string), int? top = default(int?), string userId = default(string), bool? isTest = default(bool?), double? scoreThreshold = default(double?), QueryDTOContext context = default(QueryDTOContext), string rankerType = default(string), IList strictFilters = default(IList))
{
QnaId = qnaId;
Question = question;
@@ -54,6 +56,7 @@ public QueryDTO()
IsTest = isTest;
ScoreThreshold = scoreThreshold;
Context = context;
+ RankerType = rankerType;
StrictFilters = strictFilters;
CustomInit();
}
@@ -106,6 +109,13 @@ public QueryDTO()
[JsonProperty(PropertyName = "context")]
public QueryDTOContext Context { get; set; }
+ ///
+ /// Gets or sets optional field. Set to 'QuestionOnly' for using a
+ /// question only Ranker.
+ ///
+ [JsonProperty(PropertyName = "rankerType")]
+ public string RankerType { get; set; }
+
///
/// Gets or sets find only answers that contain these metadata.
///
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryDTOContext.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryDTOContext.cs
index ef484e8efca8f..7dc405c44daf3 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryDTOContext.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/QueryDTOContext.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/UpdateKbOperationDTO.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/UpdateKbOperationDTO.cs
index 6fa2f5d114e5c..ddd2a0f9be180 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/UpdateKbOperationDTO.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Models/UpdateKbOperationDTO.cs
@@ -10,6 +10,7 @@
namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models
{
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -35,11 +36,20 @@ public UpdateKbOperationDTO()
/// Operation
/// An instance of UpdateKbContentsDTO for Update
/// Operation
- public UpdateKbOperationDTO(UpdateKbOperationDTOAdd add = default(UpdateKbOperationDTOAdd), UpdateKbOperationDTODelete delete = default(UpdateKbOperationDTODelete), UpdateKbOperationDTOUpdate update = default(UpdateKbOperationDTOUpdate))
+ /// Enable hierarchical
+ /// extraction of Q-A from files and urls. The value set during KB
+ /// creation will be used if this field is not present.
+ /// Text string to be used
+ /// as the answer in any Q-A which has no extracted answer from the
+ /// document but has a hierarchy. Required when
+ /// EnableHierarchicalExtraction field is set to True.
+ public UpdateKbOperationDTO(UpdateKbOperationDTOAdd add = default(UpdateKbOperationDTOAdd), UpdateKbOperationDTODelete delete = default(UpdateKbOperationDTODelete), UpdateKbOperationDTOUpdate update = default(UpdateKbOperationDTOUpdate), bool? enableHierarchicalExtraction = default(bool?), string defaultAnswerUsedForExtraction = default(string))
{
Add = add;
Delete = delete;
Update = update;
+ EnableHierarchicalExtraction = enableHierarchicalExtraction;
+ DefaultAnswerUsedForExtraction = defaultAnswerUsedForExtraction;
CustomInit();
}
@@ -68,5 +78,41 @@ public UpdateKbOperationDTO()
[JsonProperty(PropertyName = "update")]
public UpdateKbOperationDTOUpdate Update { get; set; }
+ ///
+ /// Gets or sets enable hierarchical extraction of Q-A from files and
+ /// urls. The value set during KB creation will be used if this field
+ /// is not present.
+ ///
+ [JsonProperty(PropertyName = "enableHierarchicalExtraction")]
+ public bool? EnableHierarchicalExtraction { get; set; }
+
+ ///
+ /// Gets or sets text string to be used as the answer in any Q-A which
+ /// has no extracted answer from the document but has a hierarchy.
+ /// Required when EnableHierarchicalExtraction field is set to True.
+ ///
+ [JsonProperty(PropertyName = "defaultAnswerUsedForExtraction")]
+ public string DefaultAnswerUsedForExtraction { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (DefaultAnswerUsedForExtraction != null)
+ {
+ if (DefaultAnswerUsedForExtraction.Length > 300)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "DefaultAnswerUsedForExtraction", 300);
+ }
+ if (DefaultAnswerUsedForExtraction.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "DefaultAnswerUsedForExtraction", 1);
+ }
+ }
+ }
}
}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/QnAMakerClient.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/QnAMakerClient.cs
index f0edeb1d11528..accd08c0f5ca5 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/QnAMakerClient.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/QnAMakerClient.cs
@@ -50,6 +50,11 @@ public partial class QnAMakerClient : ServiceClient, IQnAMakerCl
///
public ServiceClientCredentials Credentials { get; private set; }
+ ///
+ /// Gets the IEndpointSettings.
+ ///
+ public virtual IEndpointSettings EndpointSettings { get; private set; }
+
///
/// Gets the IEndpointKeys.
///
@@ -197,6 +202,7 @@ public QnAMakerClient(ServiceClientCredentials credentials, HttpClientHandler ro
///
private void Initialize()
{
+ EndpointSettings = new EndpointSettings(this);
EndpointKeys = new EndpointKeys(this);
Alterations = new Alterations(this);
Knowledgebase = new Knowledgebase(this);
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/QnAMakerRuntimeClient.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/QnAMakerRuntimeClient.cs
index 0b64578cf7115..44965c01fc5f8 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/QnAMakerRuntimeClient.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/QnAMakerRuntimeClient.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Runtime.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Runtime.cs
index 02ba532a2307b..3d9d1956dcfa9 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Runtime.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/Runtime.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/RuntimeExtensions.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/RuntimeExtensions.cs
index 220266de5b6f8..df68ae55bf382 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/RuntimeExtensions.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/RuntimeExtensions.cs
@@ -3,7 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
@@ -19,23 +19,6 @@ namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker
///
public static partial class RuntimeExtensions
{
- ///
- /// GenerateAnswer call to query the knowledgebase.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Knowledgebase id.
- ///
- ///
- /// Post body of the request.
- ///
- public static QnASearchResultList GenerateAnswer(this IRuntime operations, string kbId, QueryDTO generateAnswerPayload)
- {
- return operations.GenerateAnswerAsync(kbId, generateAnswerPayload).GetAwaiter().GetResult();
- }
-
///
/// GenerateAnswer call to query the knowledgebase.
///
@@ -59,23 +42,6 @@ public static QnASearchResultList GenerateAnswer(this IRuntime operations, strin
}
}
- ///
- /// Train call to add suggestions to the knowledgebase.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Knowledgebase id.
- ///
- ///
- /// Post body of the request.
- ///
- public static void Train(this IRuntime operations, string kbId, FeedbackRecordsDTO trainPayload)
- {
- operations.TrainAsync(kbId, trainPayload).GetAwaiter().GetResult();
- }
-
///
/// Train call to add suggestions to the knowledgebase.
///
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/SdkInfo_QnAMakerClient.cs b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/SdkInfo_QnAMakerClient.cs
index 1d8e60bfe189f..b06aea21d9bcf 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/SdkInfo_QnAMakerClient.cs
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Generated/SdkInfo_QnAMakerClient.cs
@@ -7,24 +7,24 @@
namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker
{
- using System;
- using System.Collections.Generic;
- using System.Linq;
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
- internal static partial class SdkInfo
- {
- public static IEnumerable> ApiInfo_QnAMakerClient
- {
- get
- {
- return new Tuple[]
- {
+ internal static partial class SdkInfo
+ {
+ public static IEnumerable> ApiInfo_QnAMakerClient
+ {
+ get
+ {
+ return new Tuple[]
+ {
new Tuple("QnAMakerClient", "Alterations", "4.0"),
new Tuple("QnAMakerClient", "EndpointKeys", "4.0"),
new Tuple("QnAMakerClient", "Knowledgebase", "4.0"),
new Tuple("QnAMakerClient", "Operations", "4.0"),
- }.AsEnumerable();
- }
- }
- }
+ }.AsEnumerable();
+ }
+ }
+ }
}
diff --git a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.csproj b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.csproj
index 1404706dbf3b1..074515b199491 100644
--- a/sdk/cognitiveservices/Knowledge.QnAMaker/src/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.csproj
+++ b/sdk/cognitiveservices/Knowledge.QnAMaker/src/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.csproj
@@ -3,7 +3,7 @@
Microsoft Cognitive Services QnAMaker SDK
Provides access to the Microsoft Cognitive Services QnAMaker APIs.
This client library provides access to the Microsoft Cognitive Services QnAMaker APIs.
- 1.1.0-preview.1
+ 2.0.0-preview.1
Microsoft Cognitive Services;Cognitive Services;Cognitive Services SDK;REST HTTP client;QnAMaker;QnAMaker API;QnAMaker SDK;Vision;netcore451511