Skip to content

Commit 05b1f69

Browse files
[concept-insights] Add expires_on and ttl_hours fields to the corpus
object #168
1 parent 6e84e5a commit 05b1f69

File tree

1 file changed

+50
-0
lines changed
  • src/main/java/com/ibm/watson/developer_cloud/concept_insights/v2/model

1 file changed

+50
-0
lines changed

src/main/java/com/ibm/watson/developer_cloud/concept_insights/v2/model/Corpus.java

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,56 @@ public class Corpus extends GenericModel {
4848
/** The corpus name. */
4949
private String name;
5050

51+
@SerializedName("ttl_hours")
52+
private Integer ttlInHours;
53+
// ttl_hours (integer, optional): Specify the TTL for the corpus in hours. This will internally
54+
// set the expiration time after which the corpus will be automatically deleted. ,
55+
// expires_on (string, optional): Date and time in standard ISO format at which the corpus will
56+
// expire and be marked for deletion.
57+
58+
@SerializedName("expires_on")
59+
private String expiresOn;
60+
61+
/**
62+
* Gets the time to live in hours.
63+
*
64+
* @return the time to live in hours
65+
*/
66+
public Integer getTtlInHours() {
67+
return ttlInHours;
68+
}
69+
70+
/**
71+
* Sets the time to live in hours. This will internally set the expiration time after which the
72+
* corpus will be automatically deleted.
73+
*
74+
* @param ttlInHours the new time to live in hours
75+
*/
76+
public void setTtlInHours(Integer ttlInHours) {
77+
this.ttlInHours = ttlInHours;
78+
}
79+
80+
/**
81+
* Gets the expires on.
82+
*
83+
* @return the expires on
84+
*/
85+
public String getExpiresOn() {
86+
return expiresOn;
87+
}
88+
89+
/**
90+
* Sets the expires on. The value needs to be in standard ISO format at which the corpus will
91+
* expire and be marked for deletion.
92+
*
93+
* For example: YYYY-MM-DD (e.g. 2016-07-16)
94+
*
95+
* @param expiresOn the new expires on
96+
*/
97+
public void setExpiresOn(String expiresOn) {
98+
this.expiresOn = expiresOn;
99+
}
100+
51101
/**
52102
* Instantiates a new corpus.
53103
*/

0 commit comments

Comments
 (0)