2 * Copyright 2017-2018 Gregory Moyer and contributors.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openhab.binding.lametrictime.api.local.model;
18 import java.time.LocalDateTime;
20 public class Notification
24 private LocalDateTime created;
25 private LocalDateTime expirationDate;
26 private String priority;
27 private String iconType;
28 private Integer lifetime;
29 private NotificationModel model;
36 public void setId(String id)
41 public Notification withId(String id)
47 public String getType()
52 public void setType(String type)
57 public Notification withType(String type)
63 public LocalDateTime getCreated()
68 public void setCreated(LocalDateTime created)
70 this.created = created;
73 public Notification withCreated(LocalDateTime created)
75 this.created = created;
79 public LocalDateTime getExpirationDate()
81 return expirationDate;
84 public void setExpirationDate(LocalDateTime expirationDate)
86 this.expirationDate = expirationDate;
89 public Notification withExpirationDate(LocalDateTime expirationDate)
91 this.expirationDate = expirationDate;
95 public String getPriority()
100 public void setPriority(String priority)
102 this.priority = priority;
105 public Notification withPriority(String priority)
107 this.priority = priority;
111 public String getIconType()
116 public void setIconType(String iconType)
118 this.iconType = iconType;
121 public Notification withIconType(String iconType)
123 this.iconType = iconType;
127 public Integer getLifetime()
132 public void setLifetime(Integer lifetime)
134 this.lifetime = lifetime;
137 public Notification withLifetime(Integer lifetime)
139 this.lifetime = lifetime;
143 public NotificationModel getModel()
148 public void setModel(NotificationModel model)
153 public Notification withModel(NotificationModel model)
160 public String toString()
162 StringBuilder builder = new StringBuilder();
163 builder.append("Notification [id=");
165 builder.append(", type=");
166 builder.append(type);
167 builder.append(", created=");
168 builder.append(created);
169 builder.append(", expirationDate=");
170 builder.append(expirationDate);
171 builder.append(", priority=");
172 builder.append(priority);
173 builder.append(", iconType=");
174 builder.append(iconType);
175 builder.append(", lifetime=");
176 builder.append(lifetime);
177 builder.append(", model=");
178 builder.append(model);
180 return builder.toString();