Skip to content

Commit 6c5f3fd

Browse files
committed
feat(Compare and Comply): Generated Compare and Comply and wrote tests
1 parent 95989e2 commit 6c5f3fd

File tree

120 files changed

+5103
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+5103
-0
lines changed

Examples/ServiceExamples/TestData/compare-comply.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

Examples/ServiceExamples/TestData/compare-comply/TestTable.pdf.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

Examples/ServiceExamples/TestData/compare-comply/contract_A.pdf.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

Examples/ServiceExamples/TestData/compare-comply/contract_B.pdf.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/Services/CompareComply.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/Services/CompareComply/v1.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/Services/CompareComply/v1/CompareComply.cs

Lines changed: 1476 additions & 0 deletions
Large diffs are not rendered by default.

Scripts/Services/CompareComply/v1/CompareComply.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/Services/CompareComply/v1/Models.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
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 FullSerializer;
19+
20+
namespace IBM.Watson.DeveloperCloud.Services.CompareComply.v1
21+
{
22+
/// <summary>
23+
/// A party's address.
24+
/// </summary>
25+
[fsObject]
26+
public class Address
27+
{
28+
/// <summary>
29+
/// A string listing the address.
30+
/// </summary>
31+
[fsProperty("text")]
32+
public string Text { get; set; }
33+
/// <summary>
34+
/// The numeric location of the identified element in the document, represented with two integers labeled
35+
/// `begin` and `end`.
36+
/// </summary>
37+
[fsProperty("location")]
38+
public Location Location { get; set; }
39+
}
40+
41+
}

Scripts/Services/CompareComply/v1/Models/Address.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
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 FullSerializer;
19+
using System.Collections.Generic;
20+
21+
namespace IBM.Watson.DeveloperCloud.Services.CompareComply.v1
22+
{
23+
/// <summary>
24+
/// AlignedElement
25+
/// </summary>
26+
[fsObject]
27+
public class AlignedElement
28+
{
29+
/// <summary>
30+
/// Identifies two elements that semantically align between the compared documents.
31+
/// </summary>
32+
[fsProperty("element_pair")]
33+
public List<ElementPair> ElementPair { get; set; }
34+
/// <summary>
35+
/// Specifies whether the text is identical.
36+
/// </summary>
37+
[fsProperty("identical_text")]
38+
public bool? IdenticalText { get; set; }
39+
/// <summary>
40+
/// One or more hashed values that you can send to IBM to provide feedback or receive support.
41+
/// </summary>
42+
[fsProperty("provenance_ids")]
43+
public List<string> ProvenanceIds { get; set; }
44+
}
45+
46+
}

Scripts/Services/CompareComply/v1/Models/AlignedElement.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
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 FullSerializer;
19+
using System.Runtime.Serialization;
20+
21+
namespace IBM.Watson.DeveloperCloud.Services.CompareComply.v1
22+
{
23+
/// <summary>
24+
/// List of document attributes.
25+
/// </summary>
26+
[fsObject]
27+
public class Attribute
28+
{
29+
/// <summary>
30+
/// The type of attribute. Possible values are `Currency`, `DateTime`, and `Location`.
31+
/// </summary>
32+
public enum Type
33+
{
34+
/// <summary>
35+
/// Enum currency for Currency
36+
/// </summary>
37+
[EnumMember(Value = "Currency")]
38+
Currency,
39+
/// <summary>
40+
/// Enum dateTime for DateTime
41+
/// </summary>
42+
[EnumMember(Value = "DateTime")]
43+
DateTime,
44+
/// <summary>
45+
/// Enum location for Location
46+
/// </summary>
47+
[EnumMember(Value = "Location")]
48+
Location
49+
}
50+
51+
/// <summary>
52+
/// The type of attribute. Possible values are `Currency`, `DateTime`, and `Location`.
53+
/// </summary>
54+
[fsProperty("type")]
55+
public Type? _Type { get; set; }
56+
/// <summary>
57+
/// The text associated with the attribute.
58+
/// </summary>
59+
[fsProperty("text")]
60+
public string Text { get; set; }
61+
/// <summary>
62+
/// The numeric location of the identified element in the document, represented with two integers labeled
63+
/// `begin` and `end`.
64+
/// </summary>
65+
[fsProperty("location")]
66+
public Location Location { get; set; }
67+
}
68+
69+
}

