2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2019 Nordix Foundation.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.dcaegen2.collectors.datafile.model;
23 import java.util.List;
25 import lombok.Builder;
28 public class FileReadyMessage {
31 * Meta data about a fileReady message.
34 public static class MessageMetaData {
36 public String eventId;
38 public String priority;
39 public String version;
40 public String reportingEntityName;
44 public String eventName;
45 public String vesEventListenerVersion;
47 public String sourceName;
49 public long lastEpochMicrosec;
50 public long startEpochMicrosec;
52 public String timeZoneOffset;
54 public String changeIdentifier;
57 * Gets data from the event name. Defined as:
58 * {DomainAbbreviation}_{productName}-{vendorName}_{Description},
59 * example: Noti_RnNode-Ericsson_FileReady
62 public String productName() {
63 String[] eventArray = eventName.split("_|-");
64 if (eventArray.length >= 2) {
71 public String vendorName() {
72 String[] eventArray = eventName.split("_|-");
73 if (eventArray.length >= 3) {
82 public static class FileInfo {
83 public String fileFormatType;
84 public String location;
85 public String fileFormatVersion;
86 public String compression;
90 public static class ArrayOfNamedHashMap {
92 public FileInfo hashMap;
96 public static class NotificationFields {
97 public String notificationFieldsVersion;
98 public String changeType;
99 public String changeIdentifier;
100 public List<ArrayOfNamedHashMap> arrayOfNamedHashMap;
104 public static class Event {
105 public MessageMetaData commonEventHeader;
106 public NotificationFields notificationFields;