![JAR search and dependency download from the Maven repository](/logo.png)
sdmxdl.web.SdmxWebMonitorReports Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdmx-dl-api Show documentation
Show all versions of sdmx-dl-api Show documentation
Easily download official statistics - API
package sdmxdl.web;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.time.Clock;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
@lombok.Value
@lombok.Builder(toBuilder = true)
public class SdmxWebMonitorReports {
@lombok.NonNull
String uriScheme;
@lombok.Singular
List reports;
@lombok.NonNull
@lombok.Builder.Default
Instant creationTime = Instant.EPOCH;
@lombok.NonNull
@lombok.Builder.Default
Instant expirationTime = Instant.MAX;
public boolean isExpired(@NonNull Clock clock) {
return !clock.instant().isBefore(expirationTime);
}
public static final class Builder {
public Builder ttl(Instant creationTime, Duration ttl) {
return creationTime(creationTime).expirationTime(creationTime.plus(ttl));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy