Skip to content

Commit

Permalink
feat: add javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
athakor committed Jul 24, 2020
1 parent d55826e commit 2bb73fb
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -412,7 +412,7 @@ Rule toPb() {
.setCreatedBefore(
lifecycleCondition.getCreatedBefore() == null
? null
: new DateTime(false, lifecycleCondition.getCreatedBefore().getValue(), 0))
: new DateTime(true, lifecycleCondition.getCreatedBefore().getValue(), 0))
.setIsLive(lifecycleCondition.getIsLive())
.setNumNewerVersions(lifecycleCondition.getNumberOfNewerVersions())
.setMatchesStorageClass(
Expand Down Expand Up @@ -549,10 +549,12 @@ public List<StorageClass> getMatchesStorageClass() {
return matchesStorageClass;
}

/** Returns the custom time before in RFC 3339 format. */
public DateTime getCustomTimeBefore() {
return customTimeBefore;
}

/** Returns the number of days elapsed since the user-specified timestamp set on an object. */
public Integer getDaysSinceCustomTime() {
return daysSinceCustomTime;
}
Expand Down Expand Up @@ -620,11 +622,20 @@ public Builder setMatchesStorageClass(List<StorageClass> matchesStorageClass) {
return this;
}

/**
* Sets the timestamp in RFC 3339 format. This condition is satisfied when the custom time
* on an object is before this timestamp.
*/
public Builder setCustomTimeBefore(DateTime customTimeBefore) {
this.customTimeBefore = customTimeBefore;
return this;
}

/**
* Sets the number of days elapsed since the user-specified timestamp set on an object. The
* condition is satisfied if the days elapsed is at least this number. If no custom
* timestamp is specified on an object, the condition does not apply.
*/
public Builder setDaysSinceCustomTime(Integer daysSinceCustomTime) {
this.daysSinceCustomTime = daysSinceCustomTime;
return this;
Expand Down

0 comments on commit 2bb73fb

Please sign in to comment.