X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pmlog%2Fsrc%2Fmain%2Fjava%2Forg%2Foran%2Fpmlog%2Fconfiguration%2FConsumerJobInfo.java;fp=pmlog%2Fsrc%2Fmain%2Fjava%2Forg%2Foran%2Fpmlog%2Fconfiguration%2FConsumerJobInfo.java;h=be3b23ca4c52c81214d6208daf34b0af227a8403;hb=aceb2efeaf31e7010551027237da4b3ff628dc62;hp=0000000000000000000000000000000000000000;hpb=23d69b4a0fac41be58676c006867332c9fac6071;p=nonrtric.git diff --git a/pmlog/src/main/java/org/oran/pmlog/configuration/ConsumerJobInfo.java b/pmlog/src/main/java/org/oran/pmlog/configuration/ConsumerJobInfo.java new file mode 100644 index 00000000..be3b23ca --- /dev/null +++ b/pmlog/src/main/java/org/oran/pmlog/configuration/ConsumerJobInfo.java @@ -0,0 +1,114 @@ +/*- + * ========================LICENSE_START================================= + * O-RAN-SC + * %% + * Copyright (C) 2023 Nordix Foundation + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================LICENSE_END=================================== + */ + +package org.oran.pmlog.configuration; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import lombok.Builder; +import lombok.Getter; +import lombok.Setter; + +public class ConsumerJobInfo { + + @Getter + public static class PmFilterData { + + public static class MeasTypeSpec { + @Setter + @Getter + @Expose + String measuredObjClass; + + @Getter + @Expose + final Set measTypes = new HashSet<>(); + } + + @Expose + final Set sourceNames = new HashSet<>(); + + @Expose + final Set measObjInstIds = new HashSet<>(); + + @Expose + final Collection measTypeSpecs = new ArrayList<>(); + + @Expose + final Set measuredEntityDns = new HashSet<>(); + } + + @Builder + public static class KafkaDeliveryInfo { + @Getter + @Expose + private String topic; + + @Getter + @Expose + private String bootStrapServers; + } + + @Builder + public static class PmJobParameters { + + public static final String PM_FILTER_TYPE = "pmdata"; + + @Getter + @Builder.Default + @Expose + private String filterType = PM_FILTER_TYPE; + + @Getter + @Expose + private PmFilterData filter; + + @Getter + @Expose + private KafkaDeliveryInfo deliveryInfo; + + } + + @SerializedName("info_type_id") + @Expose + public String infoTypeId = ""; + + @SerializedName("job_owner") + @Expose + public String owner = ""; + + @SerializedName("job_definition") + @Expose + public PmJobParameters jobDefinition; + + public ConsumerJobInfo() {} + + public ConsumerJobInfo(String infoTypeId, PmJobParameters jobData, String owner) { + this.infoTypeId = infoTypeId; + this.jobDefinition = jobData; + this.owner = owner; + } +}