Skip to content

Commit c090ef5

Browse files
committed
feat: regenrate all of the services with current api defs
1 parent 0433887 commit c090ef5

22 files changed

+97
-272
lines changed

Scripts/Services/Assistant/V1/AssistantService.cs

Lines changed: 7 additions & 50 deletions
Large diffs are not rendered by default.

Scripts/Services/Assistant/V2/AssistantService.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2018, 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,7 +72,6 @@ public AssistantService(string versionDate) : this(versionDate, ConfigBasedAuthe
7272
public AssistantService(string versionDate, Authenticator authenticator) : base(versionDate, authenticator, serviceId)
7373
{
7474
Authenticator = authenticator;
75-
7675
if (string.IsNullOrEmpty(versionDate))
7776
{
7877
throw new ArgumentNullException("A versionDate (format `yyyy-mm-dd`) is required to create an instance of AssistantService");
@@ -82,6 +81,7 @@ public AssistantService(string versionDate, Authenticator authenticator) : base(
8281
VersionDate = versionDate;
8382
}
8483

84+
8585
if (string.IsNullOrEmpty(GetServiceUrl()))
8686
{
8787
SetServiceUrl(defaultServiceUrl);
@@ -136,7 +136,6 @@ public bool CreateSession(Callback<SessionResponse> callback, string assistantId
136136

137137
Connector.URL = GetServiceUrl() + string.Format("/v2/assistants/{0}/sessions", assistantId);
138138
Authenticator.Authenticate(Connector);
139-
140139
return Connector.Send(req);
141140
}
142141

@@ -214,7 +213,6 @@ public bool DeleteSession(Callback<object> callback, string assistantId, string
214213

215214
Connector.URL = GetServiceUrl() + string.Format("/v2/assistants/{0}/sessions/{1}", assistantId, sessionId);
216215
Authenticator.Authenticate(Connector);
217-
218216
return Connector.Send(req);
219217
}
220218

@@ -305,7 +303,6 @@ public bool Message(Callback<MessageResponse> callback, string assistantId, stri
305303

306304
Connector.URL = GetServiceUrl() + string.Format("/v2/assistants/{0}/sessions/{1}/message", assistantId, sessionId);
307305
Authenticator.Authenticate(Connector);
308-
309306
return Connector.Send(req);
310307
}
311308

@@ -334,4 +331,4 @@ private void OnMessageResponse(RESTConnector.Request req, RESTConnector.Response
334331
((RequestObject<MessageResponse>)req).Callback(response, resp.Error);
335332
}
336333
}
337-
}
334+
}

Scripts/Services/Assistant/V2/Model/MessageContextSkill.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2018, 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,5 +30,10 @@ public class MessageContextSkill
3030
/// </summary>
3131
[JsonProperty("user_defined", NullValueHandling = NullValueHandling.Ignore)]
3232
public Dictionary<string, object> UserDefined { get; set; }
33+
/// <summary>
34+
/// For internal use only.
35+
/// </summary>
36+
[JsonProperty("system", NullValueHandling = NullValueHandling.Ignore)]
37+
public Dictionary<string, object> System { get; set; }
3338
}
3439
}

