package cz.senslog.connector.model.fieldclimate;

import java.time.LocalDateTime;

import static cz.senslog.connector.tools.json.BasicJson.objectToJson;

public class StationInfo {

    public static class Name {

        private String original;

        public String getOriginal() {
            return original;
        }

        public void setOriginal(String original) {
            this.original = original;
        }
    }

    public static class Dates {
        
        private LocalDateTime min_date;

        public LocalDateTime getMin_date() {
            return min_date;
        }

        public void setMin_date(LocalDateTime min_date) {
            this.min_date = min_date;
        }
    }

    private Name name;

    private Dates dates;

    public Name getName() {
        return name;
    }

    public void setName(Name name) {
        this.name = name;
    }

    public void setDates(Dates dates) {
        this.dates = dates;
    }
    
    public LocalDateTime getMinDate() {
        return dates != null ? dates.min_date : null;
    }

    @Override
    public String toString() {
        return objectToJson(this);
    }
}
