2 * ========================LICENSE_START=================================
5 * Copyright (C) 2023 Nordix Foundation
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ========================LICENSE_END===================================
21 package org.oran.pmlog.configuration;
23 import com.google.gson.annotations.Expose;
24 import com.google.gson.annotations.SerializedName;
26 import java.util.ArrayList;
27 import java.util.Collection;
28 import java.util.HashSet;
31 import lombok.Builder;
35 public class ConsumerJobInfo {
38 public static class PmFilterData {
40 public static class MeasTypeSpec {
44 String measuredObjClass;
48 final Set<String> measTypes = new HashSet<>();
52 final Set<String> sourceNames = new HashSet<>();
55 final Set<String> measObjInstIds = new HashSet<>();
58 final Collection<MeasTypeSpec> measTypeSpecs = new ArrayList<>();
61 final Set<String> measuredEntityDns = new HashSet<>();
65 public static class KafkaDeliveryInfo {
72 private String bootStrapServers;
76 public static class PmJobParameters {
78 public static final String PM_FILTER_TYPE = "pmdata";
83 private String filterType = PM_FILTER_TYPE;
87 private PmFilterData filter;
91 private KafkaDeliveryInfo deliveryInfo;
95 @SerializedName("info_type_id")
97 public String infoTypeId = "";
99 @SerializedName("job_owner")
101 public String owner = "";
103 @SerializedName("job_definition")
105 public PmJobParameters jobDefinition;
107 public ConsumerJobInfo() {}
109 public ConsumerJobInfo(String infoTypeId, PmJobParameters jobData, String owner) {
110 this.infoTypeId = infoTypeId;
111 this.jobDefinition = jobData;