Skip to content

Commit

Permalink
feat: add javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
athakor committed Jun 26, 2020
1 parent 719b55c commit 62f6974
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -407,7 +407,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 @@ -544,10 +544,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 @@ -615,11 +617,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 62f6974

Please sign in to comment.