// Path: app/src/main/java/com/philliphsu/clock2/data/ObjectWithId.java
// public abstract class ObjectWithId {
//     private long id;
// 
//     public final long getId() {
//         return id;
//     }
// 
//     public final void setId(long id) {
//         this.id = id;
//     }
// 
//     public final int getIntId() {
//         return (int) id;
//     }
// }
// 
// Path: app/src/main/java/com/philliphsu/clock2/alarms/misc/DaysOfWeek.java
// public static final int NUM_DAYS  = 7;
// 
// Path: app/src/main/java/com/philliphsu/clock2/alarms/misc/DaysOfWeek.java
// public static final int SATURDAY  = 6;
// 
// Path: app/src/main/java/com/philliphsu/clock2/alarms/misc/DaysOfWeek.java
// public static final int SUNDAY    = 0;


import static com.philliphsu.clock2.alarms.misc.DaysOfWeek.NUM_DAYS;
import static com.philliphsu.clock2.alarms.misc.DaysOfWeek.SATURDAY;
import static com.philliphsu.clock2.alarms.misc.DaysOfWeek.SUNDAY;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.auto.value.AutoValue;
import com.philliphsu.clock2.data.ObjectWithId;
import org.json.JSONObject;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.concurrent.TimeUnit;
/*
 * Copyright 2017 Phillip Hsu
 *
 * This file is part of ClockPlus.
 *
 * ClockPlus is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ClockPlus is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ClockPlus.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.philliphsu.clock2.alarms;






/**
 * Created by Phillip Hsu on 5/26/2016.
 */
@AutoValue
public abstract class Alarm extends ObjectWithId implements Parcelable {
    private static final int MAX_MINUTES_CAN_SNOOZE = 30;

    // =================== MUTABLE =======================
    private long snoozingUntilMillis;
    private boolean enabled;
// Path: app/src/main/java/com/philliphsu/clock2/data/ObjectWithId.java
// public abstract class ObjectWithId {
//     private long id;
// 
//     public final long getId() {
//         return id;
//     }
// 
//     public final void setId(long id) {
//         this.id = id;
//     }
// 
//     public final int getIntId() {
//         return (int) id;
//     }
// }
// 
// Path: app/src/main/java/com/philliphsu/clock2/alarms/misc/DaysOfWeek.java
// public static final int NUM_DAYS  = 7;
// 
// Path: app/src/main/java/com/philliphsu/clock2/alarms/misc/DaysOfWeek.java
// public static final int SATURDAY  = 6;
// 
// Path: app/src/main/java/com/philliphsu/clock2/alarms/misc/DaysOfWeek.java
// public static final int SUNDAY    = 0;


// Path: app/src/main/java/com/philliphsu/clock2/alarms/Alarm.java
import static com.philliphsu.clock2.alarms.misc.DaysOfWeek.NUM_DAYS;
import static com.philliphsu.clock2.alarms.misc.DaysOfWeek.SATURDAY;
import static com.philliphsu.clock2.alarms.misc.DaysOfWeek.SUNDAY;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.auto.value.AutoValue;
import com.philliphsu.clock2.data.ObjectWithId;
import org.json.JSONObject;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.concurrent.TimeUnit;

/*
 * Copyright 2017 Phillip Hsu
 *
 * This file is part of ClockPlus.
 *
 * ClockPlus is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ClockPlus is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ClockPlus.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.philliphsu.clock2.alarms;






/**
 * Created by Phillip Hsu on 5/26/2016.
 */
@AutoValue
public abstract class Alarm extends ObjectWithId implements Parcelable {
    private static final int MAX_MINUTES_CAN_SNOOZE = 30;

    // =================== MUTABLE =======================
    private long snoozingUntilMillis;
    private boolean enabled;
    private final boolean[] recurringDays = new boolean[NUM_DAYS];