package com.kbs.kbsintranett;

import com.google.gson.annotations.SerializedName;
import java.util.List;

/**
 * Hjelpeklasser for å parse JSON direkte fra Google Calendar API v3.
 */
public class GoogleCalendarModels {

    public static class Response {
        @SerializedName("items")
        public List<Item> items;
    }

    public static class Item {
        @SerializedName("summary")
        public String summary;

        @SerializedName("description")
        public String description;

        @SerializedName("location")
        public String location;

        @SerializedName("start")
        public TimePoint start;

        @SerializedName("end")
        public TimePoint end;

        @SerializedName("reminders")
        public Reminders reminders;
    }

    public static class TimePoint {
        @SerializedName("dateTime")
        public String dateTime; // Format: 2025-12-15T10:00:00+01:00

        @SerializedName("date")
        public String date; // Format: 2025-12-15 (for heldags)
    }

    public static class Reminders {
        @SerializedName("useDefault")
        public boolean useDefault;

        @SerializedName("overrides")
        public List<Override> overrides;
    }

    public static class Override {
        @SerializedName("method")
        public String method; // f.eks "popup"

        @SerializedName("minutes")
        public int minutes;
    }
}