]> git.basschouten.com Git - openhab-addons.git/blob
4f3d95b39ba87868c9ebe1b65a94842ea3ed9f7c
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.surepetcare.internal.dto;
14
15 import java.time.LocalTime;
16
17 /**
18  * The {@link SurePetcareDeviceCurfew} class is used to serialize a curfew.
19  *
20  * @author Rene Scherer - Initial contribution
21  */
22 public class SurePetcareDeviceCurfew {
23
24     public boolean enabled;
25     public LocalTime lockTime;
26     public LocalTime unlockTime;
27
28     public SurePetcareDeviceCurfew() {
29         this.enabled = false;
30         this.lockTime = LocalTime.MIDNIGHT;
31         this.unlockTime = LocalTime.MIDNIGHT;
32     }
33
34     public SurePetcareDeviceCurfew(boolean enabled, LocalTime lockTime, LocalTime unlockTime) {
35         this.enabled = enabled;
36         this.lockTime = lockTime;
37         this.unlockTime = unlockTime;
38     }
39
40     @Override
41     public String toString() {
42         return enabled + "," + lockTime + "," + unlockTime;
43     }
44 }