-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Compare and Comply): Generated Compare and Comply service and wr…
…ite integration tests
- Loading branch information
Showing
61 changed files
with
4,275 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
925 changes: 925 additions & 0 deletions
925
src/IBM.WatsonDeveloperCloud.CompareComply.v1/CompareComplyService.cs
Large diffs are not rendered by default.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
...BM.WatsonDeveloperCloud.CompareComply.v1/IBM.WatsonDeveloperCloud.CompareComply.v1.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Description>IBM.WatsonDeveloperCloud.CompareComply.v1 wraps the Watson Developer Cloud Compare Comply service (http://www.ibm.com/watson/developercloud/compare-comply.html)</Description> | ||
<AssemblyTitle>IBM.WatsonDeveloperCloud.CompareComply.v1</AssemblyTitle> | ||
<VersionPrefix>2.11.0</VersionPrefix> | ||
<Authors>Watson Developer Cloud</Authors> | ||
<TargetFramework>netstandard1.3</TargetFramework> | ||
<AssemblyName>IBM.WatsonDeveloperCloud.CompareComply.v1</AssemblyName> | ||
<PackageId>IBM.WatsonDeveloperCloud.CompareComply.v1</PackageId> | ||
<PackageTags>watson;cognitive;speech;vision;machine-learning;ml;ai;artificial-intelligence;.NET;.NET-Standard</PackageTags> | ||
<PackageIconUrl>https://watson-developer-cloud.github.io/dotnet-standard-sdk/img/Watson_Avatar_Pos_RGB.png</PackageIconUrl> | ||
<PackageProjectUrl>https://github.com/watson-developer-cloud/dotnet-standard-sdk</PackageProjectUrl> | ||
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion> | ||
<Version>2.11.0</Version> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<DebugType>full</DebugType> | ||
<DebugSymbols>true</DebugSymbols> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DebugType>full</DebugType> | ||
<DebugSymbols>true</DebugSymbols> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\IBM.WatsonDeveloperCloud\IBM.WatsonDeveloperCloud.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
39 changes: 39 additions & 0 deletions
39
src/IBM.WatsonDeveloperCloud.CompareComply.v1/ICompareComplyService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright 2018 IBM Corp. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using IBM.WatsonDeveloperCloud.CompareComply.v1.Model; | ||
|
||
namespace IBM.WatsonDeveloperCloud.CompareComply.v1 | ||
{ | ||
public partial interface ICompareComplyService | ||
{ | ||
HTMLReturn ConvertToHtml(System.IO.FileStream file, string modelId = null, string fileContentType = null, Dictionary<string, object> customData = null); | ||
ClassifyReturn ClassifyElements(System.IO.FileStream file, string modelId = null, Dictionary<string, object> customData = null); | ||
TableReturn ExtractTables(System.IO.FileStream file, string modelId = null, Dictionary<string, object> customData = null); | ||
CompareReturn CompareDocuments(System.IO.FileStream file1, System.IO.FileStream file2, string file1Label = null, string file2Label = null, string modelId = null, string file1ContentType = null, string file2ContentType = null, Dictionary<string, object> customData = null); | ||
FeedbackReturn AddFeedback(FeedbackInput feedbackData, Dictionary<string, object> customData = null); | ||
FeedbackDeleted DeleteFeedback(string feedbackId, string modelId = null, Dictionary<string, object> customData = null); | ||
GetFeedback GetFeedback(string feedbackId, string modelId = null, Dictionary<string, object> customData = null); | ||
FeedbackList ListFeedback(string feedbackType = null, DateTime? before = null, DateTime? after = null, string documentTitle = null, string modelId = null, string modelVersion = null, string categoryRemoved = null, string categoryAdded = null, string categoryUnchanged = null, string typeRemoved = null, string typeAdded = null, string typeUnchanged = null, long? count = null, long? offset = null, string sort = null, Dictionary<string, object> customData = null); | ||
BatchStatus CreateBatch(string function, System.IO.FileStream inputCredentialsFile, string inputBucketLocation, string inputBucketName, System.IO.FileStream outputCredentialsFile, string outputBucketLocation, string outputBucketName, string modelId = null, Dictionary<string, object> customData = null); | ||
BatchStatus GetBatch(string batchId, Dictionary<string, object> customData = null); | ||
BatchStatus GetBatches(Dictionary<string, object> customData = null); | ||
BatchStatus UpdateBatch(string batchId, string action, string modelId = null, Dictionary<string, object> customData = null); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/IBM.WatsonDeveloperCloud.CompareComply.v1/Model/Address.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Copyright 2018 IBM Corp. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
using Newtonsoft.Json; | ||
|
||
namespace IBM.WatsonDeveloperCloud.CompareComply.v1.Model | ||
{ | ||
/// <summary> | ||
/// A party's address. | ||
/// </summary> | ||
public class Address : BaseModel | ||
{ | ||
/// <summary> | ||
/// A string listing the address. | ||
/// </summary> | ||
[JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Text { get; set; } | ||
/// <summary> | ||
/// The numeric location of the identified element in the document, represented with two integers labeled | ||
/// `begin` and `end`. | ||
/// </summary> | ||
[JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] | ||
public Location Location { get; set; } | ||
} | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
src/IBM.WatsonDeveloperCloud.CompareComply.v1/Model/AlignedElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* Copyright 2018 IBM Corp. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace IBM.WatsonDeveloperCloud.CompareComply.v1.Model | ||
{ | ||
/// <summary> | ||
/// AlignedElement. | ||
/// </summary> | ||
public class AlignedElement : BaseModel | ||
{ | ||
/// <summary> | ||
/// Identifies two elements that semantically align between the compared documents. | ||
/// </summary> | ||
[JsonProperty("element_pair", NullValueHandling = NullValueHandling.Ignore)] | ||
public List<ElementPair> ElementPair { get; set; } | ||
/// <summary> | ||
/// Specifies whether the text is identical. | ||
/// </summary> | ||
[JsonProperty("identical_text", NullValueHandling = NullValueHandling.Ignore)] | ||
public bool? IdenticalText { get; set; } | ||
/// <summary> | ||
/// One or more hashed values that you can send to IBM to provide feedback or receive support. | ||
/// </summary> | ||
[JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] | ||
public List<string> ProvenanceIds { get; set; } | ||
} | ||
|
||
} |
76 changes: 76 additions & 0 deletions
76
src/IBM.WatsonDeveloperCloud.CompareComply.v1/Model/Attribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/** | ||
* Copyright 2018 IBM Corp. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace IBM.WatsonDeveloperCloud.CompareComply.v1.Model | ||
{ | ||
/// <summary> | ||
/// List of document attributes. | ||
/// </summary> | ||
public class Attribute : BaseModel | ||
{ | ||
/// <summary> | ||
/// The type of attribute. Possible values are `Currency`, `DateTime`, and `Location`. | ||
/// </summary> | ||
/// <value> | ||
/// The type of attribute. Possible values are `Currency`, `DateTime`, and `Location`. | ||
/// </value> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum TypeEnum | ||
{ | ||
|
||
/// <summary> | ||
/// Enum CURRENCY for Currency | ||
/// </summary> | ||
[EnumMember(Value = "Currency")] | ||
CURRENCY, | ||
|
||
/// <summary> | ||
/// Enum DATETIME for DateTime | ||
/// </summary> | ||
[EnumMember(Value = "DateTime")] | ||
DATETIME, | ||
|
||
/// <summary> | ||
/// Enum LOCATION for Location | ||
/// </summary> | ||
[EnumMember(Value = "Location")] | ||
LOCATION | ||
} | ||
|
||
/// <summary> | ||
/// The type of attribute. Possible values are `Currency`, `DateTime`, and `Location`. | ||
/// </summary> | ||
[JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] | ||
public TypeEnum? Type { get; set; } | ||
/// <summary> | ||
/// The text associated with the attribute. | ||
/// </summary> | ||
[JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Text { get; set; } | ||
/// <summary> | ||
/// The numeric location of the identified element in the document, represented with two integers labeled | ||
/// `begin` and `end`. | ||
/// </summary> | ||
[JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] | ||
public Location Location { get; set; } | ||
} | ||
|
||
} |
116 changes: 116 additions & 0 deletions
116
src/IBM.WatsonDeveloperCloud.CompareComply.v1/Model/BatchStatus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/** | ||
* Copyright 2018 IBM Corp. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
using System; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace IBM.WatsonDeveloperCloud.CompareComply.v1.Model | ||
{ | ||
/// <summary> | ||
/// The batch-request status. | ||
/// </summary> | ||
public class BatchStatus : BaseModel | ||
{ | ||
/// <summary> | ||
/// The method to be run against the documents. Possible values are `html_conversion`, `element_classification`, | ||
/// and `tables`. | ||
/// </summary> | ||
/// <value> | ||
/// The method to be run against the documents. Possible values are `html_conversion`, `element_classification`, | ||
/// and `tables`. | ||
/// </value> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum FunctionEnum | ||
{ | ||
|
||
/// <summary> | ||
/// Enum ELEMENT_CLASSIFICATION for element_classification | ||
/// </summary> | ||
[EnumMember(Value = "element_classification")] | ||
ELEMENT_CLASSIFICATION, | ||
|
||
/// <summary> | ||
/// Enum HTML_CONVERSION for html_conversion | ||
/// </summary> | ||
[EnumMember(Value = "html_conversion")] | ||
HTML_CONVERSION, | ||
|
||
/// <summary> | ||
/// Enum TABLES for tables | ||
/// </summary> | ||
[EnumMember(Value = "tables")] | ||
TABLES | ||
} | ||
|
||
/// <summary> | ||
/// The method to be run against the documents. Possible values are `html_conversion`, `element_classification`, | ||
/// and `tables`. | ||
/// </summary> | ||
[JsonProperty("function", NullValueHandling = NullValueHandling.Ignore)] | ||
public FunctionEnum? Function { get; set; } | ||
/// <summary> | ||
/// The geographical location of the Cloud Object Storage input bucket as listed on the **Endpoint** tab of your | ||
/// COS instance; for example, `us-geo`, `eu-geo`, or `ap-geo`. | ||
/// </summary> | ||
[JsonProperty("input_bucket_location", NullValueHandling = NullValueHandling.Ignore)] | ||
public string InputBucketLocation { get; set; } | ||
/// <summary> | ||
/// The name of the Cloud Object Storage input bucket. | ||
/// </summary> | ||
[JsonProperty("input_bucket_name", NullValueHandling = NullValueHandling.Ignore)] | ||
public string InputBucketName { get; set; } | ||
/// <summary> | ||
/// The geographical location of the Cloud Object Storage output bucket as listed on the **Endpoint** tab of | ||
/// your COS instance; for example, `us-geo`, `eu-geo`, or `ap-geo`. | ||
/// </summary> | ||
[JsonProperty("output_bucket_location", NullValueHandling = NullValueHandling.Ignore)] | ||
public string OutputBucketLocation { get; set; } | ||
/// <summary> | ||
/// The name of the Cloud Object Storage output bucket. | ||
/// </summary> | ||
[JsonProperty("output_bucket_name", NullValueHandling = NullValueHandling.Ignore)] | ||
public string OutputBucketName { get; set; } | ||
/// <summary> | ||
/// The unique identifier for the batch request. | ||
/// </summary> | ||
[JsonProperty("batch_id", NullValueHandling = NullValueHandling.Ignore)] | ||
public string BatchId { get; set; } | ||
/// <summary> | ||
/// Document counts. | ||
/// </summary> | ||
[JsonProperty("document_counts", NullValueHandling = NullValueHandling.Ignore)] | ||
public DocCounts DocumentCounts { get; set; } | ||
/// <summary> | ||
/// The status of the batch request. | ||
/// </summary> | ||
[JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Status { get; set; } | ||
/// <summary> | ||
/// The creation time of the batch request. | ||
/// </summary> | ||
[JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] | ||
public DateTime? Created { get; set; } | ||
/// <summary> | ||
/// The time of the most recent update to the batch request. | ||
/// </summary> | ||
[JsonProperty("updated", NullValueHandling = NullValueHandling.Ignore)] | ||
public DateTime? Updated { get; set; } | ||
} | ||
|
||
} |
Oops, something went wrong.