Format Java code with respect to ONAP Code Style
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / hub / model / Event.java
1 /**
2  * Copyright (c) 2018 Orange
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5  * the License. You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11  * specific language governing permissions and limitations under the License.
12  */
13
14 package org.onap.nbi.apis.hub.model;
15
16 import com.fasterxml.jackson.annotation.JsonFormat;
17 import com.fasterxml.jackson.databind.JsonNode;
18 import java.util.Date;
19 import javax.validation.constraints.NotNull;
20
21 public class Event {
22
23     private java.lang.String eventId;
24     private Date eventDate;
25
26     @NotNull
27     private String eventType;
28
29     @NotNull
30     private JsonNode event;
31
32     public String getEventId() {
33         return eventId;
34     }
35
36     public void setEventId(String eventId) {
37         this.eventId = eventId;
38     }
39
40     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
41     public Date getEventDate() {
42         return eventDate;
43     }
44
45     public void setEventDate(Date eventDate) {
46         this.eventDate = eventDate;
47     }
48
49     public JsonNode getEvent() {
50         return event;
51     }
52
53     public void setEvent(JsonNode event) {
54         this.event = event;
55     }
56
57     public String getEventType() {
58         return eventType;
59     }
60
61     public void setEventType(String eventType) {
62         this.eventType = eventType;
63     }
64 }