Skip to content

Commit 9b4ed86

Browse files
committed
feat(All services): Regenerate SDK using latest API definition and generator
API def: d68118f18ce7fa74b1a3a8d2b95f08fe7fbf324a and Generator: c3d3873bf9046b43710702c216646be9af736ac8
1 parent 3e0181d commit 9b4ed86

File tree

3 files changed

+68
-68
lines changed

3 files changed

+68
-68
lines changed

src/IBM.Watson.Discovery.v1/DiscoveryService.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,7 @@ public DetailedResponse<DeleteDocumentResponse> DeleteDocument(string environmen
22932293
/// <param name="xWatsonLoggingOptOut">If `true`, queries are not stored in the Discovery **Logs** endpoint.
22942294
/// (optional, default to false)</param>
22952295
/// <returns><see cref="QueryResponse" />QueryResponse</returns>
2296-
public DetailedResponse<QueryResponse> Query(string environmentId, string collectionId, string collectionIds, string filter = null, string query = null, string naturalLanguageQuery = null, bool? passages = null, string aggregation = null, long? count = null, string _return = null, long? offset = null, string sort = null, bool? highlight = null, string passagesFields = null, long? passagesCount = null, long? passagesCharacters = null, bool? deduplicate = null, string deduplicateField = null, bool? similar = null, string similarDocumentIds = null, string similarFields = null, string bias = null, bool? xWatsonLoggingOptOut = null)
2296+
public DetailedResponse<QueryResponse> Query(string environmentId, string collectionId, string filter = null, string query = null, string naturalLanguageQuery = null, bool? passages = null, string aggregation = null, long? count = null, string _return = null, long? offset = null, string sort = null, bool? highlight = null, string passagesFields = null, long? passagesCount = null, long? passagesCharacters = null, bool? deduplicate = null, string deduplicateField = null, string collectionIds = null, bool? similar = null, string similarDocumentIds = null, string similarFields = null, string bias = null, bool? xWatsonLoggingOptOut = null)
22972297
{
22982298
if (string.IsNullOrEmpty(environmentId))
22992299
{
@@ -2336,10 +2336,6 @@ public DetailedResponse<QueryResponse> Query(string environmentId, string collec
23362336
restRequest.WithHeader("Content-Type", "application/json");
23372337

23382338
JObject bodyObject = new JObject();
2339-
if (!string.IsNullOrEmpty(collectionIds))
2340-
{
2341-
bodyObject["collection_ids"] = collectionIds;
2342-
}
23432339
if (!string.IsNullOrEmpty(filter))
23442340
{
23452341
bodyObject["filter"] = filter;
@@ -2400,6 +2396,10 @@ public DetailedResponse<QueryResponse> Query(string environmentId, string collec
24002396
{
24012397
bodyObject["deduplicate.field"] = deduplicateField;
24022398
}
2399+
if (!string.IsNullOrEmpty(collectionIds))
2400+
{
2401+
bodyObject["collection_ids"] = collectionIds;
2402+
}
24032403
if (similar != null)
24042404
{
24052405
bodyObject["similar"] = JToken.FromObject(similar);
@@ -2625,7 +2625,7 @@ public DetailedResponse<QueryNoticesResponse> QueryNotices(string environmentId,
26252625
/// <param name="xWatsonLoggingOptOut">If `true`, queries are not stored in the Discovery **Logs** endpoint.
26262626
/// (optional, default to false)</param>
26272627
/// <returns><see cref="QueryResponse" />QueryResponse</returns>
2628-
public DetailedResponse<QueryResponse> FederatedQuery(string environmentId, string collectionIds, string filter = null, string query = null, string naturalLanguageQuery = null, bool? passages = null, string aggregation = null, long? count = null, string _return = null, long? offset = null, string sort = null, bool? highlight = null, string passagesFields = null, long? passagesCount = null, long? passagesCharacters = null, bool? deduplicate = null, string deduplicateField = null, bool? similar = null, string similarDocumentIds = null, string similarFields = null, string bias = null, bool? xWatsonLoggingOptOut = null)
2628+
public DetailedResponse<QueryResponse> FederatedQuery(string environmentId, string filter = null, string query = null, string naturalLanguageQuery = null, bool? passages = null, string aggregation = null, long? count = null, string _return = null, long? offset = null, string sort = null, bool? highlight = null, string passagesFields = null, long? passagesCount = null, long? passagesCharacters = null, bool? deduplicate = null, string deduplicateField = null, string collectionIds = null, bool? similar = null, string similarDocumentIds = null, string similarFields = null, string bias = null, bool? xWatsonLoggingOptOut = null)
26292629
{
26302630
if (string.IsNullOrEmpty(environmentId))
26312631
{
@@ -2660,10 +2660,6 @@ public DetailedResponse<QueryResponse> FederatedQuery(string environmentId, stri
26602660
restRequest.WithHeader("Content-Type", "application/json");
26612661

26622662
JObject bodyObject = new JObject();
2663-
if (!string.IsNullOrEmpty(collectionIds))
2664-
{
2665-
bodyObject["collection_ids"] = collectionIds;
2666-
}
26672663
if (!string.IsNullOrEmpty(filter))
26682664
{
26692665
bodyObject["filter"] = filter;
@@ -2724,6 +2720,10 @@ public DetailedResponse<QueryResponse> FederatedQuery(string environmentId, stri
27242720
{
27252721
bodyObject["deduplicate.field"] = deduplicateField;
27262722
}
2723+
if (!string.IsNullOrEmpty(collectionIds))
2724+
{
2725+
bodyObject["collection_ids"] = collectionIds;
2726+
}
27272727
if (similar != null)
27282728
{
27292729
bodyObject["similar"] = JToken.FromObject(similar);

src/IBM.Watson.Discovery.v1/IDiscoveryService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public partial interface IDiscoveryService
5656
DetailedResponse<DocumentStatus> GetDocumentStatus(string environmentId, string collectionId, string documentId);
5757
DetailedResponse<DocumentAccepted> UpdateDocument(string environmentId, string collectionId, string documentId, System.IO.MemoryStream file = null, string filename = null, string fileContentType = null, string metadata = null);
5858
DetailedResponse<DeleteDocumentResponse> DeleteDocument(string environmentId, string collectionId, string documentId);
59-
DetailedResponse<QueryResponse> Query(string environmentId, string collectionId, string collectionIds, string filter = null, string query = null, string naturalLanguageQuery = null, bool? passages = null, string aggregation = null, long? count = null, string _return = null, long? offset = null, string sort = null, bool? highlight = null, string passagesFields = null, long? passagesCount = null, long? passagesCharacters = null, bool? deduplicate = null, string deduplicateField = null, bool? similar = null, string similarDocumentIds = null, string similarFields = null, string bias = null, bool? xWatsonLoggingOptOut = null);
59+
DetailedResponse<QueryResponse> Query(string environmentId, string collectionId, string filter = null, string query = null, string naturalLanguageQuery = null, bool? passages = null, string aggregation = null, long? count = null, string _return = null, long? offset = null, string sort = null, bool? highlight = null, string passagesFields = null, long? passagesCount = null, long? passagesCharacters = null, bool? deduplicate = null, string deduplicateField = null, string collectionIds = null, bool? similar = null, string similarDocumentIds = null, string similarFields = null, string bias = null, bool? xWatsonLoggingOptOut = null);
6060
DetailedResponse<QueryNoticesResponse> QueryNotices(string environmentId, string collectionId, string filter = null, string query = null, string naturalLanguageQuery = null, bool? passages = null, string aggregation = null, long? count = null, List<string> _return = null, long? offset = null, List<string> sort = null, bool? highlight = null, List<string> passagesFields = null, long? passagesCount = null, long? passagesCharacters = null, string deduplicateField = null, bool? similar = null, List<string> similarDocumentIds = null, List<string> similarFields = null);
61-
DetailedResponse<QueryResponse> FederatedQuery(string environmentId, string collectionIds, string filter = null, string query = null, string naturalLanguageQuery = null, bool? passages = null, string aggregation = null, long? count = null, string _return = null, long? offset = null, string sort = null, bool? highlight = null, string passagesFields = null, long? passagesCount = null, long? passagesCharacters = null, bool? deduplicate = null, string deduplicateField = null, bool? similar = null, string similarDocumentIds = null, string similarFields = null, string bias = null, bool? xWatsonLoggingOptOut = null);
61+
DetailedResponse<QueryResponse> FederatedQuery(string environmentId, string filter = null, string query = null, string naturalLanguageQuery = null, bool? passages = null, string aggregation = null, long? count = null, string _return = null, long? offset = null, string sort = null, bool? highlight = null, string passagesFields = null, long? passagesCount = null, long? passagesCharacters = null, bool? deduplicate = null, string deduplicateField = null, string collectionIds = null, bool? similar = null, string similarDocumentIds = null, string similarFields = null, string bias = null, bool? xWatsonLoggingOptOut = null);
6262
DetailedResponse<QueryNoticesResponse> FederatedQueryNotices(string environmentId, List<string> collectionIds, string filter = null, string query = null, string naturalLanguageQuery = null, string aggregation = null, long? count = null, List<string> _return = null, long? offset = null, List<string> sort = null, bool? highlight = null, string deduplicateField = null, bool? similar = null, List<string> similarDocumentIds = null, List<string> similarFields = null);
6363
DetailedResponse<QueryEntitiesResponse> QueryEntities(string environmentId, string collectionId, string feature = null, QueryEntitiesEntity entity = null, QueryEntitiesContext context = null, long? count = null, long? evidenceCount = null);
6464
DetailedResponse<QueryRelationsResponse> QueryRelations(string environmentId, string collectionId, List<QueryRelationsEntity> entities = null, QueryEntitiesContext context = null, string sort = null, QueryRelationsFilter filter = null, long? count = null, long? evidenceCount = null);
Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
/**
2-
* (C) Copyright IBM Corp. 2018, 2019.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*
16-
*/
17-
18-
using System.Collections.Generic;
19-
using Newtonsoft.Json;
20-
21-
namespace IBM.Watson.SpeechToText.v1.Model
22-
{
23-
/// <summary>
24-
/// An alternative transcript from speech recognition results.
25-
/// </summary>
26-
public class SpeechRecognitionAlternative
27-
{
28-
/// <summary>
29-
/// A transcription of the audio.
30-
/// </summary>
31-
[JsonProperty("transcript", NullValueHandling = NullValueHandling.Ignore)]
32-
public string Transcript { get; set; }
33-
/// <summary>
34-
/// A score that indicates the service's confidence in the transcript in the range of 0.0 to 1.0. A confidence
35-
/// score is returned only for the best alternative and only with results marked as final.
36-
/// </summary>
37-
[JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)]
38-
public double? Confidence { get; set; }
39-
/// <summary>
40-
/// Time alignments for each word from the transcript as a list of lists. Each inner list consists of three
41-
/// elements: the word followed by its start and end time in seconds, for example:
42-
/// `[["hello",0.0,1.2],["world",1.2,2.5]]`. Timestamps are returned only for the best alternative.
43-
/// </summary>
44-
[JsonProperty("timestamps", NullValueHandling = NullValueHandling.Ignore)]
45-
public List<List<string>> Timestamps { get; set; }
46-
/// <summary>
47-
/// A confidence score for each word of the transcript as a list of lists. Each inner list consists of two
48-
/// elements: the word and its confidence score in the range of 0.0 to 1.0, for example:
49-
/// `[["hello",0.95],["world",0.866]]`. Confidence scores are returned only for the best alternative and only
50-
/// with results marked as final.
51-
/// </summary>
52-
[JsonProperty("word_confidence", NullValueHandling = NullValueHandling.Ignore)]
53-
public List<List<string>> WordConfidence { get; set; }
54-
}
55-
56-
}
1+
/**
2+
* (C) Copyright IBM Corp. 2018, 2019.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using System.Collections.Generic;
19+
using Newtonsoft.Json;
20+
21+
namespace IBM.Watson.SpeechToText.v1.Model
22+
{
23+
/// <summary>
24+
/// An alternative transcript from speech recognition results.
25+
/// </summary>
26+
public class SpeechRecognitionAlternative
27+
{
28+
/// <summary>
29+
/// A transcription of the audio.
30+
/// </summary>
31+
[JsonProperty("transcript", NullValueHandling = NullValueHandling.Ignore)]
32+
public string Transcript { get; set; }
33+
/// <summary>
34+
/// A score that indicates the service's confidence in the transcript in the range of 0.0 to 1.0. A confidence
35+
/// score is returned only for the best alternative and only with results marked as final.
36+
/// </summary>
37+
[JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)]
38+
public double? Confidence { get; set; }
39+
/// <summary>
40+
/// Time alignments for each word from the transcript as a list of lists. Each inner list consists of three
41+
/// elements: the word followed by its start and end time in seconds, for example:
42+
/// `[["hello",0.0,1.2],["world",1.2,2.5]]`. Timestamps are returned only for the best alternative.
43+
/// </summary>
44+
[JsonProperty("timestamps", NullValueHandling = NullValueHandling.Ignore)]
45+
public List<List<string>> Timestamps { get; set; }
46+
/// <summary>
47+
/// A confidence score for each word of the transcript as a list of lists. Each inner list consists of two
48+
/// elements: the word and its confidence score in the range of 0.0 to 1.0, for example:
49+
/// `[["hello",0.95],["world",0.866]]`. Confidence scores are returned only for the best alternative and only
50+
/// with results marked as final.
51+
/// </summary>
52+
[JsonProperty("word_confidence", NullValueHandling = NullValueHandling.Ignore)]
53+
public List<List<string>> WordConfidence { get; set; }
54+
}
55+
56+
}

0 commit comments

Comments
 (0)