Scripts/Services/CompareComply/v1/Models/Attribute.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
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 FullSerializer;
19+
using System;
20+
using System.Runtime.Serialization;
21+
22+
namespace IBM.Watson.DeveloperCloud.Services.CompareComply.v1
23+
{
24+
/// <summary>
25+
/// The batch-request status.
26+
/// </summary>
27+
[fsObject]
28+
public class BatchStatus
29+
{
30+
/// <summary>
31+
/// The method to be run against the documents. Possible values are `html_conversion`, `element_classification`,
32+
/// and `tables`.
33+
/// </summary>
34+
public enum Function
35+
{
36+
/// <summary>
37+
/// Enum elementClassification for element_classification
38+
/// </summary>
39+
[EnumMember(Value = "element_classification")]
40+
element_classification,
41+
/// <summary>
42+
/// Enum htmlConversion for html_conversion
43+
/// </summary>
44+
[EnumMember(Value = "html_conversion")]
45+
html_conversion,
46+
/// <summary>
47+
/// Enum tables for tables
48+
/// </summary>
49+
[EnumMember(Value = "tables")]
50+
tables
51+
}
52+
53+
/// <summary>
54+
/// The method to be run against the documents. Possible values are `html_conversion`, `element_classification`,
55+
/// and `tables`.
56+
/// </summary>
57+
[fsProperty("function")]
58+
public Function? _Function { get; set; }
59+
/// <summary>
60+
/// The geographical location of the Cloud Object Storage input bucket as listed on the **Endpoint** tab of your
61+
/// COS instance; for example, `us-geo`, `eu-geo`, or `ap-geo`.
62+
/// </summary>
63+
[fsProperty("input_bucket_location")]
64+
public string InputBucketLocation { get; set; }
65+
/// <summary>
66+
/// The name of the Cloud Object Storage input bucket.
67+
/// </summary>
68+
[fsProperty("input_bucket_name")]
69+
public string InputBucketName { get; set; }
70+
/// <summary>
71+
/// The geographical location of the Cloud Object Storage output bucket as listed on the **Endpoint** tab of
72+
/// your COS instance; for example, `us-geo`, `eu-geo`, or `ap-geo`.
73+
/// </summary>
74+
[fsProperty("output_bucket_location")]
75+
public string OutputBucketLocation { get; set; }
76+
/// <summary>
77+
/// The name of the Cloud Object Storage output bucket.
78+
/// </summary>
79+
[fsProperty("output_bucket_name")]
80+
public string OutputBucketName { get; set; }
81+
/// <summary>
82+
/// The unique identifier for the batch request.
83+
/// </summary>
84+
[fsProperty("batch_id")]
85+
public string BatchId { get; set; }
86+
/// <summary>
87+
/// Document counts.
88+
/// </summary>
89+
[fsProperty("document_counts")]
90+
public DocCounts DocumentCounts { get; set; }
91+
/// <summary>
92+
/// The status of the batch request.
93+
/// </summary>
94+
[fsProperty("status")]
95+
public string Status { get; set; }
96+
/// <summary>
97+
/// The creation time of the batch request.
98+
/// </summary>
99+
[fsProperty("created")]
100+
public DateTime? Created { get; set; }
101+
/// <summary>
102+
/// The time of the most recent update to the batch request.
103+
/// </summary>
104+
[fsProperty("updated")]
105+
public DateTime? Updated { get; set; }
106+
}
107+
108+
}

Scripts/Services/CompareComply/v1/Models/BatchStatus.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)