All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sdmxdl.web.MonitorReports Maven / Gradle / Ivy

There is a newer version: 3.0.0-beta.13
Show newest version
package sdmxdl.web;

import lombok.NonNull;
import sdmxdl.HasExpiration;

import java.time.Duration;
import java.time.Instant;
import java.util.List;

@lombok.Value
@lombok.Builder(toBuilder = true)
public class MonitorReports implements HasExpiration {

    @NonNull String uriScheme;

    @lombok.Singular
    @NonNull List reports;

    @lombok.Builder.Default
    @NonNull Instant creationTime = Instant.EPOCH;

    @lombok.Builder.Default
    @NonNull Instant expirationTime = Instant.MAX;

    public static final class Builder {

        public @NonNull Builder ttl(@NonNull Instant creationTime, @NonNull Duration ttl) {
            return creationTime(creationTime).expirationTime(creationTime.plus(ttl));
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy