]> git.basschouten.com Git - openhab-addons.git/blob
02ab0df0ae23c47575337c1e79ca57e778c3de45
[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.lametrictime.internal.api.local.dto;
14
15 import java.time.LocalDateTime;
16
17 /**
18  * Pojo for notification.
19  *
20  * @author Gregory Moyer - Initial contribution
21  */
22 public class Notification {
23     private String id;
24     private String type;
25     private LocalDateTime created;
26     private LocalDateTime expirationDate;
27     private String priority;
28     private String iconType;
29     private Integer lifetime;
30     private NotificationModel model;
31
32     public String getId() {
33         return id;
34     }
35
36     public void setId(String id) {
37         this.id = id;
38     }
39
40     public Notification withId(String id) {
41         this.id = id;
42         return this;
43     }
44
45     public String getType() {
46         return type;
47     }
48
49     public void setType(String type) {
50         this.type = type;
51     }
52
53     public Notification withType(String type) {
54         this.type = type;
55         return this;
56     }
57
58     public LocalDateTime getCreated() {
59         return created;
60     }
61
62     public void setCreated(LocalDateTime created) {
63         this.created = created;
64     }
65
66     public Notification withCreated(LocalDateTime created) {
67         this.created = created;
68         return this;
69     }
70
71     public LocalDateTime getExpirationDate() {
72         return expirationDate;
73     }
74
75     public void setExpirationDate(LocalDateTime expirationDate) {
76         this.expirationDate = expirationDate;
77     }
78
79     public Notification withExpirationDate(LocalDateTime expirationDate) {
80         this.expirationDate = expirationDate;
81         return this;
82     }
83
84     public String getPriority() {
85         return priority;
86     }
87
88     public void setPriority(String priority) {
89         this.priority = priority;
90     }
91
92     public Notification withPriority(String priority) {
93         this.priority = priority;
94         return this;
95     }
96
97     public String getIconType() {
98         return iconType;
99     }
100
101     public void setIconType(String iconType) {
102         this.iconType = iconType;
103     }
104
105     public Notification withIconType(String iconType) {
106         this.iconType = iconType;
107         return this;
108     }
109
110     public Integer getLifetime() {
111         return lifetime;
112     }
113
114     public void setLifetime(Integer lifetime) {
115         this.lifetime = lifetime;
116     }
117
118     public Notification withLifetime(Integer lifetime) {
119         this.lifetime = lifetime;
120         return this;
121     }
122
123     public NotificationModel getModel() {
124         return model;
125     }
126
127     public void setModel(NotificationModel model) {
128         this.model = model;
129     }
130
131     public Notification withModel(NotificationModel model) {
132         this.model = model;
133         return this;
134     }
135
136     @Override
137     public String toString() {
138         StringBuilder builder = new StringBuilder();
139         builder.append("Notification [id=");
140         builder.append(id);
141         builder.append(", type=");
142         builder.append(type);
143         builder.append(", created=");
144         builder.append(created);
145         builder.append(", expirationDate=");
146         builder.append(expirationDate);
147         builder.append(", priority=");
148         builder.append(priority);
149         builder.append(", iconType=");
150         builder.append(iconType);
151         builder.append(", lifetime=");
152         builder.append(lifetime);
153         builder.append(", model=");
154         builder.append(model);
155         builder.append("]");
156         return builder.toString();
157     }
158 }