2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.lametrictime.internal.api.local.dto;
15 import java.time.LocalDateTime;
18 * Pojo for notification.
20 * @author Gregory Moyer - Initial contribution
22 public class Notification {
25 private LocalDateTime created;
26 private LocalDateTime expirationDate;
27 private String priority;
28 private String iconType;
29 private Integer lifetime;
30 private NotificationModel model;
32 public String getId() {
36 public void setId(String id) {
40 public Notification withId(String id) {
45 public String getType() {
49 public void setType(String type) {
53 public Notification withType(String type) {
58 public LocalDateTime getCreated() {
62 public void setCreated(LocalDateTime created) {
63 this.created = created;
66 public Notification withCreated(LocalDateTime created) {
67 this.created = created;
71 public LocalDateTime getExpirationDate() {
72 return expirationDate;
75 public void setExpirationDate(LocalDateTime expirationDate) {
76 this.expirationDate = expirationDate;
79 public Notification withExpirationDate(LocalDateTime expirationDate) {
80 this.expirationDate = expirationDate;
84 public String getPriority() {
88 public void setPriority(String priority) {
89 this.priority = priority;
92 public Notification withPriority(String priority) {
93 this.priority = priority;
97 public String getIconType() {
101 public void setIconType(String iconType) {
102 this.iconType = iconType;
105 public Notification withIconType(String iconType) {
106 this.iconType = iconType;
110 public Integer getLifetime() {
114 public void setLifetime(Integer lifetime) {
115 this.lifetime = lifetime;
118 public Notification withLifetime(Integer lifetime) {
119 this.lifetime = lifetime;
123 public NotificationModel getModel() {
127 public void setModel(NotificationModel model) {
131 public Notification withModel(NotificationModel model) {
137 public String toString() {
138 StringBuilder builder = new StringBuilder();
139 builder.append("Notification [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);
156 return builder.toString();