package cz.senslog.connector.fetch.senslog.telemetry;

import cz.senslog.connector.model.api.ProxySessionModel;

import java.time.OffsetDateTime;

public class SensLogTelemetrySession {

    private final EventInfo eventInfo;
    private OffsetDateTime fromTime, toTime;
    private int offset;
    private boolean hasNext;

    public SensLogTelemetrySession(EventInfo eventInfo, OffsetDateTime fromTime, int interval) {
        this.eventInfo = eventInfo;
        this.offset = 0;
        this.hasNext = false;
        this.fromTime = fromTime;
        this.toTime = fromTime.plusHours(interval);
    }

    public EventInfo getEventInfo() {
        return eventInfo;
    }

    public int getOffset() {
        return offset;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public boolean hasNext() {
        return hasNext;
    }

    public boolean hasNotNext() {
        return !hasNext;
    }

    public void hasNext(boolean hasNext) {
        this.hasNext = hasNext;
    }

    public OffsetDateTime getFromTime() {
        return fromTime;
    }

    public void setFromTime(OffsetDateTime fromTime) {
        this.fromTime = fromTime;
    }

    public OffsetDateTime getToTime() {
        return toTime;
    }

    public void setToTime(OffsetDateTime toTime) {
        this.toTime = toTime;
    }
}