Scripts/Services/CompareComply/V1/CompareComplyService.cs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2018, 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,7 +72,6 @@ public CompareComplyService(string versionDate) : this(versionDate, ConfigBasedA
7272
public CompareComplyService(string versionDate, Authenticator authenticator) : base(versionDate, authenticator, serviceId)
7373
{
7474
Authenticator = authenticator;
75-
7675
if (string.IsNullOrEmpty(versionDate))
7776
{
7877
throw new ArgumentNullException("A versionDate (format `yyyy-mm-dd`) is required to create an instance of CompareComplyService");
@@ -82,6 +81,7 @@ public CompareComplyService(string versionDate, Authenticator authenticator) : b
8281
VersionDate = versionDate;
8382
}
8483

84+
8585
if (string.IsNullOrEmpty(GetServiceUrl()))
8686
{
8787
SetServiceUrl(defaultServiceUrl);
@@ -142,7 +142,6 @@ public bool ConvertToHtml(Callback<HTMLReturn> callback, System.IO.MemoryStream
142142

143143
Connector.URL = GetServiceUrl() + "/v1/html_conversion";
144144
Authenticator.Authenticate(Connector);
145-
146145
return Connector.Send(req);
147146
}
148147

@@ -224,7 +223,6 @@ public bool ClassifyElements(Callback<ClassifyReturn> callback, System.IO.Memory
224223

225224
Connector.URL = GetServiceUrl() + "/v1/element_classification";
226225
Authenticator.Authenticate(Connector);
227-
228226
return Connector.Send(req);
229227
}
230228

@@ -306,7 +304,6 @@ public bool ExtractTables(Callback<TableReturn> callback, System.IO.MemoryStream
306304

307305
Connector.URL = GetServiceUrl() + "/v1/tables";
308306
Authenticator.Authenticate(Connector);
309-
310307
return Connector.Send(req);
311308
}
312309

@@ -406,7 +403,6 @@ public bool CompareDocuments(Callback<CompareReturn> callback, System.IO.MemoryS
406403

407404
Connector.URL = GetServiceUrl() + "/v1/comparison";
408405
Authenticator.Authenticate(Connector);
409-
410406
return Connector.Send(req);
411407
}
412408

@@ -490,7 +486,6 @@ public bool AddFeedback(Callback<FeedbackReturn> callback, FeedbackDataInput fee
490486

491487
Connector.URL = GetServiceUrl() + "/v1/feedback";
492488
Authenticator.Authenticate(Connector);
493-
494489
return Connector.Send(req);
495490
}
496491

@@ -659,7 +654,6 @@ public bool ListFeedback(Callback<FeedbackList> callback, string feedbackType =
659654

660655
Connector.URL = GetServiceUrl() + "/v1/feedback";
661656
Authenticator.Authenticate(Connector);
662-
663657
return Connector.Send(req);
664658
}
665659

@@ -735,7 +729,6 @@ public bool GetFeedback(Callback<GetFeedback> callback, string feedbackId, strin
735729

736730
Connector.URL = GetServiceUrl() + string.Format("/v1/feedback/{0}", feedbackId);
737731
Authenticator.Authenticate(Connector);
738-
739732
return Connector.Send(req);
740733
}
741734

@@ -811,7 +804,6 @@ public bool DeleteFeedback(Callback<FeedbackDeleted> callback, string feedbackId
811804

812805
Connector.URL = GetServiceUrl() + string.Format("/v1/feedback/{0}", feedbackId);
813806
Authenticator.Authenticate(Connector);
814-
815807
return Connector.Send(req);
816808
}
817809

@@ -947,7 +939,6 @@ public bool CreateBatch(Callback<BatchStatus> callback, string function, System.
947939

948940
Connector.URL = GetServiceUrl() + "/v1/batches";
949941
Authenticator.Authenticate(Connector);
950-
951942
return Connector.Send(req);
952943
}
953944

@@ -1012,7 +1003,6 @@ public bool ListBatches(Callback<Batches> callback)
10121003

10131004
Connector.URL = GetServiceUrl() + "/v1/batches";
10141005
Authenticator.Authenticate(Connector);
1015-
10161006
return Connector.Send(req);
10171007
}
10181008

@@ -1080,7 +1070,6 @@ public bool GetBatch(Callback<BatchStatus> callback, string batchId)
10801070

10811071
Connector.URL = GetServiceUrl() + string.Format("/v1/batches/{0}", batchId);
10821072
Authenticator.Authenticate(Connector);
1083-
10841073
return Connector.Send(req);
10851074
}
10861075

@@ -1164,7 +1153,6 @@ public bool UpdateBatch(Callback<BatchStatus> callback, string batchId, string a
11641153

11651154
Connector.URL = GetServiceUrl() + string.Format("/v1/batches/{0}", batchId);
11661155
Authenticator.Authenticate(Connector);
1167-
11681156
return Connector.Send(req);
11691157
}
11701158

@@ -1193,4 +1181,4 @@ private void OnUpdateBatchResponse(RESTConnector.Request req, RESTConnector.Resp
11931181
((RequestObject<BatchStatus>)req).Callback(response, resp.Error);
11941182
}
11951183
}
1196-
}
1184+
}

0 commit comments

Comments
 (0)