@@ -133,18 +133,21 @@ public CompareComplyService(string versionDate, Credentials credentials) : base(
133
133
/// </summary>
134
134
/// <param name="callback">The callback function that is invoked when the operation completes.</param>
135
135
/// <param name="file">The file to convert.</param>
136
+ /// <param name="filename">The filename for file.</param>
136
137
/// <param name="modelId">The analysis model to be used by the service. For the `/v1/element_classification` and
137
138
/// `/v1/comparison` methods, the default is `contracts`. For the `/v1/tables` method, the default is `tables`.
138
139
/// These defaults apply to the standalone methods as well as to the methods' use in batch-processing requests.
139
140
/// (optional)</param>
140
141
/// <param name="fileContentType">The content type of file. (optional)</param>
141
142
/// <returns><see cref="HTMLReturn" />HTMLReturn</returns>
142
- public bool ConvertToHtml ( Callback < HTMLReturn > callback , System . IO . FileStream file , string modelId = null , string fileContentType = null )
143
+ public bool ConvertToHtml ( Callback < HTMLReturn > callback , System . IO . MemoryStream file , string filename , string modelId = null , string fileContentType = null )
143
144
{
144
145
if ( callback == null )
145
146
throw new ArgumentNullException ( "`callback` is required for `ConvertToHtml`" ) ;
146
147
if ( file == null )
147
148
throw new ArgumentNullException ( "`file` is required for `ConvertToHtml`" ) ;
149
+ if ( string . IsNullOrEmpty ( filename ) )
150
+ throw new ArgumentNullException ( "`filename` is required for `ConvertToHtml`" ) ;
148
151
149
152
RequestObject < HTMLReturn > req = new RequestObject < HTMLReturn >
150
153
{
@@ -169,7 +172,7 @@ public bool ConvertToHtml(Callback<HTMLReturn> callback, System.IO.FileStream fi
169
172
req . Forms = new Dictionary < string , RESTConnector . Form > ( ) ;
170
173
if ( file != null )
171
174
{
172
- req . Forms [ "file" ] = new RESTConnector . Form ( file , file . Name , fileContentType ) ;
175
+ req . Forms [ "file" ] = new RESTConnector . Form ( file , filename , fileContentType ) ;
173
176
}
174
177
if ( ! string . IsNullOrEmpty ( modelId ) )
175
178
{
@@ -218,13 +221,14 @@ private void OnConvertToHtmlResponse(RESTConnector.Request req, RESTConnector.Re
218
221
/// </summary>
219
222
/// <param name="callback">The callback function that is invoked when the operation completes.</param>
220
223
/// <param name="file">The file to classify.</param>
224
+ /// <param name="filename">The filename for file. (optional)</param>
221
225
/// <param name="modelId">The analysis model to be used by the service. For the `/v1/element_classification` and
222
226
/// `/v1/comparison` methods, the default is `contracts`. For the `/v1/tables` method, the default is `tables`.
223
227
/// These defaults apply to the standalone methods as well as to the methods' use in batch-processing requests.
224
228
/// (optional)</param>
225
229
/// <param name="fileContentType">The content type of file. (optional)</param>
226
230
/// <returns><see cref="ClassifyReturn" />ClassifyReturn</returns>
227
- public bool ClassifyElements ( Callback < ClassifyReturn > callback , System . IO . FileStream file , string modelId = null , string fileContentType = null )
231
+ public bool ClassifyElements ( Callback < ClassifyReturn > callback , System . IO . MemoryStream file , string filename = null , string modelId = null , string fileContentType = null )
228
232
{
229
233
if ( callback == null )
230
234
throw new ArgumentNullException ( "`callback` is required for `ClassifyElements`" ) ;
@@ -254,7 +258,7 @@ public bool ClassifyElements(Callback<ClassifyReturn> callback, System.IO.FileSt
254
258
req . Forms = new Dictionary < string , RESTConnector . Form > ( ) ;
255
259
if ( file != null )
256
260
{
257
- req . Forms [ "file" ] = new RESTConnector . Form ( file , file . Name , fileContentType ) ;
261
+ req . Forms [ "file" ] = new RESTConnector . Form ( file , filename , fileContentType ) ;
258
262
}
259
263
if ( ! string . IsNullOrEmpty ( modelId ) )
260
264
{
@@ -303,13 +307,14 @@ private void OnClassifyElementsResponse(RESTConnector.Request req, RESTConnector
303
307
/// </summary>
304
308
/// <param name="callback">The callback function that is invoked when the operation completes.</param>
305
309
/// <param name="file">The file on which to run table extraction.</param>
310
+ /// <param name="filename">The filename for file. (optional)</param>
306
311
/// <param name="modelId">The analysis model to be used by the service. For the `/v1/element_classification` and
307
312
/// `/v1/comparison` methods, the default is `contracts`. For the `/v1/tables` method, the default is `tables`.
308
313
/// These defaults apply to the standalone methods as well as to the methods' use in batch-processing requests.
309
314
/// (optional)</param>
310
315
/// <param name="fileContentType">The content type of file. (optional)</param>
311
316
/// <returns><see cref="TableReturn" />TableReturn</returns>
312
- public bool ExtractTables ( Callback < TableReturn > callback , System . IO . FileStream file , string modelId = null , string fileContentType = null )
317
+ public bool ExtractTables ( Callback < TableReturn > callback , System . IO . MemoryStream file , string filename = null , string modelId = null , string fileContentType = null )
313
318
{
314
319
if ( callback == null )
315
320
throw new ArgumentNullException ( "`callback` is required for `ExtractTables`" ) ;
@@ -339,7 +344,7 @@ public bool ExtractTables(Callback<TableReturn> callback, System.IO.FileStream f
339
344
req . Forms = new Dictionary < string , RESTConnector . Form > ( ) ;
340
345
if ( file != null )
341
346
{
342
- req . Forms [ "file" ] = new RESTConnector . Form ( file , file . Name , fileContentType ) ;
347
+ req . Forms [ "file" ] = new RESTConnector . Form ( file , filename , fileContentType ) ;
343
348
}
344
349
if ( ! string . IsNullOrEmpty ( modelId ) )
345
350
{
@@ -388,7 +393,9 @@ private void OnExtractTablesResponse(RESTConnector.Request req, RESTConnector.Re
388
393
/// </summary>
389
394
/// <param name="callback">The callback function that is invoked when the operation completes.</param>
390
395
/// <param name="file1">The first file to compare.</param>
396
+ /// <param name="file1Filename">The filename for file1. (optional)</param>
391
397
/// <param name="file2">The second file to compare.</param>
398
+ /// <param name="file2Filename">The filename for file2. (optional)</param>
392
399
/// <param name="file1Label">A text label for the first file. (optional, default to file_1)</param>
393
400
/// <param name="file2Label">A text label for the second file. (optional, default to file_2)</param>
394
401
/// <param name="modelId">The analysis model to be used by the service. For the `/v1/element_classification` and
@@ -398,7 +405,7 @@ private void OnExtractTablesResponse(RESTConnector.Request req, RESTConnector.Re
398
405
/// <param name="file1ContentType">The content type of file1. (optional)</param>
399
406
/// <param name="file2ContentType">The content type of file2. (optional)</param>
400
407
/// <returns><see cref="CompareReturn" />CompareReturn</returns>
401
- public bool CompareDocuments ( Callback < CompareReturn > callback , System . IO . FileStream file1 , System . IO . FileStream file2 , string file1Label = null , string file2Label = null , string modelId = null , string file1ContentType = null , string file2ContentType = null )
408
+ public bool CompareDocuments ( Callback < CompareReturn > callback , System . IO . MemoryStream file1 , System . IO . MemoryStream file2 , string file1Filename = null , string file2Filename = null , string file1Label = null , string file2Label = null , string modelId = null , string file1ContentType = null , string file2ContentType = null )
402
409
{
403
410
if ( callback == null )
404
411
throw new ArgumentNullException ( "`callback` is required for `CompareDocuments`" ) ;
@@ -430,11 +437,11 @@ public bool CompareDocuments(Callback<CompareReturn> callback, System.IO.FileStr
430
437
req . Forms = new Dictionary < string , RESTConnector . Form > ( ) ;
431
438
if ( file1 != null )
432
439
{
433
- req . Forms [ "file_1" ] = new RESTConnector . Form ( file1 , file1 . Name , file1ContentType ) ;
440
+ req . Forms [ "file_1" ] = new RESTConnector . Form ( file1 , file1Filename , file1ContentType ) ;
434
441
}
435
442
if ( file2 != null )
436
443
{
437
- req . Forms [ "file_2" ] = new RESTConnector . Form ( file2 , file2 . Name , file2ContentType ) ;
444
+ req . Forms [ "file_2" ] = new RESTConnector . Form ( file2 , file2Filename , file2ContentType ) ;
438
445
}
439
446
if ( ! string . IsNullOrEmpty ( file1Label ) )
440
447
{
@@ -909,13 +916,15 @@ private void OnListFeedbackResponse(RESTConnector.Request req, RESTConnector.Res
909
916
/// <param name="inputCredentialsFile">A JSON file containing the input Cloud Object Storage credentials. At a
910
917
/// minimum, the credentials must enable `READ` permissions on the bucket defined by the `input_bucket_name`
911
918
/// parameter.</param>
919
+ /// <param name="inputCredentialsFilename">The filename for inputCredentialsFile. (optional)</param>
912
920
/// <param name="inputBucketLocation">The geographical location of the Cloud Object Storage input bucket as
913
921
/// listed on the **Endpoint** tab of your Cloud Object Storage instance; for example, `us-geo`, `eu-geo`, or
914
922
/// `ap-geo`.</param>
915
923
/// <param name="inputBucketName">The name of the Cloud Object Storage input bucket.</param>
916
924
/// <param name="outputCredentialsFile">A JSON file that lists the Cloud Object Storage output credentials. At a
917
925
/// minimum, the credentials must enable `READ` and `WRITE` permissions on the bucket defined by the
918
926
/// `output_bucket_name` parameter.</param>
927
+ /// <param name="outputCredentialsFilename">The filename for outputCredentialsFile. (optional)</param>
919
928
/// <param name="outputBucketLocation">The geographical location of the Cloud Object Storage output bucket as
920
929
/// listed on the **Endpoint** tab of your Cloud Object Storage instance; for example, `us-geo`, `eu-geo`, or
921
930
/// `ap-geo`.</param>
@@ -925,7 +934,7 @@ private void OnListFeedbackResponse(RESTConnector.Request req, RESTConnector.Res
925
934
/// These defaults apply to the standalone methods as well as to the methods' use in batch-processing requests.
926
935
/// (optional)</param>
927
936
/// <returns><see cref="BatchStatus" />BatchStatus</returns>
928
- public bool CreateBatch ( Callback < BatchStatus > callback , string function , System . IO . FileStream inputCredentialsFile , string inputBucketLocation , string inputBucketName , System . IO . FileStream outputCredentialsFile , string outputBucketLocation , string outputBucketName , string modelId = null )
937
+ public bool CreateBatch ( Callback < BatchStatus > callback , string function , System . IO . MemoryStream inputCredentialsFile , string inputBucketLocation , string inputBucketName , System . IO . MemoryStream outputCredentialsFile , string outputBucketLocation , string outputBucketName , string inputCredentialsFilename = null , string outputCredentialsFilename = null , string modelId = null )
929
938
{
930
939
if ( callback == null )
931
940
throw new ArgumentNullException ( "`callback` is required for `CreateBatch`" ) ;
@@ -967,7 +976,7 @@ public bool CreateBatch(Callback<BatchStatus> callback, string function, System.
967
976
req . Forms = new Dictionary < string , RESTConnector . Form > ( ) ;
968
977
if ( inputCredentialsFile != null )
969
978
{
970
- req . Forms [ "input_credentials_file" ] = new RESTConnector . Form ( inputCredentialsFile , inputCredentialsFile . Name , "application/json" ) ;
979
+ req . Forms [ "input_credentials_file" ] = new RESTConnector . Form ( inputCredentialsFile , inputCredentialsFilename , "application/json" ) ;
971
980
}
972
981
if ( ! string . IsNullOrEmpty ( inputBucketLocation ) )
973
982
{
@@ -979,7 +988,7 @@ public bool CreateBatch(Callback<BatchStatus> callback, string function, System.
979
988
}
980
989
if ( outputCredentialsFile != null )
981
990
{
982
- req . Forms [ "output_credentials_file" ] = new RESTConnector . Form ( outputCredentialsFile , outputCredentialsFile . Name , "application/json" ) ;
991
+ req . Forms [ "output_credentials_file" ] = new RESTConnector . Form ( outputCredentialsFile , outputCredentialsFilename , "application/json" ) ;
983
992
}
984
993
if ( ! string . IsNullOrEmpty ( outputBucketLocation ) )
985
994
{
0 commit comments