Skip to content

Commit b72aa8f

Browse files
committed
feat(Compare and Comply): Add ContractTerms, ContractTypes, Interpretation, and PaymentTerms models
1 parent f16dfd9 commit b72aa8f

4 files changed

Lines changed: 383 additions & 0 deletions

File tree

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.compare_comply.v1.model;
14+
15+
import java.util.List;
16+
17+
import com.google.gson.annotations.SerializedName;
18+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
19+
20+
/**
21+
* The duration or durations of the contract.
22+
*/
23+
public class ContractTerms extends GenericModel {
24+
25+
/**
26+
* The confidence level in the identification of the contract term.
27+
*/
28+
public interface ConfidenceLevel {
29+
/** High. */
30+
String HIGH = "High";
31+
/** Medium. */
32+
String MEDIUM = "Medium";
33+
/** Low. */
34+
String LOW = "Low";
35+
}
36+
37+
@SerializedName("confidence_level")
38+
private String confidenceLevel;
39+
private String text;
40+
@SerializedName("text_normalized")
41+
private String textNormalized;
42+
private Interpretation interpretation;
43+
@SerializedName("provenance_ids")
44+
private List<String> provenanceIds;
45+
private Location location;
46+
47+
/**
48+
* Gets the confidenceLevel.
49+
*
50+
* The confidence level in the identification of the contract term.
51+
*
52+
* @return the confidenceLevel
53+
*/
54+
public String getConfidenceLevel() {
55+
return confidenceLevel;
56+
}
57+
58+
/**
59+
* Gets the text.
60+
*
61+
* The contract term (duration).
62+
*
63+
* @return the text
64+
*/
65+
public String getText() {
66+
return text;
67+
}
68+
69+
/**
70+
* Gets the textNormalized.
71+
*
72+
* The normalized form of the contract term, which is listed as a string. This element is optional; that is, the
73+
* service output lists it only if normalized text exists.
74+
*
75+
* @return the textNormalized
76+
*/
77+
public String getTextNormalized() {
78+
return textNormalized;
79+
}
80+
81+
/**
82+
* Gets the interpretation.
83+
*
84+
* The details of the normalized text, if applicable. This element is optional; that is, the service output lists it
85+
* only if normalized text exists.
86+
*
87+
* @return the interpretation
88+
*/
89+
public Interpretation getInterpretation() {
90+
return interpretation;
91+
}
92+
93+
/**
94+
* Gets the provenanceIds.
95+
*
96+
* One or more hash values that you can send to IBM to provide feedback or receive support.
97+
*
98+
* @return the provenanceIds
99+
*/
100+
public List<String> getProvenanceIds() {
101+
return provenanceIds;
102+
}
103+
104+
/**
105+
* Gets the location.
106+
*
107+
* The numeric location of the identified element in the document, represented with two integers labeled `begin` and
108+
* `end`.
109+
*
110+
* @return the location
111+
*/
112+
public Location getLocation() {
113+
return location;
114+
}
115+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.compare_comply.v1.model;
14+
15+
import java.util.List;
16+
17+
import com.google.gson.annotations.SerializedName;
18+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
19+
20+
/**
21+
* The contract type identified in the input document.
22+
*/
23+
public class ContractTypes extends GenericModel {
24+
25+
/**
26+
* The confidence level in the identification of the contract type.
27+
*/
28+
public interface ConfidenceLevel {
29+
/** High. */
30+
String HIGH = "High";
31+
/** Medium. */
32+
String MEDIUM = "Medium";
33+
/** Low. */
34+
String LOW = "Low";
35+
}
36+
37+
@SerializedName("confidence_level")
38+
private String confidenceLevel;
39+
private String text;
40+
@SerializedName("provenance_ids")
41+
private List<String> provenanceIds;
42+
private Location location;
43+
44+
/**
45+
* Gets the confidenceLevel.
46+
*
47+
* The confidence level in the identification of the contract type.
48+
*
49+
* @return the confidenceLevel
50+
*/
51+
public String getConfidenceLevel() {
52+
return confidenceLevel;
53+
}
54+
55+
/**
56+
* Gets the text.
57+
*
58+
* The contract type.
59+
*
60+
* @return the text
61+
*/
62+
public String getText() {
63+
return text;
64+
}
65+
66+
/**
67+
* Gets the provenanceIds.
68+
*
69+
* One or more hash values that you can send to IBM to provide feedback or receive support.
70+
*
71+
* @return the provenanceIds
72+
*/
73+
public List<String> getProvenanceIds() {
74+
return provenanceIds;
75+
}
76+
77+
/**
78+
* Gets the location.
79+
*
80+
* The numeric location of the identified element in the document, represented with two integers labeled `begin` and
81+
* `end`.
82+
*
83+
* @return the location
84+
*/
85+
public Location getLocation() {
86+
return location;
87+
}
88+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.compare_comply.v1.model;
14+
15+
import com.google.gson.annotations.SerializedName;
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
18+
/**
19+
* The details of the normalized text, if applicable. This element is optional; that is, the service output lists it
20+
* only if normalized text exists.
21+
*/
22+
public class Interpretation extends GenericModel {
23+
24+
private String value;
25+
@SerializedName("numeric_value")
26+
private Double numericValue;
27+
private String unit;
28+
29+
/**
30+
* Gets the value.
31+
*
32+
* The value that was located in the normalized text.
33+
*
34+
* @return the value
35+
*/
36+
public String getValue() {
37+
return value;
38+
}
39+
40+
/**
41+
* Gets the numericValue.
42+
*
43+
* An integer or float expressing the numeric value of the `value` key.
44+
*
45+
* @return the numericValue
46+
*/
47+
public Double getNumericValue() {
48+
return numericValue;
49+
}
50+
51+
/**
52+
* Gets the unit.
53+
*
54+
* A string listing the unit of the value that was found in the normalized text.
55+
*
56+
* **Note:** The value of `unit` is the [ISO-4217 currency code](https://www.iso.org/iso-4217-currency-codes.html)
57+
* identified for the currency amount (for example, `USD` or `EUR`). If the service cannot disambiguate a currency
58+
* symbol (for example, `$` or `£`), the value of `unit` contains the ambiguous symbol as-is.
59+
*
60+
* @return the unit
61+
*/
62+
public String getUnit() {
63+
return unit;
64+
}
65+
}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.compare_comply.v1.model;
14+
15+
import java.util.List;
16+
17+
import com.google.gson.annotations.SerializedName;
18+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
19+
20+
/**
21+
* The document's payment duration or durations.
22+
*/
23+
public class PaymentTerms extends GenericModel {
24+
25+
/**
26+
* The confidence level in the identification of the payment term.
27+
*/
28+
public interface ConfidenceLevel {
29+
/** High. */
30+
String HIGH = "High";
31+
/** Medium. */
32+
String MEDIUM = "Medium";
33+
/** Low. */
34+
String LOW = "Low";
35+
}
36+
37+
@SerializedName("confidence_level")
38+
private String confidenceLevel;
39+
private String text;
40+
@SerializedName("text_normalized")
41+
private String textNormalized;
42+
private Interpretation interpretation;
43+
@SerializedName("provenance_ids")
44+
private List<String> provenanceIds;
45+
private Location location;
46+
47+
/**
48+
* Gets the confidenceLevel.
49+
*
50+
* The confidence level in the identification of the payment term.
51+
*
52+
* @return the confidenceLevel
53+
*/
54+
public String getConfidenceLevel() {
55+
return confidenceLevel;
56+
}
57+
58+
/**
59+
* Gets the text.
60+
*
61+
* The payment term (duration).
62+
*
63+
* @return the text
64+
*/
65+
public String getText() {
66+
return text;
67+
}
68+
69+
/**
70+
* Gets the textNormalized.
71+
*
72+
* The normalized form of the payment term, which is listed as a string. This element is optional; that is, the
73+
* service output lists it only if normalized text exists.
74+
*
75+
* @return the textNormalized
76+
*/
77+
public String getTextNormalized() {
78+
return textNormalized;
79+
}
80+
81+
/**
82+
* Gets the interpretation.
83+
*
84+
* The details of the normalized text, if applicable. This element is optional; that is, the service output lists it
85+
* only if normalized text exists.
86+
*
87+
* @return the interpretation
88+
*/
89+
public Interpretation getInterpretation() {
90+
return interpretation;
91+
}
92+
93+
/**
94+
* Gets the provenanceIds.
95+
*
96+
* One or more hash values that you can send to IBM to provide feedback or receive support.
97+
*
98+
* @return the provenanceIds
99+
*/
100+
public List<String> getProvenanceIds() {
101+
return provenanceIds;
102+
}
103+
104+
/**
105+
* Gets the location.
106+
*
107+
* The numeric location of the identified element in the document, represented with two integers labeled `begin` and
108+
* `end`.
109+
*
110+
* @return the location
111+
*/
112+
public Location getLocation() {
113+
return location;
114+
}
115+
}

0 commit comments

Comments
 (0)