@@ -39,17 +39,13 @@ public string VersionDate
3939 set { _versionDate = value ; }
4040 }
4141
42- public CompareComplyService ( ) : base ( SERVICE_NAME , URL )
43- {
44- if ( ! string . IsNullOrEmpty ( this . Endpoint ) )
45- this . Endpoint = URL ;
46- }
42+ public CompareComplyService ( ) : base ( SERVICE_NAME ) { }
4743
4844 public CompareComplyService ( TokenOptions options , string versionDate ) : this ( )
4945 {
5046 if ( string . IsNullOrEmpty ( options . IamApiKey ) && string . IsNullOrEmpty ( options . IamAccessToken ) )
5147 throw new ArgumentNullException ( nameof ( options . IamAccessToken ) + ", " + nameof ( options . IamApiKey ) ) ;
52- if ( string . IsNullOrEmpty ( versionDate ) )
48+ if ( string . IsNullOrEmpty ( versionDate ) )
5349 throw new ArgumentNullException ( "versionDate cannot be null." ) ;
5450
5551 VersionDate = versionDate ;
@@ -119,14 +115,14 @@ public HTMLReturn ConvertToHtml(System.IO.FileStream file, string modelId = null
119115 restRequest . WithBodyContent ( formData ) ;
120116 if ( customData != null )
121117 restRequest . WithCustomData ( customData ) ;
122-
118+
123119 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=ConvertToHtml" ) ;
124120 result = restRequest . As < HTMLReturn > ( ) . Result ;
125- if ( result == null )
121+ if ( result == null )
126122 result = new HTMLReturn ( ) ;
127123 result . CustomData = restRequest . CustomData ;
128124 }
129- catch ( AggregateException ae )
125+ catch ( AggregateException ae )
130126 {
131127 throw ae . Flatten ( ) ;
132128 }
@@ -178,14 +174,14 @@ public ClassifyReturn ClassifyElements(System.IO.FileStream file, string modelId
178174 restRequest . WithBodyContent ( formData ) ;
179175 if ( customData != null )
180176 restRequest . WithCustomData ( customData ) ;
181-
177+
182178 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=ClassifyElements" ) ;
183179 result = restRequest . As < ClassifyReturn > ( ) . Result ;
184- if ( result == null )
180+ if ( result == null )
185181 result = new ClassifyReturn ( ) ;
186182 result . CustomData = restRequest . CustomData ;
187183 }
188- catch ( AggregateException ae )
184+ catch ( AggregateException ae )
189185 {
190186 throw ae . Flatten ( ) ;
191187 }
@@ -237,14 +233,14 @@ public TableReturn ExtractTables(System.IO.FileStream file, string modelId = nul
237233 restRequest . WithBodyContent ( formData ) ;
238234 if ( customData != null )
239235 restRequest . WithCustomData ( customData ) ;
240-
236+
241237 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=ExtractTables" ) ;
242238 result = restRequest . As < TableReturn > ( ) . Result ;
243- if ( result == null )
239+ if ( result == null )
244240 result = new TableReturn ( ) ;
245241 result . CustomData = restRequest . CustomData ;
246242 }
247- catch ( AggregateException ae )
243+ catch ( AggregateException ae )
248244 {
249245 throw ae . Flatten ( ) ;
250246 }
@@ -316,14 +312,14 @@ public CompareReturn CompareDocuments(System.IO.FileStream file1, System.IO.File
316312 restRequest . WithBodyContent ( formData ) ;
317313 if ( customData != null )
318314 restRequest . WithCustomData ( customData ) ;
319-
315+
320316 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=CompareDocuments" ) ;
321317 result = restRequest . As < CompareReturn > ( ) . Result ;
322- if ( result == null )
318+ if ( result == null )
323319 result = new CompareReturn ( ) ;
324320 result . CustomData = restRequest . CustomData ;
325321 }
326- catch ( AggregateException ae )
322+ catch ( AggregateException ae )
327323 {
328324 throw ae . Flatten ( ) ;
329325 }
@@ -360,14 +356,14 @@ public FeedbackReturn AddFeedback(FeedbackInput feedbackData, Dictionary<string,
360356 restRequest . WithBody < FeedbackInput > ( feedbackData ) ;
361357 if ( customData != null )
362358 restRequest . WithCustomData ( customData ) ;
363-
359+
364360 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=AddFeedback" ) ;
365361 result = restRequest . As < FeedbackReturn > ( ) . Result ;
366- if ( result == null )
362+ if ( result == null )
367363 result = new FeedbackReturn ( ) ;
368364 result . CustomData = restRequest . CustomData ;
369365 }
370- catch ( AggregateException ae )
366+ catch ( AggregateException ae )
371367 {
372368 throw ae . Flatten ( ) ;
373369 }
@@ -406,14 +402,14 @@ public FeedbackDeleted DeleteFeedback(string feedbackId, string modelId = null,
406402 restRequest . WithArgument ( "model_id" , modelId ) ;
407403 if ( customData != null )
408404 restRequest . WithCustomData ( customData ) ;
409-
405+
410406 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=DeleteFeedback" ) ;
411407 result = restRequest . As < FeedbackDeleted > ( ) . Result ;
412- if ( result == null )
408+ if ( result == null )
413409 result = new FeedbackDeleted ( ) ;
414410 result . CustomData = restRequest . CustomData ;
415411 }
416- catch ( AggregateException ae )
412+ catch ( AggregateException ae )
417413 {
418414 throw ae . Flatten ( ) ;
419415 }
@@ -451,14 +447,14 @@ public GetFeedback GetFeedback(string feedbackId, string modelId = null, Diction
451447 restRequest . WithArgument ( "model_id" , modelId ) ;
452448 if ( customData != null )
453449 restRequest . WithCustomData ( customData ) ;
454-
450+
455451 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=GetFeedback" ) ;
456452 result = restRequest . As < GetFeedback > ( ) . Result ;
457- if ( result == null )
453+ if ( result == null )
458454 result = new GetFeedback ( ) ;
459455 result . CustomData = restRequest . CustomData ;
460456 }
461- catch ( AggregateException ae )
457+ catch ( AggregateException ae )
462458 {
463459 throw ae . Flatten ( ) ;
464460 }
@@ -559,14 +555,14 @@ public FeedbackList ListFeedback(string feedbackType = null, DateTime? before =
559555 restRequest . WithArgument ( "include_total" , includeTotal ) ;
560556 if ( customData != null )
561557 restRequest . WithCustomData ( customData ) ;
562-
558+
563559 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=ListFeedback" ) ;
564560 result = restRequest . As < FeedbackList > ( ) . Result ;
565- if ( result == null )
561+ if ( result == null )
566562 result = new FeedbackList ( ) ;
567563 result . CustomData = restRequest . CustomData ;
568564 }
569- catch ( AggregateException ae )
565+ catch ( AggregateException ae )
570566 {
571567 throw ae . Flatten ( ) ;
572568 }
@@ -686,14 +682,14 @@ public BatchStatus CreateBatch(string function, System.IO.FileStream inputCreden
686682 restRequest . WithBodyContent ( formData ) ;
687683 if ( customData != null )
688684 restRequest . WithCustomData ( customData ) ;
689-
685+
690686 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=CreateBatch" ) ;
691687 result = restRequest . As < BatchStatus > ( ) . Result ;
692- if ( result == null )
688+ if ( result == null )
693689 result = new BatchStatus ( ) ;
694690 result . CustomData = restRequest . CustomData ;
695691 }
696- catch ( AggregateException ae )
692+ catch ( AggregateException ae )
697693 {
698694 throw ae . Flatten ( ) ;
699695 }
@@ -727,14 +723,14 @@ public BatchStatus GetBatch(string batchId, Dictionary<string, object> customDat
727723 restRequest . WithArgument ( "version" , VersionDate ) ;
728724 if ( customData != null )
729725 restRequest . WithCustomData ( customData ) ;
730-
726+
731727 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=GetBatch" ) ;
732728 result = restRequest . As < BatchStatus > ( ) . Result ;
733- if ( result == null )
729+ if ( result == null )
734730 result = new BatchStatus ( ) ;
735731 result . CustomData = restRequest . CustomData ;
736732 }
737- catch ( AggregateException ae )
733+ catch ( AggregateException ae )
738734 {
739735 throw ae . Flatten ( ) ;
740736 }
@@ -765,14 +761,14 @@ public Batches ListBatches(Dictionary<string, object> customData = null)
765761 restRequest . WithArgument ( "version" , VersionDate ) ;
766762 if ( customData != null )
767763 restRequest . WithCustomData ( customData ) ;
768-
764+
769765 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=ListBatches" ) ;
770766 result = restRequest . As < Batches > ( ) . Result ;
771- if ( result == null )
767+ if ( result == null )
772768 result = new Batches ( ) ;
773769 result . CustomData = restRequest . CustomData ;
774770 }
775- catch ( AggregateException ae )
771+ catch ( AggregateException ae )
776772 {
777773 throw ae . Flatten ( ) ;
778774 }
@@ -818,14 +814,14 @@ public BatchStatus UpdateBatch(string batchId, string action, string modelId = n
818814 restRequest . WithArgument ( "model_id" , modelId ) ;
819815 if ( customData != null )
820816 restRequest . WithCustomData ( customData ) ;
821-
817+
822818 restRequest . WithHeader ( "X-IBMCloud-SDK-Analytics" , "service_name=compare-comply;service_version=v1;operation_id=UpdateBatch" ) ;
823819 result = restRequest . As < BatchStatus > ( ) . Result ;
824- if ( result == null )
820+ if ( result == null )
825821 result = new BatchStatus ( ) ;
826822 result . CustomData = restRequest . CustomData ;
827823 }
828- catch ( AggregateException ae )
824+ catch ( AggregateException ae )
829825 {
830826 throw ae . Flatten ( ) ;
831827 }
0 commit comments