From 71d96765bae165684a7616af8fbad361d92aa5e1 Mon Sep 17 00:00:00 2001 From: Katopodisv Date: Tue, 8 Nov 2022 15:25:17 +0200 Subject: [PATCH 1/5] refactor(policy): add monitoring proto changes --- .../eu/teraflow/policy/PolicyServiceImpl.java | 15 +- .../java/eu/teraflow/policy/Serializer.java | 77 +- .../policy/monitoring/MonitoringGateway.java | 5 +- .../monitoring/MonitoringGatewayImpl.java | 7 +- .../policy/monitoring/MonitoringService.java | 5 +- .../monitoring/MonitoringServiceImpl.java | 5 +- .../monitoring/model/AlarmDescriptor.java | 27 +- .../monitoring/model/AlarmResponse.java | 23 +- .../policy/monitoring/model/SubsResponse.java | 46 + .../eu/teraflow/policy/SerializerTest.java | 44 +- .../grpc/monitoring/Monitoring.java | 3472 ++++++----------- .../grpc/monitoring/MonitoringService.java | 8 +- .../monitoring/MonitoringServiceBean.java | 8 +- .../monitoring/MonitoringServiceClient.java | 8 +- .../monitoring/MonitoringServiceGrpc.java | 94 +- .../MutinyMonitoringServiceGrpc.java | 32 +- 16 files changed, 1529 insertions(+), 2347 deletions(-) create mode 100644 src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsResponse.java diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java index 62c39cde6..19e2d3abe 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java @@ -672,13 +672,14 @@ public class PolicyServiceImpl implements PolicyService { var kpiValueRange = convertPolicyRuleConditionToAlarmDescriptor(policyRuleCondition); var kpiValueRangeList = Arrays.asList(kpiValueRange); + // TODO: Temp fix for AlarmDescriptor object AlarmDescriptor alarmDescriptor = new AlarmDescriptor( "alarmId-" + gen(), "alarmDescription", "alarmName-" + gen(), - kpiIdList, - kpiValueRangeList, + kpiIdList.get(0), + kpiValueRangeList.get(0), getTimeStamp()); alarmDescriptorList.add(alarmDescriptor); @@ -722,12 +723,13 @@ public class PolicyServiceImpl implements PolicyService { kpiValueRangeList.add(convertPolicyRuleConditionToAlarmDescriptor(policyRuleCondition)); } + // TODO: Temp fix for AlarmDescriptor object return new AlarmDescriptor( "alarmId-" + gen(), "alarmDescription", "alarmName-" + gen(), - kpiIdList, - kpiValueRangeList, + kpiIdList.get(0), + kpiValueRangeList.get(0), getTimeStamp()); } @@ -800,12 +802,13 @@ public class PolicyServiceImpl implements PolicyService { kpiIdList.addAll(KpiValueRangeMap.keySet()); List kpiValueRangeList = new ArrayList<>(KpiValueRangeMap.values()); + // TODO: Temp fix for AlarmDescriptor object return new AlarmDescriptor( "alarmId-" + gen(), "alarmDescription", "alarmName-" + gen(), - kpiIdList, - kpiValueRangeList, + kpiIdList.get(0), + kpiValueRangeList.get(0), getTimeStamp()); } diff --git a/src/policy/src/main/java/eu/teraflow/policy/Serializer.java b/src/policy/src/main/java/eu/teraflow/policy/Serializer.java index 8f118a625..8ebbdc1a2 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/Serializer.java +++ b/src/policy/src/main/java/eu/teraflow/policy/Serializer.java @@ -90,6 +90,7 @@ import eu.teraflow.policy.monitoring.model.KpiValueRange; import eu.teraflow.policy.monitoring.model.LongKpiValue; import eu.teraflow.policy.monitoring.model.StringKpiValue; import eu.teraflow.policy.monitoring.model.SubsDescriptor; +import eu.teraflow.policy.monitoring.model.SubsResponse; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -1591,22 +1592,20 @@ public class Serializer { final var alarmId = alarmDescriptor.getAlarmId(); final var alarmDescription = alarmDescriptor.getAlarmDescription(); final var name = alarmDescriptor.getName(); - final var kpiIds = alarmDescriptor.getKpiIds(); - final var kpiValueRanges = alarmDescriptor.getKpiValueRanges(); + final var kpiId = alarmDescriptor.getKpiId(); + final var kpiValueRange = alarmDescriptor.getKpiValueRange(); final var timestamp = alarmDescriptor.getTimestamp(); final var serializedAlarmId = serializeAlarmId(alarmId); - final var serializedKpiIds = - kpiIds.stream().map(this::serializeKpiId).collect(Collectors.toList()); - final var serializedKpiValueRanges = - kpiValueRanges.stream().map(this::serialize).collect(Collectors.toList()); + final var serializedKpiId = serializeKpiId(kpiId); + final var serializedKpiValueRange = serialize(kpiValueRange); final var serializedTimestamp = serialize(timestamp); builder.setAlarmId(serializedAlarmId); builder.setAlarmDescription(alarmDescription); builder.setName(name); - builder.addAllKpiId(serializedKpiIds); - builder.addAllKpiValueRange(serializedKpiValueRanges); + builder.setKpiId(serializedKpiId); + builder.setKpiValueRange(serializedKpiValueRange); builder.setTimestamp(serializedTimestamp); return builder.build(); @@ -1617,48 +1616,74 @@ public class Serializer { final var serializedAlarmId = serializedAlarmDescriptor.getAlarmId(); final var alarmDescription = serializedAlarmDescriptor.getAlarmDescription(); final var name = serializedAlarmDescriptor.getName(); - final var serializedKpiIds = serializedAlarmDescriptor.getKpiIdList(); - final var serializedKpiValueRanges = serializedAlarmDescriptor.getKpiValueRangeList(); + final var serializedKpiId = serializedAlarmDescriptor.getKpiId(); + final var serializedKpiValueRange = serializedAlarmDescriptor.getKpiValueRange(); final var serializeTimestamp = serializedAlarmDescriptor.getTimestamp(); final var alarmId = deserialize(serializedAlarmId); - final var kpiIds = - serializedKpiIds.stream().map(this::deserialize).collect(Collectors.toList()); - final var kpiValueRanges = - serializedKpiValueRanges.stream().map(this::deserialize).collect(Collectors.toList()); + final var kpiId = deserialize(serializedKpiId); + final var kpiValueRange = deserialize(serializedKpiValueRange); final var timestamp = deserialize(serializeTimestamp); - return new AlarmDescriptor(alarmId, alarmDescription, name, kpiIds, kpiValueRanges, timestamp); + return new AlarmDescriptor(alarmId, alarmDescription, name, kpiId, kpiValueRange, timestamp); } public Monitoring.AlarmResponse serialize(AlarmResponse alarmResponse) { final var builder = Monitoring.AlarmResponse.newBuilder(); final var alarmId = alarmResponse.getAlarmId(); - final var text = alarmResponse.getText(); - final var kpiValue = alarmResponse.getKpiValue(); + final var kpiList = alarmResponse.getKpiList(); final var serializedAlarmIdUuid = serializeUuid(alarmId); final var serializedAlarmId = Monitoring.AlarmID.newBuilder().setAlarmId(serializedAlarmIdUuid).build(); - final var serializedKpiValue = serialize(kpiValue); + final var serializedKpis = kpiList.stream().map(this::serialize).collect(Collectors.toList()); + final var serializedKpisList = Monitoring.KpiList.newBuilder().addAllKpi(serializedKpis); builder.setAlarmId(serializedAlarmId); - builder.setText(text); - builder.setKpiValue(serializedKpiValue); + builder.setKpiList(serializedKpisList); + + return builder.build(); + } + + public Monitoring.SubsResponse serialize(SubsResponse subsResponse) { + final var builder = Monitoring.SubsResponse.newBuilder(); + + final var subscriptionId = subsResponse.getSubscriptionId(); + final var kpiList = subsResponse.getKpiList(); + + final var serializedSubscriptionIdUuid = serializeSubscriptionIdId(subscriptionId); + final var serializedKpis = kpiList.stream().map(this::serialize).collect(Collectors.toList()); + final var serializedKpisList = Monitoring.KpiList.newBuilder().addAllKpi(serializedKpis); + + builder.setSubsId(serializedSubscriptionIdUuid); + builder.setKpiList(serializedKpisList); return builder.build(); } public AlarmResponse deserialize(Monitoring.AlarmResponse serializedAlarmResponse) { final var serializedAlarmId = serializedAlarmResponse.getAlarmId().getAlarmId(); - final var text = serializedAlarmResponse.getText(); - final var serializedKpiValue = serializedAlarmResponse.getKpiValue(); + final var serializedKpiList = serializedAlarmResponse.getKpiList(); + final var listSerializedKpis = serializedKpiList.getKpiList(); final var alarmId = deserialize(serializedAlarmId); - final var kpiValue = deserialize(serializedKpiValue); + final var kpisList = + listSerializedKpis.stream().map(this::deserialize).collect(Collectors.toList()); - return new AlarmResponse(alarmId, text, kpiValue); + return new AlarmResponse(alarmId, kpisList); + } + + public SubsResponse deserialize(Monitoring.SubsResponse serializedSubsResponse) { + final var serializedSubsId = serializedSubsResponse.getSubsId(); + final var serializedKpiList = serializedSubsResponse.getKpiList(); + final var listSerializedKpis = serializedKpiList.getKpiList(); + + final var subsId = deserialize(serializedSubsId); + final var kpiList = + listSerializedKpis.stream().map(this::deserialize).collect(Collectors.toList()); + + return new SubsResponse(subsId, kpiList); } public Monitoring.SubsDescriptor serialize(SubsDescriptor subDescriptor) { @@ -2269,7 +2294,7 @@ public class Serializer { final var serializedAlarmId = serializeAlarmId(alarmId); - builder.setAlarmID(serializedAlarmId); + builder.setAlarmId(serializedAlarmId); builder.setSubscriptionTimeoutS(subscriptionTimeoutS); builder.setSubscriptionFrequencyMs(subscriptionFrequencyMs); @@ -2278,7 +2303,7 @@ public class Serializer { public AlarmSubscription deserialize(Monitoring.AlarmSubscription serializedAlarmSubscription) { - final var serializedAlarmId = serializedAlarmSubscription.getAlarmID(); + final var serializedAlarmId = serializedAlarmSubscription.getAlarmId(); final var subscriptionTimeoutS = serializedAlarmSubscription.getSubscriptionTimeoutS(); final var subscriptionFrequencyMs = serializedAlarmSubscription.getSubscriptionFrequencyMs(); diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java index 48b976d8d..4a1bf0ff4 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java @@ -20,12 +20,11 @@ import eu.teraflow.policy.context.model.Empty; import eu.teraflow.policy.monitoring.model.AlarmDescriptor; import eu.teraflow.policy.monitoring.model.AlarmResponse; import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.Kpi; import eu.teraflow.policy.monitoring.model.KpiDescriptor; import eu.teraflow.policy.monitoring.model.SubsDescriptor; +import eu.teraflow.policy.monitoring.model.SubsResponse; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; -import java.util.List; public interface MonitoringGateway { @@ -33,7 +32,7 @@ public interface MonitoringGateway { Uni getKpiDescriptor(String kpiId); - Multi> setKpiSubscription(SubsDescriptor subsDescriptor); + Multi setKpiSubscription(SubsDescriptor subsDescriptor); Uni getSubsDescriptor(String subscriptionId); diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java index 3a027fc6a..9c6450913 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java @@ -21,13 +21,12 @@ import eu.teraflow.policy.context.model.Empty; import eu.teraflow.policy.monitoring.model.AlarmDescriptor; import eu.teraflow.policy.monitoring.model.AlarmResponse; import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.Kpi; import eu.teraflow.policy.monitoring.model.KpiDescriptor; import eu.teraflow.policy.monitoring.model.SubsDescriptor; +import eu.teraflow.policy.monitoring.model.SubsResponse; import io.quarkus.grpc.GrpcClient; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; -import java.util.List; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; import monitoring.MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub; @@ -66,13 +65,13 @@ public class MonitoringGatewayImpl implements MonitoringGateway { } @Override - public Multi> setKpiSubscription(SubsDescriptor subsDescriptor) { + public Multi setKpiSubscription(SubsDescriptor subsDescriptor) { final var serializedSubsDescriptor = serializer.serialize(subsDescriptor); return streamingDelegateMonitoring .setKpiSubscription(serializedSubsDescriptor) .onItem() - .transform(kpiList -> serializer.deserialize(kpiList.getKpiListList())); + .transform(serializer::deserialize); } @Override diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java index c4d251d1e..d63bfb5fb 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java @@ -20,12 +20,11 @@ import eu.teraflow.policy.context.model.Empty; import eu.teraflow.policy.monitoring.model.AlarmDescriptor; import eu.teraflow.policy.monitoring.model.AlarmResponse; import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.Kpi; import eu.teraflow.policy.monitoring.model.KpiDescriptor; import eu.teraflow.policy.monitoring.model.SubsDescriptor; +import eu.teraflow.policy.monitoring.model.SubsResponse; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; -import java.util.List; public interface MonitoringService { @@ -33,7 +32,7 @@ public interface MonitoringService { Uni getKpiDescriptor(String kpiId); - Multi> setKpiSubscription(SubsDescriptor subsDescriptor); + Multi setKpiSubscription(SubsDescriptor subsDescriptor); Uni getSubsDescriptor(String subscriptionId); diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java index 480c3b724..ed53e4518 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java @@ -20,12 +20,11 @@ import eu.teraflow.policy.context.model.Empty; import eu.teraflow.policy.monitoring.model.AlarmDescriptor; import eu.teraflow.policy.monitoring.model.AlarmResponse; import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.Kpi; import eu.teraflow.policy.monitoring.model.KpiDescriptor; import eu.teraflow.policy.monitoring.model.SubsDescriptor; +import eu.teraflow.policy.monitoring.model.SubsResponse; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; -import java.util.List; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; @@ -50,7 +49,7 @@ public class MonitoringServiceImpl implements MonitoringService { } @Override - public Multi> setKpiSubscription(SubsDescriptor subsDescriptor) { + public Multi setKpiSubscription(SubsDescriptor subsDescriptor) { return monitoringGateway.setKpiSubscription(subsDescriptor); } diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmDescriptor.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmDescriptor.java index 85f0ce9e7..fe8c038b1 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmDescriptor.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmDescriptor.java @@ -16,29 +16,26 @@ package eu.teraflow.policy.monitoring.model; -import eu.teraflow.policy.common.Util; -import java.util.List; - public class AlarmDescriptor { private final String alarmId; private final String alarmDescription; private final String name; - private final List kpiIds; - private final List kpiValueRanges; + private final String kpiId; + private final KpiValueRange kpiValueRange; private final double timestamp; public AlarmDescriptor( String alarmId, String alarmDescription, String name, - List kpiIds, - List kpiValueRanges, + String kpiId, + KpiValueRange kpiValueRange, double timestamp) { this.alarmId = alarmId; this.alarmDescription = alarmDescription; this.name = name; - this.kpiIds = kpiIds; - this.kpiValueRanges = kpiValueRanges; + this.kpiId = kpiId; + this.kpiValueRange = kpiValueRange; this.timestamp = timestamp; } @@ -54,12 +51,12 @@ public class AlarmDescriptor { return name; } - public List getKpiIds() { - return kpiIds; + public String getKpiId() { + return kpiId; } - public List getKpiValueRanges() { - return kpiValueRanges; + public KpiValueRange getKpiValueRange() { + return kpiValueRange; } public double getTimestamp() { @@ -74,8 +71,8 @@ public class AlarmDescriptor { alarmId, alarmDescription, name, - Util.toString(kpiIds), - Util.toString(kpiValueRanges), + kpiId, + kpiValueRange, timestamp); } } diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmResponse.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmResponse.java index 4730c18d0..0e744280d 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmResponse.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmResponse.java @@ -16,34 +16,31 @@ package eu.teraflow.policy.monitoring.model; +import eu.teraflow.policy.common.Util; +import java.util.List; + public class AlarmResponse { private final String alarmId; - private final String text; - private final KpiValue kpiValue; - public AlarmResponse(String alarmId, String text, KpiValue kpiValue) { + private final List kpiList; + + public AlarmResponse(String alarmId, List kpiList) { this.alarmId = alarmId; - this.text = text; - this.kpiValue = kpiValue; + this.kpiList = kpiList; } public String getAlarmId() { return alarmId; } - public String getText() { - return text; - } - - public KpiValue getKpiValue() { - return kpiValue; + public List getKpiList() { + return kpiList; } @Override public String toString() { return String.format( - "%s:{alarmId:\"%s\", text:\"%s\", %s}", - getClass().getSimpleName(), alarmId, text, kpiValue); + "%s:{alarmId:\"%s\", %s}", getClass().getSimpleName(), alarmId, Util.toString(kpiList)); } } diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsResponse.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsResponse.java new file mode 100644 index 000000000..c0679fe1e --- /dev/null +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsResponse.java @@ -0,0 +1,46 @@ +/* +* Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +* +* 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. +*/ + +package eu.teraflow.policy.monitoring.model; + +import eu.teraflow.policy.common.Util; +import java.util.List; + +public class SubsResponse { + + private final String subscriptionId; + private final List kpiList; + + public SubsResponse(String subscriptionId, List kpiList) { + this.subscriptionId = subscriptionId; + this.kpiList = kpiList; + } + + public String getSubscriptionId() { + return subscriptionId; + } + + public List getKpiList() { + return kpiList; + } + + @Override + public String toString() { + return String.format( + "%s:{subscriptionId:\"%s\", %s}", + getClass().getSimpleName(), subscriptionId, Util.toString(kpiList)); + } +} diff --git a/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java b/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java index fcde02704..0f27fe20c 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java +++ b/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java @@ -2695,14 +2695,15 @@ class SerializerTest { final var kpiValueRanges = List.of(kpiValueRange); final var alarmDescriptor = - new AlarmDescriptor(alarmId, alarmDescription, name, kpiIds, kpiValueRanges, timestamp); + new AlarmDescriptor( + alarmId, alarmDescription, name, kpiIds.get(0), kpiValueRanges.get(0), timestamp); final var serializedalarmIdUuid = serializer.serializeUuid(alarmId); final var serializedalarmId = AlarmID.newBuilder().setAlarmId(serializedalarmIdUuid).build(); final var serializedKpiIdUuid = serializer.serializeUuid("kpiId1"); final var serializedKpiId1 = KpiId.newBuilder().setKpiId(serializedKpiIdUuid).build(); - final var serializedKpiId2 = KpiId.newBuilder().setKpiId(serializer.serializeUuid("kpiId2")); + // final var serializedKpiId2 = KpiId.newBuilder().setKpiId(serializer.serializeUuid("kpiId2")); final var serializedKpiValueRange = serializer.serialize(kpiValueRange); final var serializedTimeStamp = context.ContextOuterClass.Timestamp.newBuilder().setTimestamp(timestamp); @@ -2712,9 +2713,8 @@ class SerializerTest { .setAlarmId(serializedalarmId) .setAlarmDescription(alarmDescription) .setName(name) - .addKpiId(serializedKpiId1) - .addKpiId(serializedKpiId2) - .addKpiValueRange(serializedKpiValueRange) + .setKpiId(serializedKpiId1) + .setKpiValueRange(serializedKpiValueRange) .setTimestamp(serializedTimeStamp) .build(); @@ -2737,7 +2737,8 @@ class SerializerTest { final var kpiValueRanges = List.of(kpiValueRange); final var expectedAlarmDescriptor = - new AlarmDescriptor(alarmId, alarmDescription, name, kpiIds, kpiValueRanges, timestamp); + new AlarmDescriptor( + alarmId, alarmDescription, name, kpiIds.get(0), kpiValueRanges.get(0), timestamp); final var serializedalarmIdUuid = serializer.serializeUuid(alarmId); final var serializedalarmId = AlarmID.newBuilder().setAlarmId(serializedalarmIdUuid).build(); @@ -2755,9 +2756,8 @@ class SerializerTest { .setAlarmId(serializedalarmId) .setAlarmDescription(alarmDescription) .setName(name) - .addKpiId(serializedKpiId1) - .addKpiId(serializedKpiId2) - .addKpiValueRange(serializedKpiValueRange) + .setKpiId(serializedKpiId1) + .setKpiValueRange(serializedKpiValueRange) .setTimestamp(serializedTimeStamp) .build(); @@ -2769,20 +2769,23 @@ class SerializerTest { @Test void shouldSerializeAlarmResponse() { final var alarmId = "alarmId"; - final var text = "text"; final var kpiValue = new IntegerKpiValue(12); + final var kpiId = "expectedKpiId"; + final var timestamp = 100.0; + final var kpi = new Kpi(kpiId, timestamp, kpiValue); + final var kpiList = List.of(kpi); - final var alarmResponse = new AlarmResponse(alarmId, text, kpiValue); + final var alarmResponse = new AlarmResponse(alarmId, kpiList); final var serializedAlarmIdUuid = serializer.serializeUuid(alarmId); final var serializedAlarmId = AlarmID.newBuilder().setAlarmId(serializedAlarmIdUuid).build(); - final var serializedKpiValue = serializer.serialize(kpiValue); + final var serializedListKpis = serializer.serialize(List.of(kpi)); + final var serializedKpiList = Monitoring.KpiList.newBuilder().addAllKpi(serializedListKpis); final var expectedAlarmResponse = Monitoring.AlarmResponse.newBuilder() .setAlarmId(serializedAlarmId) - .setText(text) - .setKpiValue(serializedKpiValue) + .setKpiList(serializedKpiList) .build(); final var serializedAlarmResponse = serializer.serialize(alarmResponse); @@ -2793,20 +2796,23 @@ class SerializerTest { @Test void shouldDeserializeAlarmResponse() { final var alarmId = "alarmId"; - final var text = "text"; final var kpiValue = new IntegerKpiValue(12); + final var kpiId = "expectedKpiId"; + final var timestamp = 100.0; + final var kpi = new Kpi(kpiId, timestamp, kpiValue); + final var kpiList = List.of(kpi); - final var expectedAlarmResponse = new AlarmResponse(alarmId, text, kpiValue); + final var expectedAlarmResponse = new AlarmResponse(alarmId, kpiList); final var serializedAlarmIdUuid = serializer.serializeUuid(alarmId); final var serializedAlarmId = AlarmID.newBuilder().setAlarmId(serializedAlarmIdUuid).build(); - final var serializedKpiValue = serializer.serialize(kpiValue); + final var serializedListKpis = serializer.serialize(List.of(kpi)); + final var serializedKpiList = Monitoring.KpiList.newBuilder().addAllKpi(serializedListKpis); final var serializedAlarmResponse = Monitoring.AlarmResponse.newBuilder() .setAlarmId(serializedAlarmId) - .setText(text) - .setKpiValue(serializedKpiValue) + .setKpiList(serializedKpiList) .build(); final var alarmResponse = serializer.deserialize(serializedAlarmResponse); diff --git a/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java b/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java index 9d05f3da8..ffd0ed3d8 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java +++ b/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java @@ -2869,28 +2869,19 @@ public final class Monitoring { com.google.protobuf.MessageOrBuilder { /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - java.util.List - getKpiIdList(); - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiId getKpiId(int index); - /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. */ - int getKpiIdCount(); + boolean hasKpiId(); /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. */ - java.util.List - getKpiIdOrBuilderList(); + monitoring.Monitoring.KpiId getKpiId(); /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( - int index); + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); /** * float monitoring_window_s = 2; @@ -2981,7 +2972,6 @@ public final class Monitoring { super(builder); } private KpiQuery() { - kpiId_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -3004,7 +2994,6 @@ public final class Monitoring { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -3016,12 +3005,16 @@ public final class Monitoring { done = true; break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiId_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; + monitoring.Monitoring.KpiId.Builder subBuilder = null; + if (kpiId_ != null) { + subBuilder = kpiId_.toBuilder(); } - kpiId_.add( - input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry)); + kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kpiId_); + kpiId_ = subBuilder.buildPartial(); + } + break; } case 21: { @@ -3080,9 +3073,6 @@ public final class Monitoring { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiId_ = java.util.Collections.unmodifiableList(kpiId_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -3101,43 +3091,29 @@ public final class Monitoring { } public static final int KPI_ID_FIELD_NUMBER = 1; - private java.util.List kpiId_; - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public java.util.List getKpiIdList() { - return kpiId_; - } - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public java.util.List - getKpiIdOrBuilderList() { - return kpiId_; - } + private monitoring.Monitoring.KpiId kpiId_; /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. */ @java.lang.Override - public int getKpiIdCount() { - return kpiId_.size(); + public boolean hasKpiId() { + return kpiId_ != null; } /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. */ @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId(int index) { - return kpiId_.get(index); + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; */ @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( - int index) { - return kpiId_.get(index); + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); } public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; @@ -3267,8 +3243,8 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < kpiId_.size(); i++) { - output.writeMessage(1, kpiId_.get(i)); + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); } if (monitoringWindowS_ != 0F) { output.writeFloat(2, monitoringWindowS_); @@ -3294,9 +3270,9 @@ public final class Monitoring { if (size != -1) return size; size = 0; - for (int i = 0; i < kpiId_.size(); i++) { + if (kpiId_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpiId_.get(i)); + .computeMessageSize(1, getKpiId()); } if (monitoringWindowS_ != 0F) { size += com.google.protobuf.CodedOutputStream @@ -3333,8 +3309,11 @@ public final class Monitoring { } monitoring.Monitoring.KpiQuery other = (monitoring.Monitoring.KpiQuery) obj; - if (!getKpiIdList() - .equals(other.getKpiIdList())) return false; + if (hasKpiId() != other.hasKpiId()) return false; + if (hasKpiId()) { + if (!getKpiId() + .equals(other.getKpiId())) return false; + } if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) != java.lang.Float.floatToIntBits( other.getMonitoringWindowS())) return false; @@ -3364,9 +3343,9 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiIdCount() > 0) { + if (hasKpiId()) { hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiIdList().hashCode(); + hash = (53 * hash) + getKpiId().hashCode(); } hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( @@ -3512,17 +3491,16 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getKpiIdFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (kpiIdBuilder_ == null) { - kpiId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; } else { - kpiIdBuilder_.clear(); + kpiId_ = null; + kpiIdBuilder_ = null; } monitoringWindowS_ = 0F; @@ -3568,12 +3546,7 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.KpiQuery buildPartial() { monitoring.Monitoring.KpiQuery result = new monitoring.Monitoring.KpiQuery(this); - int from_bitField0_ = bitField0_; if (kpiIdBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiId_ = java.util.Collections.unmodifiableList(kpiId_); - bitField0_ = (bitField0_ & ~0x00000001); - } result.kpiId_ = kpiId_; } else { result.kpiId_ = kpiIdBuilder_.build(); @@ -3639,31 +3612,8 @@ public final class Monitoring { public Builder mergeFrom(monitoring.Monitoring.KpiQuery other) { if (other == monitoring.Monitoring.KpiQuery.getDefaultInstance()) return this; - if (kpiIdBuilder_ == null) { - if (!other.kpiId_.isEmpty()) { - if (kpiId_.isEmpty()) { - kpiId_ = other.kpiId_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiIdIsMutable(); - kpiId_.addAll(other.kpiId_); - } - onChanged(); - } - } else { - if (!other.kpiId_.isEmpty()) { - if (kpiIdBuilder_.isEmpty()) { - kpiIdBuilder_.dispose(); - kpiIdBuilder_ = null; - kpiId_ = other.kpiId_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiIdBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiIdFieldBuilder() : null; - } else { - kpiIdBuilder_.addAllMessages(other.kpiId_); - } - } + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); } if (other.getMonitoringWindowS() != 0F) { setMonitoringWindowS(other.getMonitoringWindowS()); @@ -3708,241 +3658,119 @@ public final class Monitoring { } return this; } - private int bitField0_; - - private java.util.List kpiId_ = - java.util.Collections.emptyList(); - private void ensureKpiIdIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiId_ = new java.util.ArrayList(kpiId_); - bitField0_ |= 0x00000001; - } - } - private com.google.protobuf.RepeatedFieldBuilderV3< + private monitoring.Monitoring.KpiId kpiId_; + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - public java.util.List getKpiIdList() { - if (kpiIdBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiId_); - } else { - return kpiIdBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. */ - public int getKpiIdCount() { - if (kpiIdBuilder_ == null) { - return kpiId_.size(); - } else { - return kpiIdBuilder_.getCount(); - } + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; } /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. */ - public monitoring.Monitoring.KpiId getKpiId(int index) { + public monitoring.Monitoring.KpiId getKpiId() { if (kpiIdBuilder_ == null) { - return kpiId_.get(index); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } else { - return kpiIdBuilder_.getMessage(index); + return kpiIdBuilder_.getMessage(); } } /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; */ - public Builder setKpiId( - int index, monitoring.Monitoring.KpiId value) { + public Builder setKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiIdIsMutable(); - kpiId_.set(index, value); + kpiId_ = value; onChanged(); } else { - kpiIdBuilder_.setMessage(index, value); + kpiIdBuilder_.setMessage(value); } + return this; } /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; */ public Builder setKpiId( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiIdBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - public Builder addKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdIsMutable(); - kpiId_.add(value); - onChanged(); - } else { - kpiIdBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - public Builder addKpiId( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdIsMutable(); - kpiId_.add(index, value); - onChanged(); - } else { - kpiIdBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - public Builder addKpiId( monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.add(builderForValue.build()); - onChanged(); - } else { - kpiIdBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - public Builder addKpiId( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.add(index, builderForValue.build()); + kpiId_ = builderForValue.build(); onChanged(); } else { - kpiIdBuilder_.addMessage(index, builderForValue.build()); + kpiIdBuilder_.setMessage(builderForValue.build()); } + return this; } /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; */ - public Builder addAllKpiId( - java.lang.Iterable values) { + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiId_); + if (kpiId_ != null) { + kpiId_ = + monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } onChanged(); } else { - kpiIdBuilder_.addAllMessages(values); + kpiIdBuilder_.mergeFrom(value); } + return this; } /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; */ public Builder clearKpiId() { if (kpiIdBuilder_ == null) { - kpiId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiIdBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - public Builder removeKpiId(int index) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.remove(index); + kpiId_ = null; onChanged(); } else { - kpiIdBuilder_.remove(index); + kpiId_ = null; + kpiIdBuilder_ = null; } + return this; } /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder( - int index) { - return getKpiIdFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( - int index) { - if (kpiIdBuilder_ == null) { - return kpiId_.get(index); } else { - return kpiIdBuilder_.getMessageOrBuilder(index); - } + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); } /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; */ - public java.util.List - getKpiIdOrBuilderList() { + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilderList(); + return kpiIdBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(kpiId_); + return kpiId_ == null ? + monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } } /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdBuilder() { - return getKpiIdFieldBuilder().addBuilder( - monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdBuilder( - int index) { - return getKpiIdFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_id = 1; + * .monitoring.KpiId kpi_id = 1; */ - public java.util.List - getKpiIdBuilderList() { - return getKpiIdFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> getKpiIdFieldBuilder() { if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - kpiId_, - ((bitField0_ & 0x00000001) != 0), + getKpiId(), getParentForChildren(), isClean()); kpiId_ = null; @@ -8482,27 +8310,27 @@ public final class Monitoring { com.google.protobuf.MessageOrBuilder { /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ java.util.List - getKpiListList(); + getKpiList(); /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - monitoring.Monitoring.Kpi getKpiList(int index); + monitoring.Monitoring.Kpi getKpi(int index); /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - int getKpiListCount(); + int getKpiCount(); /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ java.util.List - getKpiListOrBuilderList(); + getKpiOrBuilderList(); /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - monitoring.Monitoring.KpiOrBuilder getKpiListOrBuilder( + monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( int index); } /** @@ -8518,7 +8346,7 @@ public final class Monitoring { super(builder); } private KpiList() { - kpiList_ = java.util.Collections.emptyList(); + kpi_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -8554,10 +8382,10 @@ public final class Monitoring { break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiList_ = new java.util.ArrayList(); + kpi_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } - kpiList_.add( + kpi_.add( input.readMessage(monitoring.Monitoring.Kpi.parser(), extensionRegistry)); break; } @@ -8577,7 +8405,7 @@ public final class Monitoring { e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiList_ = java.util.Collections.unmodifiableList(kpiList_); + kpi_ = java.util.Collections.unmodifiableList(kpi_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -8596,44 +8424,44 @@ public final class Monitoring { monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); } - public static final int KPI_LIST_FIELD_NUMBER = 1; - private java.util.List kpiList_; + public static final int KPI_FIELD_NUMBER = 1; + private java.util.List kpi_; /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ @java.lang.Override - public java.util.List getKpiListList() { - return kpiList_; + public java.util.List getKpiList() { + return kpi_; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ @java.lang.Override public java.util.List - getKpiListOrBuilderList() { - return kpiList_; + getKpiOrBuilderList() { + return kpi_; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ @java.lang.Override - public int getKpiListCount() { - return kpiList_.size(); + public int getKpiCount() { + return kpi_.size(); } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ @java.lang.Override - public monitoring.Monitoring.Kpi getKpiList(int index) { - return kpiList_.get(index); + public monitoring.Monitoring.Kpi getKpi(int index) { + return kpi_.get(index); } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ @java.lang.Override - public monitoring.Monitoring.KpiOrBuilder getKpiListOrBuilder( + public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( int index) { - return kpiList_.get(index); + return kpi_.get(index); } private byte memoizedIsInitialized = -1; @@ -8650,8 +8478,8 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < kpiList_.size(); i++) { - output.writeMessage(1, kpiList_.get(i)); + for (int i = 0; i < kpi_.size(); i++) { + output.writeMessage(1, kpi_.get(i)); } unknownFields.writeTo(output); } @@ -8662,9 +8490,9 @@ public final class Monitoring { if (size != -1) return size; size = 0; - for (int i = 0; i < kpiList_.size(); i++) { + for (int i = 0; i < kpi_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpiList_.get(i)); + .computeMessageSize(1, kpi_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -8681,8 +8509,8 @@ public final class Monitoring { } monitoring.Monitoring.KpiList other = (monitoring.Monitoring.KpiList) obj; - if (!getKpiListList() - .equals(other.getKpiListList())) return false; + if (!getKpiList() + .equals(other.getKpiList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -8694,9 +8522,9 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiListCount() > 0) { - hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiListList().hashCode(); + if (getKpiCount() > 0) { + hash = (37 * hash) + KPI_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -8826,17 +8654,17 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getKpiListFieldBuilder(); + getKpiFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiListBuilder_ == null) { - kpiList_ = java.util.Collections.emptyList(); + if (kpiBuilder_ == null) { + kpi_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - kpiListBuilder_.clear(); + kpiBuilder_.clear(); } return this; } @@ -8865,14 +8693,14 @@ public final class Monitoring { public monitoring.Monitoring.KpiList buildPartial() { monitoring.Monitoring.KpiList result = new monitoring.Monitoring.KpiList(this); int from_bitField0_ = bitField0_; - if (kpiListBuilder_ == null) { + if (kpiBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - kpiList_ = java.util.Collections.unmodifiableList(kpiList_); + kpi_ = java.util.Collections.unmodifiableList(kpi_); bitField0_ = (bitField0_ & ~0x00000001); } - result.kpiList_ = kpiList_; + result.kpi_ = kpi_; } else { - result.kpiList_ = kpiListBuilder_.build(); + result.kpi_ = kpiBuilder_.build(); } onBuilt(); return result; @@ -8922,29 +8750,29 @@ public final class Monitoring { public Builder mergeFrom(monitoring.Monitoring.KpiList other) { if (other == monitoring.Monitoring.KpiList.getDefaultInstance()) return this; - if (kpiListBuilder_ == null) { - if (!other.kpiList_.isEmpty()) { - if (kpiList_.isEmpty()) { - kpiList_ = other.kpiList_; + if (kpiBuilder_ == null) { + if (!other.kpi_.isEmpty()) { + if (kpi_.isEmpty()) { + kpi_ = other.kpi_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureKpiListIsMutable(); - kpiList_.addAll(other.kpiList_); + ensureKpiIsMutable(); + kpi_.addAll(other.kpi_); } onChanged(); } } else { - if (!other.kpiList_.isEmpty()) { - if (kpiListBuilder_.isEmpty()) { - kpiListBuilder_.dispose(); - kpiListBuilder_ = null; - kpiList_ = other.kpiList_; + if (!other.kpi_.isEmpty()) { + if (kpiBuilder_.isEmpty()) { + kpiBuilder_.dispose(); + kpiBuilder_ = null; + kpi_ = other.kpi_; bitField0_ = (bitField0_ & ~0x00000001); - kpiListBuilder_ = + kpiBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiListFieldBuilder() : null; + getKpiFieldBuilder() : null; } else { - kpiListBuilder_.addAllMessages(other.kpiList_); + kpiBuilder_.addAllMessages(other.kpi_); } } } @@ -8978,244 +8806,244 @@ public final class Monitoring { } private int bitField0_; - private java.util.List kpiList_ = + private java.util.List kpi_ = java.util.Collections.emptyList(); - private void ensureKpiListIsMutable() { + private void ensureKpiIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - kpiList_ = new java.util.ArrayList(kpiList_); + kpi_ = new java.util.ArrayList(kpi_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> kpiListBuilder_; + monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> kpiBuilder_; /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public java.util.List getKpiListList() { - if (kpiListBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiList_); + public java.util.List getKpiList() { + if (kpiBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpi_); } else { - return kpiListBuilder_.getMessageList(); + return kpiBuilder_.getMessageList(); } } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public int getKpiListCount() { - if (kpiListBuilder_ == null) { - return kpiList_.size(); + public int getKpiCount() { + if (kpiBuilder_ == null) { + return kpi_.size(); } else { - return kpiListBuilder_.getCount(); + return kpiBuilder_.getCount(); } } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public monitoring.Monitoring.Kpi getKpiList(int index) { - if (kpiListBuilder_ == null) { - return kpiList_.get(index); + public monitoring.Monitoring.Kpi getKpi(int index) { + if (kpiBuilder_ == null) { + return kpi_.get(index); } else { - return kpiListBuilder_.getMessage(index); + return kpiBuilder_.getMessage(index); } } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public Builder setKpiList( + public Builder setKpi( int index, monitoring.Monitoring.Kpi value) { - if (kpiListBuilder_ == null) { + if (kpiBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiListIsMutable(); - kpiList_.set(index, value); + ensureKpiIsMutable(); + kpi_.set(index, value); onChanged(); } else { - kpiListBuilder_.setMessage(index, value); + kpiBuilder_.setMessage(index, value); } return this; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public Builder setKpiList( + public Builder setKpi( int index, monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.set(index, builderForValue.build()); + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.set(index, builderForValue.build()); onChanged(); } else { - kpiListBuilder_.setMessage(index, builderForValue.build()); + kpiBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public Builder addKpiList(monitoring.Monitoring.Kpi value) { - if (kpiListBuilder_ == null) { + public Builder addKpi(monitoring.Monitoring.Kpi value) { + if (kpiBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiListIsMutable(); - kpiList_.add(value); + ensureKpiIsMutable(); + kpi_.add(value); onChanged(); } else { - kpiListBuilder_.addMessage(value); + kpiBuilder_.addMessage(value); } return this; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public Builder addKpiList( + public Builder addKpi( int index, monitoring.Monitoring.Kpi value) { - if (kpiListBuilder_ == null) { + if (kpiBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiListIsMutable(); - kpiList_.add(index, value); + ensureKpiIsMutable(); + kpi_.add(index, value); onChanged(); } else { - kpiListBuilder_.addMessage(index, value); + kpiBuilder_.addMessage(index, value); } return this; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public Builder addKpiList( + public Builder addKpi( monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.add(builderForValue.build()); + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.add(builderForValue.build()); onChanged(); } else { - kpiListBuilder_.addMessage(builderForValue.build()); + kpiBuilder_.addMessage(builderForValue.build()); } return this; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public Builder addKpiList( + public Builder addKpi( int index, monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.add(index, builderForValue.build()); + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.add(index, builderForValue.build()); onChanged(); } else { - kpiListBuilder_.addMessage(index, builderForValue.build()); + kpiBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public Builder addAllKpiList( + public Builder addAllKpi( java.lang.Iterable values) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiList_); + values, kpi_); onChanged(); } else { - kpiListBuilder_.addAllMessages(values); + kpiBuilder_.addAllMessages(values); } return this; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public Builder clearKpiList() { - if (kpiListBuilder_ == null) { - kpiList_ = java.util.Collections.emptyList(); + public Builder clearKpi() { + if (kpiBuilder_ == null) { + kpi_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - kpiListBuilder_.clear(); + kpiBuilder_.clear(); } return this; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public Builder removeKpiList(int index) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.remove(index); + public Builder removeKpi(int index) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.remove(index); onChanged(); } else { - kpiListBuilder_.remove(index); + kpiBuilder_.remove(index); } return this; } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public monitoring.Monitoring.Kpi.Builder getKpiListBuilder( + public monitoring.Monitoring.Kpi.Builder getKpiBuilder( int index) { - return getKpiListFieldBuilder().getBuilder(index); + return getKpiFieldBuilder().getBuilder(index); } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public monitoring.Monitoring.KpiOrBuilder getKpiListOrBuilder( + public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( int index) { - if (kpiListBuilder_ == null) { - return kpiList_.get(index); } else { - return kpiListBuilder_.getMessageOrBuilder(index); + if (kpiBuilder_ == null) { + return kpi_.get(index); } else { + return kpiBuilder_.getMessageOrBuilder(index); } } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ public java.util.List - getKpiListOrBuilderList() { - if (kpiListBuilder_ != null) { - return kpiListBuilder_.getMessageOrBuilderList(); + getKpiOrBuilderList() { + if (kpiBuilder_ != null) { + return kpiBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(kpiList_); + return java.util.Collections.unmodifiableList(kpi_); } } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public monitoring.Monitoring.Kpi.Builder addKpiListBuilder() { - return getKpiListFieldBuilder().addBuilder( + public monitoring.Monitoring.Kpi.Builder addKpiBuilder() { + return getKpiFieldBuilder().addBuilder( monitoring.Monitoring.Kpi.getDefaultInstance()); } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ - public monitoring.Monitoring.Kpi.Builder addKpiListBuilder( + public monitoring.Monitoring.Kpi.Builder addKpiBuilder( int index) { - return getKpiListFieldBuilder().addBuilder( + return getKpiFieldBuilder().addBuilder( index, monitoring.Monitoring.Kpi.getDefaultInstance()); } /** - * repeated .monitoring.Kpi kpi_list = 1; + * repeated .monitoring.Kpi kpi = 1; */ public java.util.List - getKpiListBuilderList() { - return getKpiListFieldBuilder().getBuilderList(); + getKpiBuilderList() { + return getKpiFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> - getKpiListFieldBuilder() { - if (kpiListBuilder_ == null) { - kpiListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + getKpiFieldBuilder() { + if (kpiBuilder_ == null) { + kpiBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder>( - kpiList_, + kpi_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - kpiList_ = null; + kpi_ = null; } - return kpiListBuilder_; + return kpiBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -12198,28 +12026,19 @@ public final class Monitoring { monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - java.util.List - getKpiListList(); - /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; + * @return Whether the kpiList field is set. */ - monitoring.Monitoring.KpiList getKpiList(int index); + boolean hasKpiList(); /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; + * @return The kpiList. */ - int getKpiListCount(); + monitoring.Monitoring.KpiList getKpiList(); /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; */ - java.util.List - getKpiListOrBuilderList(); - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder( - int index); + monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); } /** * Protobuf type {@code monitoring.SubsResponse} @@ -12234,7 +12053,6 @@ public final class Monitoring { super(builder); } private SubsResponse() { - kpiList_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -12257,7 +12075,6 @@ public final class Monitoring { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -12282,12 +12099,16 @@ public final class Monitoring { break; } case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiList_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; + monitoring.Monitoring.KpiList.Builder subBuilder = null; + if (kpiList_ != null) { + subBuilder = kpiList_.toBuilder(); + } + kpiList_ = input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kpiList_); + kpiList_ = subBuilder.buildPartial(); } - kpiList_.add( - input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry)); + break; } default: { @@ -12305,9 +12126,6 @@ public final class Monitoring { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiList_ = java.util.Collections.unmodifiableList(kpiList_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -12352,43 +12170,29 @@ public final class Monitoring { } public static final int KPI_LIST_FIELD_NUMBER = 2; - private java.util.List kpiList_; - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - @java.lang.Override - public java.util.List getKpiListList() { - return kpiList_; - } - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - @java.lang.Override - public java.util.List - getKpiListOrBuilderList() { - return kpiList_; - } + private monitoring.Monitoring.KpiList kpiList_; /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; + * @return Whether the kpiList field is set. */ @java.lang.Override - public int getKpiListCount() { - return kpiList_.size(); + public boolean hasKpiList() { + return kpiList_ != null; } /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; + * @return The kpiList. */ @java.lang.Override - public monitoring.Monitoring.KpiList getKpiList(int index) { - return kpiList_.get(index); + public monitoring.Monitoring.KpiList getKpiList() { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; */ @java.lang.Override - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder( - int index) { - return kpiList_.get(index); + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + return getKpiList(); } private byte memoizedIsInitialized = -1; @@ -12408,8 +12212,8 @@ public final class Monitoring { if (subsId_ != null) { output.writeMessage(1, getSubsId()); } - for (int i = 0; i < kpiList_.size(); i++) { - output.writeMessage(2, kpiList_.get(i)); + if (kpiList_ != null) { + output.writeMessage(2, getKpiList()); } unknownFields.writeTo(output); } @@ -12424,9 +12228,9 @@ public final class Monitoring { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getSubsId()); } - for (int i = 0; i < kpiList_.size(); i++) { + if (kpiList_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, kpiList_.get(i)); + .computeMessageSize(2, getKpiList()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -12448,8 +12252,11 @@ public final class Monitoring { if (!getSubsId() .equals(other.getSubsId())) return false; } - if (!getKpiListList() - .equals(other.getKpiListList())) return false; + if (hasKpiList() != other.hasKpiList()) return false; + if (hasKpiList()) { + if (!getKpiList() + .equals(other.getKpiList())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -12465,9 +12272,9 @@ public final class Monitoring { hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; hash = (53 * hash) + getSubsId().hashCode(); } - if (getKpiListCount() > 0) { + if (hasKpiList()) { hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiListList().hashCode(); + hash = (53 * hash) + getKpiList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -12597,7 +12404,6 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getKpiListFieldBuilder(); } } @java.lang.Override @@ -12610,10 +12416,10 @@ public final class Monitoring { subsIdBuilder_ = null; } if (kpiListBuilder_ == null) { - kpiList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + kpiList_ = null; } else { - kpiListBuilder_.clear(); + kpiList_ = null; + kpiListBuilder_ = null; } return this; } @@ -12641,17 +12447,12 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.SubsResponse buildPartial() { monitoring.Monitoring.SubsResponse result = new monitoring.Monitoring.SubsResponse(this); - int from_bitField0_ = bitField0_; if (subsIdBuilder_ == null) { result.subsId_ = subsId_; } else { result.subsId_ = subsIdBuilder_.build(); } if (kpiListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiList_ = java.util.Collections.unmodifiableList(kpiList_); - bitField0_ = (bitField0_ & ~0x00000001); - } result.kpiList_ = kpiList_; } else { result.kpiList_ = kpiListBuilder_.build(); @@ -12707,31 +12508,8 @@ public final class Monitoring { if (other.hasSubsId()) { mergeSubsId(other.getSubsId()); } - if (kpiListBuilder_ == null) { - if (!other.kpiList_.isEmpty()) { - if (kpiList_.isEmpty()) { - kpiList_ = other.kpiList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiListIsMutable(); - kpiList_.addAll(other.kpiList_); - } - onChanged(); - } - } else { - if (!other.kpiList_.isEmpty()) { - if (kpiListBuilder_.isEmpty()) { - kpiListBuilder_.dispose(); - kpiListBuilder_ = null; - kpiList_ = other.kpiList_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiListFieldBuilder() : null; - } else { - kpiListBuilder_.addAllMessages(other.kpiList_); - } - } + if (other.hasKpiList()) { + mergeKpiList(other.getKpiList()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -12761,7 +12539,6 @@ public final class Monitoring { } return this; } - private int bitField0_; private monitoring.Monitoring.SubscriptionID subsId_; private com.google.protobuf.SingleFieldBuilderV3< @@ -12882,239 +12659,118 @@ public final class Monitoring { return subsIdBuilder_; } - private java.util.List kpiList_ = - java.util.Collections.emptyList(); - private void ensureKpiListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiList_ = new java.util.ArrayList(kpiList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< + private monitoring.Monitoring.KpiList kpiList_; + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> kpiListBuilder_; - - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - public java.util.List getKpiListList() { - if (kpiListBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiList_); - } else { - return kpiListBuilder_.getMessageList(); - } - } /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; + * @return Whether the kpiList field is set. */ - public int getKpiListCount() { - if (kpiListBuilder_ == null) { - return kpiList_.size(); - } else { - return kpiListBuilder_.getCount(); - } + public boolean hasKpiList() { + return kpiListBuilder_ != null || kpiList_ != null; } /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; + * @return The kpiList. */ - public monitoring.Monitoring.KpiList getKpiList(int index) { + public monitoring.Monitoring.KpiList getKpiList() { if (kpiListBuilder_ == null) { - return kpiList_.get(index); + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } else { - return kpiListBuilder_.getMessage(index); + return kpiListBuilder_.getMessage(); } } /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; */ - public Builder setKpiList( - int index, monitoring.Monitoring.KpiList value) { + public Builder setKpiList(monitoring.Monitoring.KpiList value) { if (kpiListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiListIsMutable(); - kpiList_.set(index, value); + kpiList_ = value; onChanged(); } else { - kpiListBuilder_.setMessage(index, value); + kpiListBuilder_.setMessage(value); } + return this; } /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; */ public Builder setKpiList( - int index, monitoring.Monitoring.KpiList.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - public Builder addKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiListIsMutable(); - kpiList_.add(value); - onChanged(); - } else { - kpiListBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - public Builder addKpiList( - int index, monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiListIsMutable(); - kpiList_.add(index, value); - onChanged(); - } else { - kpiListBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - public Builder addKpiList( monitoring.Monitoring.KpiList.Builder builderForValue) { if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.add(builderForValue.build()); - onChanged(); - } else { - kpiListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - public Builder addKpiList( - int index, monitoring.Monitoring.KpiList.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.add(index, builderForValue.build()); + kpiList_ = builderForValue.build(); onChanged(); } else { - kpiListBuilder_.addMessage(index, builderForValue.build()); + kpiListBuilder_.setMessage(builderForValue.build()); } + return this; } /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; */ - public Builder addAllKpiList( - java.lang.Iterable values) { + public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiList_); + if (kpiList_ != null) { + kpiList_ = + monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); + } else { + kpiList_ = value; + } onChanged(); } else { - kpiListBuilder_.addAllMessages(values); + kpiListBuilder_.mergeFrom(value); } + return this; } /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; */ public Builder clearKpiList() { if (kpiListBuilder_ == null) { - kpiList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiListBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - public Builder removeKpiList(int index) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.remove(index); + kpiList_ = null; onChanged(); } else { - kpiListBuilder_.remove(index); + kpiList_ = null; + kpiListBuilder_ = null; } + return this; } /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - public monitoring.Monitoring.KpiList.Builder getKpiListBuilder( - int index) { - return getKpiListFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; */ - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder( - int index) { - if (kpiListBuilder_ == null) { - return kpiList_.get(index); } else { - return kpiListBuilder_.getMessageOrBuilder(index); - } + public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { + + onChanged(); + return getKpiListFieldBuilder().getBuilder(); } /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; */ - public java.util.List - getKpiListOrBuilderList() { + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { if (kpiListBuilder_ != null) { - return kpiListBuilder_.getMessageOrBuilderList(); + return kpiListBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(kpiList_); + return kpiList_ == null ? + monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } } /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - public monitoring.Monitoring.KpiList.Builder addKpiListBuilder() { - return getKpiListFieldBuilder().addBuilder( - monitoring.Monitoring.KpiList.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiList kpi_list = 2; + * .monitoring.KpiList kpi_list = 2; */ - public monitoring.Monitoring.KpiList.Builder addKpiListBuilder( - int index) { - return getKpiListFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiList.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiList kpi_list = 2; - */ - public java.util.List - getKpiListBuilderList() { - return getKpiListFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> getKpiListFieldBuilder() { if (kpiListBuilder_ == null) { - kpiListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder>( - kpiList_, - ((bitField0_ & 0x00000001) != 0), + getKpiList(), getParentForChildren(), isClean()); kpiList_ = null; @@ -13174,55 +12830,55 @@ public final class Monitoring { } - public interface SubsIDListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubsIDList) + public interface SubsListOrBuilder extends + // @@protoc_insertion_point(interface_extends:monitoring.SubsList) com.google.protobuf.MessageOrBuilder { /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - java.util.List - getSubsListList(); + java.util.List + getSubsDescriptorList(); /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - monitoring.Monitoring.SubscriptionID getSubsList(int index); + monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index); /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - int getSubsListCount(); + int getSubsDescriptorCount(); /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - java.util.List - getSubsListOrBuilderList(); + java.util.List + getSubsDescriptorOrBuilderList(); /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - monitoring.Monitoring.SubscriptionIDOrBuilder getSubsListOrBuilder( + monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( int index); } /** - * Protobuf type {@code monitoring.SubsIDList} + * Protobuf type {@code monitoring.SubsList} */ - public static final class SubsIDList extends + public static final class SubsList extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubsIDList) - SubsIDListOrBuilder { + // @@protoc_insertion_point(message_implements:monitoring.SubsList) + SubsListOrBuilder { private static final long serialVersionUID = 0L; - // Use SubsIDList.newBuilder() to construct. - private SubsIDList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use SubsList.newBuilder() to construct. + private SubsList(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private SubsIDList() { - subsList_ = java.util.Collections.emptyList(); + private SubsList() { + subsDescriptor_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new SubsIDList(); + return new SubsList(); } @java.lang.Override @@ -13230,7 +12886,7 @@ public final class Monitoring { getUnknownFields() { return this.unknownFields; } - private SubsIDList( + private SubsList( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -13251,11 +12907,11 @@ public final class Monitoring { break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - subsList_ = new java.util.ArrayList(); + subsDescriptor_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } - subsList_.add( - input.readMessage(monitoring.Monitoring.SubscriptionID.parser(), extensionRegistry)); + subsDescriptor_.add( + input.readMessage(monitoring.Monitoring.SubsDescriptor.parser(), extensionRegistry)); break; } default: { @@ -13274,7 +12930,7 @@ public final class Monitoring { e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - subsList_ = java.util.Collections.unmodifiableList(subsList_); + subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -13282,55 +12938,55 @@ public final class Monitoring { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_fieldAccessorTable + return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsIDList.class, monitoring.Monitoring.SubsIDList.Builder.class); + monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); } - public static final int SUBS_LIST_FIELD_NUMBER = 1; - private java.util.List subsList_; + public static final int SUBS_DESCRIPTOR_FIELD_NUMBER = 1; + private java.util.List subsDescriptor_; /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ @java.lang.Override - public java.util.List getSubsListList() { - return subsList_; + public java.util.List getSubsDescriptorList() { + return subsDescriptor_; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ @java.lang.Override - public java.util.List - getSubsListOrBuilderList() { - return subsList_; + public java.util.List + getSubsDescriptorOrBuilderList() { + return subsDescriptor_; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ @java.lang.Override - public int getSubsListCount() { - return subsList_.size(); + public int getSubsDescriptorCount() { + return subsDescriptor_.size(); } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ @java.lang.Override - public monitoring.Monitoring.SubscriptionID getSubsList(int index) { - return subsList_.get(index); + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { + return subsDescriptor_.get(index); } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ @java.lang.Override - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsListOrBuilder( + public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( int index) { - return subsList_.get(index); + return subsDescriptor_.get(index); } private byte memoizedIsInitialized = -1; @@ -13347,8 +13003,8 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < subsList_.size(); i++) { - output.writeMessage(1, subsList_.get(i)); + for (int i = 0; i < subsDescriptor_.size(); i++) { + output.writeMessage(1, subsDescriptor_.get(i)); } unknownFields.writeTo(output); } @@ -13359,9 +13015,9 @@ public final class Monitoring { if (size != -1) return size; size = 0; - for (int i = 0; i < subsList_.size(); i++) { + for (int i = 0; i < subsDescriptor_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subsList_.get(i)); + .computeMessageSize(1, subsDescriptor_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -13373,13 +13029,13 @@ public final class Monitoring { if (obj == this) { return true; } - if (!(obj instanceof monitoring.Monitoring.SubsIDList)) { + if (!(obj instanceof monitoring.Monitoring.SubsList)) { return super.equals(obj); } - monitoring.Monitoring.SubsIDList other = (monitoring.Monitoring.SubsIDList) obj; + monitoring.Monitoring.SubsList other = (monitoring.Monitoring.SubsList) obj; - if (!getSubsListList() - .equals(other.getSubsListList())) return false; + if (!getSubsDescriptorList() + .equals(other.getSubsDescriptorList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -13391,78 +13047,78 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubsListCount() > 0) { - hash = (37 * hash) + SUBS_LIST_FIELD_NUMBER; - hash = (53 * hash) + getSubsListList().hashCode(); + if (getSubsDescriptorCount() > 0) { + hash = (37 * hash) + SUBS_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getSubsDescriptorList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseFrom(byte[] data) + public static monitoring.Monitoring.SubsList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseFrom(java.io.InputStream input) + public static monitoring.Monitoring.SubsList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseDelimitedFrom(java.io.InputStream input) + public static monitoring.Monitoring.SubsList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static monitoring.Monitoring.SubsIDList parseDelimitedFrom( + public static monitoring.Monitoring.SubsList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13475,7 +13131,7 @@ public final class Monitoring { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(monitoring.Monitoring.SubsIDList prototype) { + public static Builder newBuilder(monitoring.Monitoring.SubsList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -13491,26 +13147,26 @@ public final class Monitoring { return builder; } /** - * Protobuf type {@code monitoring.SubsIDList} + * Protobuf type {@code monitoring.SubsList} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.SubsIDList) - monitoring.Monitoring.SubsIDListOrBuilder { + // @@protoc_insertion_point(builder_implements:monitoring.SubsList) + monitoring.Monitoring.SubsListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_fieldAccessorTable + return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsIDList.class, monitoring.Monitoring.SubsIDList.Builder.class); + monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); } - // Construct using monitoring.Monitoring.SubsIDList.newBuilder() + // Construct using monitoring.Monitoring.SubsList.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -13523,17 +13179,17 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getSubsListFieldBuilder(); + getSubsDescriptorFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (subsListBuilder_ == null) { - subsList_ = java.util.Collections.emptyList(); + if (subsDescriptorBuilder_ == null) { + subsDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - subsListBuilder_.clear(); + subsDescriptorBuilder_.clear(); } return this; } @@ -13541,17 +13197,17 @@ public final class Monitoring { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; } @java.lang.Override - public monitoring.Monitoring.SubsIDList getDefaultInstanceForType() { - return monitoring.Monitoring.SubsIDList.getDefaultInstance(); + public monitoring.Monitoring.SubsList getDefaultInstanceForType() { + return monitoring.Monitoring.SubsList.getDefaultInstance(); } @java.lang.Override - public monitoring.Monitoring.SubsIDList build() { - monitoring.Monitoring.SubsIDList result = buildPartial(); + public monitoring.Monitoring.SubsList build() { + monitoring.Monitoring.SubsList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -13559,17 +13215,17 @@ public final class Monitoring { } @java.lang.Override - public monitoring.Monitoring.SubsIDList buildPartial() { - monitoring.Monitoring.SubsIDList result = new monitoring.Monitoring.SubsIDList(this); + public monitoring.Monitoring.SubsList buildPartial() { + monitoring.Monitoring.SubsList result = new monitoring.Monitoring.SubsList(this); int from_bitField0_ = bitField0_; - if (subsListBuilder_ == null) { + if (subsDescriptorBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - subsList_ = java.util.Collections.unmodifiableList(subsList_); + subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); bitField0_ = (bitField0_ & ~0x00000001); } - result.subsList_ = subsList_; + result.subsDescriptor_ = subsDescriptor_; } else { - result.subsList_ = subsListBuilder_.build(); + result.subsDescriptor_ = subsDescriptorBuilder_.build(); } onBuilt(); return result; @@ -13609,39 +13265,39 @@ public final class Monitoring { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubsIDList) { - return mergeFrom((monitoring.Monitoring.SubsIDList)other); + if (other instanceof monitoring.Monitoring.SubsList) { + return mergeFrom((monitoring.Monitoring.SubsList)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(monitoring.Monitoring.SubsIDList other) { - if (other == monitoring.Monitoring.SubsIDList.getDefaultInstance()) return this; - if (subsListBuilder_ == null) { - if (!other.subsList_.isEmpty()) { - if (subsList_.isEmpty()) { - subsList_ = other.subsList_; + public Builder mergeFrom(monitoring.Monitoring.SubsList other) { + if (other == monitoring.Monitoring.SubsList.getDefaultInstance()) return this; + if (subsDescriptorBuilder_ == null) { + if (!other.subsDescriptor_.isEmpty()) { + if (subsDescriptor_.isEmpty()) { + subsDescriptor_ = other.subsDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureSubsListIsMutable(); - subsList_.addAll(other.subsList_); + ensureSubsDescriptorIsMutable(); + subsDescriptor_.addAll(other.subsDescriptor_); } onChanged(); } } else { - if (!other.subsList_.isEmpty()) { - if (subsListBuilder_.isEmpty()) { - subsListBuilder_.dispose(); - subsListBuilder_ = null; - subsList_ = other.subsList_; + if (!other.subsDescriptor_.isEmpty()) { + if (subsDescriptorBuilder_.isEmpty()) { + subsDescriptorBuilder_.dispose(); + subsDescriptorBuilder_ = null; + subsDescriptor_ = other.subsDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); - subsListBuilder_ = + subsDescriptorBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubsListFieldBuilder() : null; + getSubsDescriptorFieldBuilder() : null; } else { - subsListBuilder_.addAllMessages(other.subsList_); + subsDescriptorBuilder_.addAllMessages(other.subsDescriptor_); } } } @@ -13660,11 +13316,11 @@ public final class Monitoring { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.SubsIDList parsedMessage = null; + monitoring.Monitoring.SubsList parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsIDList) e.getUnfinishedMessage(); + parsedMessage = (monitoring.Monitoring.SubsList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -13675,244 +13331,244 @@ public final class Monitoring { } private int bitField0_; - private java.util.List subsList_ = + private java.util.List subsDescriptor_ = java.util.Collections.emptyList(); - private void ensureSubsListIsMutable() { + private void ensureSubsDescriptorIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - subsList_ = new java.util.ArrayList(subsList_); + subsDescriptor_ = new java.util.ArrayList(subsDescriptor_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> subsListBuilder_; + monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder> subsDescriptorBuilder_; /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public java.util.List getSubsListList() { - if (subsListBuilder_ == null) { - return java.util.Collections.unmodifiableList(subsList_); + public java.util.List getSubsDescriptorList() { + if (subsDescriptorBuilder_ == null) { + return java.util.Collections.unmodifiableList(subsDescriptor_); } else { - return subsListBuilder_.getMessageList(); + return subsDescriptorBuilder_.getMessageList(); } } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public int getSubsListCount() { - if (subsListBuilder_ == null) { - return subsList_.size(); + public int getSubsDescriptorCount() { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.size(); } else { - return subsListBuilder_.getCount(); + return subsDescriptorBuilder_.getCount(); } } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public monitoring.Monitoring.SubscriptionID getSubsList(int index) { - if (subsListBuilder_ == null) { - return subsList_.get(index); + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.get(index); } else { - return subsListBuilder_.getMessage(index); + return subsDescriptorBuilder_.getMessage(index); } } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public Builder setSubsList( - int index, monitoring.Monitoring.SubscriptionID value) { - if (subsListBuilder_ == null) { + public Builder setSubsDescriptor( + int index, monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubsListIsMutable(); - subsList_.set(index, value); + ensureSubsDescriptorIsMutable(); + subsDescriptor_.set(index, value); onChanged(); } else { - subsListBuilder_.setMessage(index, value); + subsDescriptorBuilder_.setMessage(index, value); } return this; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public Builder setSubsList( - int index, monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); - subsList_.set(index, builderForValue.build()); + public Builder setSubsDescriptor( + int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.set(index, builderForValue.build()); onChanged(); } else { - subsListBuilder_.setMessage(index, builderForValue.build()); + subsDescriptorBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public Builder addSubsList(monitoring.Monitoring.SubscriptionID value) { - if (subsListBuilder_ == null) { + public Builder addSubsDescriptor(monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubsListIsMutable(); - subsList_.add(value); + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(value); onChanged(); } else { - subsListBuilder_.addMessage(value); + subsDescriptorBuilder_.addMessage(value); } return this; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public Builder addSubsList( - int index, monitoring.Monitoring.SubscriptionID value) { - if (subsListBuilder_ == null) { + public Builder addSubsDescriptor( + int index, monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubsListIsMutable(); - subsList_.add(index, value); + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(index, value); onChanged(); } else { - subsListBuilder_.addMessage(index, value); + subsDescriptorBuilder_.addMessage(index, value); } return this; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public Builder addSubsList( - monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); - subsList_.add(builderForValue.build()); + public Builder addSubsDescriptor( + monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(builderForValue.build()); onChanged(); } else { - subsListBuilder_.addMessage(builderForValue.build()); + subsDescriptorBuilder_.addMessage(builderForValue.build()); } return this; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public Builder addSubsList( - int index, monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); - subsList_.add(index, builderForValue.build()); + public Builder addSubsDescriptor( + int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(index, builderForValue.build()); onChanged(); } else { - subsListBuilder_.addMessage(index, builderForValue.build()); + subsDescriptorBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public Builder addAllSubsList( - java.lang.Iterable values) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); + public Builder addAllSubsDescriptor( + java.lang.Iterable values) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subsList_); + values, subsDescriptor_); onChanged(); } else { - subsListBuilder_.addAllMessages(values); + subsDescriptorBuilder_.addAllMessages(values); } return this; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public Builder clearSubsList() { - if (subsListBuilder_ == null) { - subsList_ = java.util.Collections.emptyList(); + public Builder clearSubsDescriptor() { + if (subsDescriptorBuilder_ == null) { + subsDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - subsListBuilder_.clear(); + subsDescriptorBuilder_.clear(); } return this; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public Builder removeSubsList(int index) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); - subsList_.remove(index); + public Builder removeSubsDescriptor(int index) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.remove(index); onChanged(); } else { - subsListBuilder_.remove(index); + subsDescriptorBuilder_.remove(index); } return this; } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public monitoring.Monitoring.SubscriptionID.Builder getSubsListBuilder( + public monitoring.Monitoring.SubsDescriptor.Builder getSubsDescriptorBuilder( int index) { - return getSubsListFieldBuilder().getBuilder(index); + return getSubsDescriptorFieldBuilder().getBuilder(index); } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsListOrBuilder( + public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( int index) { - if (subsListBuilder_ == null) { - return subsList_.get(index); } else { - return subsListBuilder_.getMessageOrBuilder(index); + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.get(index); } else { + return subsDescriptorBuilder_.getMessageOrBuilder(index); } } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public java.util.List - getSubsListOrBuilderList() { - if (subsListBuilder_ != null) { - return subsListBuilder_.getMessageOrBuilderList(); + public java.util.List + getSubsDescriptorOrBuilderList() { + if (subsDescriptorBuilder_ != null) { + return subsDescriptorBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(subsList_); + return java.util.Collections.unmodifiableList(subsDescriptor_); } } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public monitoring.Monitoring.SubscriptionID.Builder addSubsListBuilder() { - return getSubsListFieldBuilder().addBuilder( - monitoring.Monitoring.SubscriptionID.getDefaultInstance()); + public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder() { + return getSubsDescriptorFieldBuilder().addBuilder( + monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public monitoring.Monitoring.SubscriptionID.Builder addSubsListBuilder( + public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder( int index) { - return getSubsListFieldBuilder().addBuilder( - index, monitoring.Monitoring.SubscriptionID.getDefaultInstance()); + return getSubsDescriptorFieldBuilder().addBuilder( + index, monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); } /** - * repeated .monitoring.SubscriptionID subs_list = 1; + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; */ - public java.util.List - getSubsListBuilderList() { - return getSubsListFieldBuilder().getBuilderList(); + public java.util.List + getSubsDescriptorBuilderList() { + return getSubsDescriptorFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> - getSubsListFieldBuilder() { - if (subsListBuilder_ == null) { - subsListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder>( - subsList_, + monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder> + getSubsDescriptorFieldBuilder() { + if (subsDescriptorBuilder_ == null) { + subsDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder>( + subsDescriptor_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - subsList_ = null; + subsDescriptor_ = null; } - return subsListBuilder_; + return subsDescriptorBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -13927,41 +13583,41 @@ public final class Monitoring { } - // @@protoc_insertion_point(builder_scope:monitoring.SubsIDList) + // @@protoc_insertion_point(builder_scope:monitoring.SubsList) } - // @@protoc_insertion_point(class_scope:monitoring.SubsIDList) - private static final monitoring.Monitoring.SubsIDList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:monitoring.SubsList) + private static final monitoring.Monitoring.SubsList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubsIDList(); + DEFAULT_INSTANCE = new monitoring.Monitoring.SubsList(); } - public static monitoring.Monitoring.SubsIDList getDefaultInstance() { + public static monitoring.Monitoring.SubsList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public SubsIDList parsePartialFrom( + public SubsList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubsIDList(input, extensionRegistry); + return new SubsList(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public monitoring.Monitoring.SubsIDList getDefaultInstanceForType() { + public monitoring.Monitoring.SubsList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -14011,52 +13667,34 @@ public final class Monitoring { getNameBytes(); /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - java.util.List - getKpiIdList(); - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - monitoring.Monitoring.KpiId getKpiId(int index); - /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; + * @return Whether the kpiId field is set. */ - int getKpiIdCount(); + boolean hasKpiId(); /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; + * @return The kpiId. */ - java.util.List - getKpiIdOrBuilderList(); + monitoring.Monitoring.KpiId getKpiId(); /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( - int index); + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - java.util.List - getKpiValueRangeList(); - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - monitoring.Monitoring.KpiValueRange getKpiValueRange(int index); - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return Whether the kpiValueRange field is set. */ - int getKpiValueRangeCount(); + boolean hasKpiValueRange(); /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return The kpiValueRange. */ - java.util.List - getKpiValueRangeOrBuilderList(); + monitoring.Monitoring.KpiValueRange getKpiValueRange(); /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; */ - monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder( - int index); + monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder(); /** * .context.Timestamp timestamp = 6; @@ -14088,8 +13726,6 @@ public final class Monitoring { private AlarmDescriptor() { alarmDescription_ = ""; name_ = ""; - kpiId_ = java.util.Collections.emptyList(); - kpiValueRange_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -14112,7 +13748,6 @@ public final class Monitoring { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -14149,21 +13784,29 @@ public final class Monitoring { break; } case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiId_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; + monitoring.Monitoring.KpiId.Builder subBuilder = null; + if (kpiId_ != null) { + subBuilder = kpiId_.toBuilder(); } - kpiId_.add( - input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry)); + kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kpiId_); + kpiId_ = subBuilder.buildPartial(); + } + break; } case 42: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - kpiValueRange_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; + monitoring.Monitoring.KpiValueRange.Builder subBuilder = null; + if (kpiValueRange_ != null) { + subBuilder = kpiValueRange_.toBuilder(); + } + kpiValueRange_ = input.readMessage(monitoring.Monitoring.KpiValueRange.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kpiValueRange_); + kpiValueRange_ = subBuilder.buildPartial(); } - kpiValueRange_.add( - input.readMessage(monitoring.Monitoring.KpiValueRange.parser(), extensionRegistry)); + break; } case 50: { @@ -14194,12 +13837,6 @@ public final class Monitoring { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiId_ = java.util.Collections.unmodifiableList(kpiId_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - kpiValueRange_ = java.util.Collections.unmodifiableList(kpiValueRange_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -14320,83 +13957,55 @@ public final class Monitoring { } public static final int KPI_ID_FIELD_NUMBER = 4; - private java.util.List kpiId_; - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - @java.lang.Override - public java.util.List getKpiIdList() { - return kpiId_; - } - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - @java.lang.Override - public java.util.List - getKpiIdOrBuilderList() { - return kpiId_; - } + private monitoring.Monitoring.KpiId kpiId_; /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; + * @return Whether the kpiId field is set. */ @java.lang.Override - public int getKpiIdCount() { - return kpiId_.size(); + public boolean hasKpiId() { + return kpiId_ != null; } /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; + * @return The kpiId. */ @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId(int index) { - return kpiId_.get(index); + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; */ @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( - int index) { - return kpiId_.get(index); + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); } public static final int KPI_VALUE_RANGE_FIELD_NUMBER = 5; - private java.util.List kpiValueRange_; - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - @java.lang.Override - public java.util.List getKpiValueRangeList() { - return kpiValueRange_; - } - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - @java.lang.Override - public java.util.List - getKpiValueRangeOrBuilderList() { - return kpiValueRange_; - } + private monitoring.Monitoring.KpiValueRange kpiValueRange_; /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return Whether the kpiValueRange field is set. */ @java.lang.Override - public int getKpiValueRangeCount() { - return kpiValueRange_.size(); + public boolean hasKpiValueRange() { + return kpiValueRange_ != null; } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return The kpiValueRange. */ @java.lang.Override - public monitoring.Monitoring.KpiValueRange getKpiValueRange(int index) { - return kpiValueRange_.get(index); + public monitoring.Monitoring.KpiValueRange getKpiValueRange() { + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; */ @java.lang.Override - public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder( - int index) { - return kpiValueRange_.get(index); + public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { + return getKpiValueRange(); } public static final int TIMESTAMP_FIELD_NUMBER = 6; @@ -14448,11 +14057,11 @@ public final class Monitoring { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } - for (int i = 0; i < kpiId_.size(); i++) { - output.writeMessage(4, kpiId_.get(i)); + if (kpiId_ != null) { + output.writeMessage(4, getKpiId()); } - for (int i = 0; i < kpiValueRange_.size(); i++) { - output.writeMessage(5, kpiValueRange_.get(i)); + if (kpiValueRange_ != null) { + output.writeMessage(5, getKpiValueRange()); } if (timestamp_ != null) { output.writeMessage(6, getTimestamp()); @@ -14476,13 +14085,13 @@ public final class Monitoring { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } - for (int i = 0; i < kpiId_.size(); i++) { + if (kpiId_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, kpiId_.get(i)); + .computeMessageSize(4, getKpiId()); } - for (int i = 0; i < kpiValueRange_.size(); i++) { + if (kpiValueRange_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, kpiValueRange_.get(i)); + .computeMessageSize(5, getKpiValueRange()); } if (timestamp_ != null) { size += com.google.protobuf.CodedOutputStream @@ -14512,10 +14121,16 @@ public final class Monitoring { .equals(other.getAlarmDescription())) return false; if (!getName() .equals(other.getName())) return false; - if (!getKpiIdList() - .equals(other.getKpiIdList())) return false; - if (!getKpiValueRangeList() - .equals(other.getKpiValueRangeList())) return false; + if (hasKpiId() != other.hasKpiId()) return false; + if (hasKpiId()) { + if (!getKpiId() + .equals(other.getKpiId())) return false; + } + if (hasKpiValueRange() != other.hasKpiValueRange()) return false; + if (hasKpiValueRange()) { + if (!getKpiValueRange() + .equals(other.getKpiValueRange())) return false; + } if (hasTimestamp() != other.hasTimestamp()) return false; if (hasTimestamp()) { if (!getTimestamp() @@ -14540,13 +14155,13 @@ public final class Monitoring { hash = (53 * hash) + getAlarmDescription().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - if (getKpiIdCount() > 0) { + if (hasKpiId()) { hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiIdList().hashCode(); + hash = (53 * hash) + getKpiId().hashCode(); } - if (getKpiValueRangeCount() > 0) { + if (hasKpiValueRange()) { hash = (37 * hash) + KPI_VALUE_RANGE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValueRangeList().hashCode(); + hash = (53 * hash) + getKpiValueRange().hashCode(); } if (hasTimestamp()) { hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; @@ -14680,8 +14295,6 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getKpiIdFieldBuilder(); - getKpiValueRangeFieldBuilder(); } } @java.lang.Override @@ -14698,16 +14311,16 @@ public final class Monitoring { name_ = ""; if (kpiIdBuilder_ == null) { - kpiId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; } else { - kpiIdBuilder_.clear(); + kpiId_ = null; + kpiIdBuilder_ = null; } if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + kpiValueRange_ = null; } else { - kpiValueRangeBuilder_.clear(); + kpiValueRange_ = null; + kpiValueRangeBuilder_ = null; } if (timestampBuilder_ == null) { timestamp_ = null; @@ -14741,7 +14354,6 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.AlarmDescriptor buildPartial() { monitoring.Monitoring.AlarmDescriptor result = new monitoring.Monitoring.AlarmDescriptor(this); - int from_bitField0_ = bitField0_; if (alarmIdBuilder_ == null) { result.alarmId_ = alarmId_; } else { @@ -14750,19 +14362,11 @@ public final class Monitoring { result.alarmDescription_ = alarmDescription_; result.name_ = name_; if (kpiIdBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiId_ = java.util.Collections.unmodifiableList(kpiId_); - bitField0_ = (bitField0_ & ~0x00000001); - } result.kpiId_ = kpiId_; } else { result.kpiId_ = kpiIdBuilder_.build(); } if (kpiValueRangeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - kpiValueRange_ = java.util.Collections.unmodifiableList(kpiValueRange_); - bitField0_ = (bitField0_ & ~0x00000002); - } result.kpiValueRange_ = kpiValueRange_; } else { result.kpiValueRange_ = kpiValueRangeBuilder_.build(); @@ -14831,57 +14435,11 @@ public final class Monitoring { name_ = other.name_; onChanged(); } - if (kpiIdBuilder_ == null) { - if (!other.kpiId_.isEmpty()) { - if (kpiId_.isEmpty()) { - kpiId_ = other.kpiId_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiIdIsMutable(); - kpiId_.addAll(other.kpiId_); - } - onChanged(); - } - } else { - if (!other.kpiId_.isEmpty()) { - if (kpiIdBuilder_.isEmpty()) { - kpiIdBuilder_.dispose(); - kpiIdBuilder_ = null; - kpiId_ = other.kpiId_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiIdBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiIdFieldBuilder() : null; - } else { - kpiIdBuilder_.addAllMessages(other.kpiId_); - } - } + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); } - if (kpiValueRangeBuilder_ == null) { - if (!other.kpiValueRange_.isEmpty()) { - if (kpiValueRange_.isEmpty()) { - kpiValueRange_ = other.kpiValueRange_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.addAll(other.kpiValueRange_); - } - onChanged(); - } - } else { - if (!other.kpiValueRange_.isEmpty()) { - if (kpiValueRangeBuilder_.isEmpty()) { - kpiValueRangeBuilder_.dispose(); - kpiValueRangeBuilder_ = null; - kpiValueRange_ = other.kpiValueRange_; - bitField0_ = (bitField0_ & ~0x00000002); - kpiValueRangeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiValueRangeFieldBuilder() : null; - } else { - kpiValueRangeBuilder_.addAllMessages(other.kpiValueRange_); - } - } + if (other.hasKpiValueRange()) { + mergeKpiValueRange(other.getKpiValueRange()); } if (other.hasTimestamp()) { mergeTimestamp(other.getTimestamp()); @@ -14914,7 +14472,6 @@ public final class Monitoring { } return this; } - private int bitField0_; private monitoring.Monitoring.AlarmID alarmId_; private com.google.protobuf.SingleFieldBuilderV3< @@ -15187,239 +14744,118 @@ public final class Monitoring { return this; } - private java.util.List kpiId_ = - java.util.Collections.emptyList(); - private void ensureKpiIdIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiId_ = new java.util.ArrayList(kpiId_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< + private monitoring.Monitoring.KpiId kpiId_; + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - public java.util.List getKpiIdList() { - if (kpiIdBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiId_); - } else { - return kpiIdBuilder_.getMessageList(); - } - } /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; + * @return Whether the kpiId field is set. */ - public int getKpiIdCount() { - if (kpiIdBuilder_ == null) { - return kpiId_.size(); - } else { - return kpiIdBuilder_.getCount(); - } + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; } /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; + * @return The kpiId. */ - public monitoring.Monitoring.KpiId getKpiId(int index) { + public monitoring.Monitoring.KpiId getKpiId() { if (kpiIdBuilder_ == null) { - return kpiId_.get(index); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } else { - return kpiIdBuilder_.getMessage(index); + return kpiIdBuilder_.getMessage(); } } /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; */ - public Builder setKpiId( - int index, monitoring.Monitoring.KpiId value) { + public Builder setKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiIdIsMutable(); - kpiId_.set(index, value); + kpiId_ = value; onChanged(); } else { - kpiIdBuilder_.setMessage(index, value); + kpiIdBuilder_.setMessage(value); } + return this; } /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; */ public Builder setKpiId( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiIdBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - public Builder addKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdIsMutable(); - kpiId_.add(value); - onChanged(); - } else { - kpiIdBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - public Builder addKpiId( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdIsMutable(); - kpiId_.add(index, value); - onChanged(); - } else { - kpiIdBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - public Builder addKpiId( monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.add(builderForValue.build()); - onChanged(); - } else { - kpiIdBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - public Builder addKpiId( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.add(index, builderForValue.build()); + kpiId_ = builderForValue.build(); onChanged(); } else { - kpiIdBuilder_.addMessage(index, builderForValue.build()); + kpiIdBuilder_.setMessage(builderForValue.build()); } + return this; } /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; */ - public Builder addAllKpiId( - java.lang.Iterable values) { + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiId_); + if (kpiId_ != null) { + kpiId_ = + monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } onChanged(); } else { - kpiIdBuilder_.addAllMessages(values); + kpiIdBuilder_.mergeFrom(value); } + return this; } /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; */ public Builder clearKpiId() { if (kpiIdBuilder_ == null) { - kpiId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiIdBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - public Builder removeKpiId(int index) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.remove(index); + kpiId_ = null; onChanged(); } else { - kpiIdBuilder_.remove(index); + kpiId_ = null; + kpiIdBuilder_ = null; } + return this; } /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder( - int index) { - return getKpiIdFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( - int index) { - if (kpiIdBuilder_ == null) { - return kpiId_.get(index); } else { - return kpiIdBuilder_.getMessageOrBuilder(index); - } + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); } /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; */ - public java.util.List - getKpiIdOrBuilderList() { + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilderList(); + return kpiIdBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(kpiId_); + return kpiId_ == null ? + monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } } /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdBuilder() { - return getKpiIdFieldBuilder().addBuilder( - monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_id = 4; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdBuilder( - int index) { - return getKpiIdFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_id = 4; + * .monitoring.KpiId kpi_id = 4; */ - public java.util.List - getKpiIdBuilderList() { - return getKpiIdFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> getKpiIdFieldBuilder() { if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - kpiId_, - ((bitField0_ & 0x00000001) != 0), + getKpiId(), getParentForChildren(), isClean()); kpiId_ = null; @@ -15427,239 +14863,118 @@ public final class Monitoring { return kpiIdBuilder_; } - private java.util.List kpiValueRange_ = - java.util.Collections.emptyList(); - private void ensureKpiValueRangeIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - kpiValueRange_ = new java.util.ArrayList(kpiValueRange_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< + private monitoring.Monitoring.KpiValueRange kpiValueRange_; + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder> kpiValueRangeBuilder_; - - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - public java.util.List getKpiValueRangeList() { - if (kpiValueRangeBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiValueRange_); - } else { - return kpiValueRangeBuilder_.getMessageList(); - } - } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return Whether the kpiValueRange field is set. */ - public int getKpiValueRangeCount() { - if (kpiValueRangeBuilder_ == null) { - return kpiValueRange_.size(); - } else { - return kpiValueRangeBuilder_.getCount(); - } + public boolean hasKpiValueRange() { + return kpiValueRangeBuilder_ != null || kpiValueRange_ != null; } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return The kpiValueRange. */ - public monitoring.Monitoring.KpiValueRange getKpiValueRange(int index) { + public monitoring.Monitoring.KpiValueRange getKpiValueRange() { if (kpiValueRangeBuilder_ == null) { - return kpiValueRange_.get(index); + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; } else { - return kpiValueRangeBuilder_.getMessage(index); + return kpiValueRangeBuilder_.getMessage(); } } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; */ - public Builder setKpiValueRange( - int index, monitoring.Monitoring.KpiValueRange value) { + public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange value) { if (kpiValueRangeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiValueRangeIsMutable(); - kpiValueRange_.set(index, value); + kpiValueRange_ = value; onChanged(); } else { - kpiValueRangeBuilder_.setMessage(index, value); + kpiValueRangeBuilder_.setMessage(value); } + return this; } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; */ public Builder setKpiValueRange( - int index, monitoring.Monitoring.KpiValueRange.Builder builderForValue) { - if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiValueRangeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder addKpiValueRange(monitoring.Monitoring.KpiValueRange value) { - if (kpiValueRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiValueRangeIsMutable(); - kpiValueRange_.add(value); - onChanged(); - } else { - kpiValueRangeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder addKpiValueRange( - int index, monitoring.Monitoring.KpiValueRange value) { - if (kpiValueRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiValueRangeIsMutable(); - kpiValueRange_.add(index, value); - onChanged(); - } else { - kpiValueRangeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder addKpiValueRange( monitoring.Monitoring.KpiValueRange.Builder builderForValue) { if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.add(builderForValue.build()); - onChanged(); - } else { - kpiValueRangeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder addKpiValueRange( - int index, monitoring.Monitoring.KpiValueRange.Builder builderForValue) { - if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.add(index, builderForValue.build()); + kpiValueRange_ = builderForValue.build(); onChanged(); } else { - kpiValueRangeBuilder_.addMessage(index, builderForValue.build()); + kpiValueRangeBuilder_.setMessage(builderForValue.build()); } + return this; } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; */ - public Builder addAllKpiValueRange( - java.lang.Iterable values) { + public Builder mergeKpiValueRange(monitoring.Monitoring.KpiValueRange value) { if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiValueRange_); + if (kpiValueRange_ != null) { + kpiValueRange_ = + monitoring.Monitoring.KpiValueRange.newBuilder(kpiValueRange_).mergeFrom(value).buildPartial(); + } else { + kpiValueRange_ = value; + } onChanged(); } else { - kpiValueRangeBuilder_.addAllMessages(values); + kpiValueRangeBuilder_.mergeFrom(value); } + return this; } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; */ public Builder clearKpiValueRange() { if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - kpiValueRangeBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder removeKpiValueRange(int index) { - if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.remove(index); + kpiValueRange_ = null; onChanged(); } else { - kpiValueRangeBuilder_.remove(index); + kpiValueRange_ = null; + kpiValueRangeBuilder_ = null; } + return this; } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder( - int index) { - return getKpiValueRangeFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; */ - public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder( - int index) { - if (kpiValueRangeBuilder_ == null) { - return kpiValueRange_.get(index); } else { - return kpiValueRangeBuilder_.getMessageOrBuilder(index); - } + public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder() { + + onChanged(); + return getKpiValueRangeFieldBuilder().getBuilder(); } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; */ - public java.util.List - getKpiValueRangeOrBuilderList() { + public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { if (kpiValueRangeBuilder_ != null) { - return kpiValueRangeBuilder_.getMessageOrBuilderList(); + return kpiValueRangeBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(kpiValueRange_); + return kpiValueRange_ == null ? + monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; } } /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - public monitoring.Monitoring.KpiValueRange.Builder addKpiValueRangeBuilder() { - return getKpiValueRangeFieldBuilder().addBuilder( - monitoring.Monitoring.KpiValueRange.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; - */ - public monitoring.Monitoring.KpiValueRange.Builder addKpiValueRangeBuilder( - int index) { - return getKpiValueRangeFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiValueRange.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiValueRange kpi_value_range = 5; + * .monitoring.KpiValueRange kpi_value_range = 5; */ - public java.util.List - getKpiValueRangeBuilderList() { - return getKpiValueRangeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder> getKpiValueRangeFieldBuilder() { if (kpiValueRangeBuilder_ == null) { - kpiValueRangeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + kpiValueRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder>( - kpiValueRange_, - ((bitField0_ & 0x00000002) != 0), + getKpiValueRange(), getParentForChildren(), isClean()); kpiValueRange_ = null; @@ -16464,19 +15779,19 @@ public final class Monitoring { com.google.protobuf.MessageOrBuilder { /** - * .monitoring.AlarmID alarmID = 1; - * @return Whether the alarmID field is set. + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. */ - boolean hasAlarmID(); + boolean hasAlarmId(); /** - * .monitoring.AlarmID alarmID = 1; - * @return The alarmID. + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. */ - monitoring.Monitoring.AlarmID getAlarmID(); + monitoring.Monitoring.AlarmID getAlarmId(); /** - * .monitoring.AlarmID alarmID = 1; + * .monitoring.AlarmID alarm_id = 1; */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmIDOrBuilder(); + monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); /** * float subscription_timeout_s = 2; @@ -16537,13 +15852,13 @@ public final class Monitoring { break; case 10: { monitoring.Monitoring.AlarmID.Builder subBuilder = null; - if (alarmID_ != null) { - subBuilder = alarmID_.toBuilder(); + if (alarmId_ != null) { + subBuilder = alarmId_.toBuilder(); } - alarmID_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry); + alarmId_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(alarmID_); - alarmID_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(alarmId_); + alarmId_ = subBuilder.buildPartial(); } break; @@ -16590,30 +15905,30 @@ public final class Monitoring { monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); } - public static final int ALARMID_FIELD_NUMBER = 1; - private monitoring.Monitoring.AlarmID alarmID_; + public static final int ALARM_ID_FIELD_NUMBER = 1; + private monitoring.Monitoring.AlarmID alarmId_; /** - * .monitoring.AlarmID alarmID = 1; - * @return Whether the alarmID field is set. + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. */ @java.lang.Override - public boolean hasAlarmID() { - return alarmID_ != null; + public boolean hasAlarmId() { + return alarmId_ != null; } /** - * .monitoring.AlarmID alarmID = 1; - * @return The alarmID. + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. */ @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmID() { - return alarmID_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmID_; + public monitoring.Monitoring.AlarmID getAlarmId() { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; } /** - * .monitoring.AlarmID alarmID = 1; + * .monitoring.AlarmID alarm_id = 1; */ @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIDOrBuilder() { - return getAlarmID(); + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); } public static final int SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER = 2; @@ -16652,8 +15967,8 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (alarmID_ != null) { - output.writeMessage(1, getAlarmID()); + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); } if (subscriptionTimeoutS_ != 0F) { output.writeFloat(2, subscriptionTimeoutS_); @@ -16670,9 +15985,9 @@ public final class Monitoring { if (size != -1) return size; size = 0; - if (alarmID_ != null) { + if (alarmId_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmID()); + .computeMessageSize(1, getAlarmId()); } if (subscriptionTimeoutS_ != 0F) { size += com.google.protobuf.CodedOutputStream @@ -16697,10 +16012,10 @@ public final class Monitoring { } monitoring.Monitoring.AlarmSubscription other = (monitoring.Monitoring.AlarmSubscription) obj; - if (hasAlarmID() != other.hasAlarmID()) return false; - if (hasAlarmID()) { - if (!getAlarmID() - .equals(other.getAlarmID())) return false; + if (hasAlarmId() != other.hasAlarmId()) return false; + if (hasAlarmId()) { + if (!getAlarmId() + .equals(other.getAlarmId())) return false; } if (java.lang.Float.floatToIntBits(getSubscriptionTimeoutS()) != java.lang.Float.floatToIntBits( @@ -16719,9 +16034,9 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmID()) { - hash = (37 * hash) + ALARMID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmID().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); } hash = (37 * hash) + SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( @@ -16862,12 +16177,12 @@ public final class Monitoring { @java.lang.Override public Builder clear() { super.clear(); - if (alarmIDBuilder_ == null) { - alarmID_ = null; + if (alarmIdBuilder_ == null) { + alarmId_ = null; } else { - alarmID_ = null; - alarmIDBuilder_ = null; - } + alarmId_ = null; + alarmIdBuilder_ = null; + } subscriptionTimeoutS_ = 0F; subscriptionFrequencyMs_ = 0F; @@ -16898,10 +16213,10 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.AlarmSubscription buildPartial() { monitoring.Monitoring.AlarmSubscription result = new monitoring.Monitoring.AlarmSubscription(this); - if (alarmIDBuilder_ == null) { - result.alarmID_ = alarmID_; + if (alarmIdBuilder_ == null) { + result.alarmId_ = alarmId_; } else { - result.alarmID_ = alarmIDBuilder_.build(); + result.alarmId_ = alarmIdBuilder_.build(); } result.subscriptionTimeoutS_ = subscriptionTimeoutS_; result.subscriptionFrequencyMs_ = subscriptionFrequencyMs_; @@ -16953,8 +16268,8 @@ public final class Monitoring { public Builder mergeFrom(monitoring.Monitoring.AlarmSubscription other) { if (other == monitoring.Monitoring.AlarmSubscription.getDefaultInstance()) return this; - if (other.hasAlarmID()) { - mergeAlarmID(other.getAlarmID()); + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); } if (other.getSubscriptionTimeoutS() != 0F) { setSubscriptionTimeoutS(other.getSubscriptionTimeoutS()); @@ -16991,123 +16306,123 @@ public final class Monitoring { return this; } - private monitoring.Monitoring.AlarmID alarmID_; + private monitoring.Monitoring.AlarmID alarmId_; private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIDBuilder_; + monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; /** - * .monitoring.AlarmID alarmID = 1; - * @return Whether the alarmID field is set. + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. */ - public boolean hasAlarmID() { - return alarmIDBuilder_ != null || alarmID_ != null; + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; } /** - * .monitoring.AlarmID alarmID = 1; - * @return The alarmID. + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. */ - public monitoring.Monitoring.AlarmID getAlarmID() { - if (alarmIDBuilder_ == null) { - return alarmID_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmID_; + public monitoring.Monitoring.AlarmID getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; } else { - return alarmIDBuilder_.getMessage(); + return alarmIdBuilder_.getMessage(); } } /** - * .monitoring.AlarmID alarmID = 1; + * .monitoring.AlarmID alarm_id = 1; */ - public Builder setAlarmID(monitoring.Monitoring.AlarmID value) { - if (alarmIDBuilder_ == null) { + public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - alarmID_ = value; + alarmId_ = value; onChanged(); } else { - alarmIDBuilder_.setMessage(value); + alarmIdBuilder_.setMessage(value); } return this; } /** - * .monitoring.AlarmID alarmID = 1; + * .monitoring.AlarmID alarm_id = 1; */ - public Builder setAlarmID( + public Builder setAlarmId( monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmIDBuilder_ == null) { - alarmID_ = builderForValue.build(); + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); onChanged(); } else { - alarmIDBuilder_.setMessage(builderForValue.build()); + alarmIdBuilder_.setMessage(builderForValue.build()); } return this; } /** - * .monitoring.AlarmID alarmID = 1; + * .monitoring.AlarmID alarm_id = 1; */ - public Builder mergeAlarmID(monitoring.Monitoring.AlarmID value) { - if (alarmIDBuilder_ == null) { - if (alarmID_ != null) { - alarmID_ = - monitoring.Monitoring.AlarmID.newBuilder(alarmID_).mergeFrom(value).buildPartial(); + public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = + monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); } else { - alarmID_ = value; + alarmId_ = value; } onChanged(); } else { - alarmIDBuilder_.mergeFrom(value); + alarmIdBuilder_.mergeFrom(value); } return this; } /** - * .monitoring.AlarmID alarmID = 1; + * .monitoring.AlarmID alarm_id = 1; */ - public Builder clearAlarmID() { - if (alarmIDBuilder_ == null) { - alarmID_ = null; + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; onChanged(); } else { - alarmID_ = null; - alarmIDBuilder_ = null; + alarmId_ = null; + alarmIdBuilder_ = null; } return this; } /** - * .monitoring.AlarmID alarmID = 1; + * .monitoring.AlarmID alarm_id = 1; */ - public monitoring.Monitoring.AlarmID.Builder getAlarmIDBuilder() { + public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { onChanged(); - return getAlarmIDFieldBuilder().getBuilder(); + return getAlarmIdFieldBuilder().getBuilder(); } /** - * .monitoring.AlarmID alarmID = 1; + * .monitoring.AlarmID alarm_id = 1; */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIDOrBuilder() { - if (alarmIDBuilder_ != null) { - return alarmIDBuilder_.getMessageOrBuilder(); + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); } else { - return alarmID_ == null ? - monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmID_; + return alarmId_ == null ? + monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; } } /** - * .monitoring.AlarmID alarmID = 1; + * .monitoring.AlarmID alarm_id = 1; */ private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmIDFieldBuilder() { - if (alarmIDBuilder_ == null) { - alarmIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - getAlarmID(), + getAlarmId(), getParentForChildren(), isClean()); - alarmID_ = null; + alarmId_ = null; } - return alarmIDBuilder_; + return alarmIdBuilder_; } private float subscriptionTimeoutS_ ; @@ -17256,34 +16571,19 @@ public final class Monitoring { getTextBytes(); /** - * .monitoring.KpiValue kpi_value = 3; - * @return Whether the kpiValue field is set. + * .monitoring.KpiList kpi_list = 3; + * @return Whether the kpiList field is set. */ - boolean hasKpiValue(); + boolean hasKpiList(); /** - * .monitoring.KpiValue kpi_value = 3; - * @return The kpiValue. + * .monitoring.KpiList kpi_list = 3; + * @return The kpiList. */ - monitoring.Monitoring.KpiValue getKpiValue(); + monitoring.Monitoring.KpiList getKpiList(); /** - * .monitoring.KpiValue kpi_value = 3; + * .monitoring.KpiList kpi_list = 3; */ - monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); - - /** - * .context.Timestamp timestamp = 4; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 4; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 4; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); } /** * Protobuf type {@code monitoring.AlarmResponse} @@ -17351,27 +16651,14 @@ public final class Monitoring { break; } case 26: { - monitoring.Monitoring.KpiValue.Builder subBuilder = null; - if (kpiValue_ != null) { - subBuilder = kpiValue_.toBuilder(); - } - kpiValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiValue_); - kpiValue_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); + monitoring.Monitoring.KpiList.Builder subBuilder = null; + if (kpiList_ != null) { + subBuilder = kpiList_.toBuilder(); } - timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); + kpiList_ = input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(kpiList_); + kpiList_ = subBuilder.buildPartial(); } break; @@ -17472,56 +16759,30 @@ public final class Monitoring { } } - public static final int KPI_VALUE_FIELD_NUMBER = 3; - private monitoring.Monitoring.KpiValue kpiValue_; + public static final int KPI_LIST_FIELD_NUMBER = 3; + private monitoring.Monitoring.KpiList kpiList_; /** - * .monitoring.KpiValue kpi_value = 3; - * @return Whether the kpiValue field is set. + * .monitoring.KpiList kpi_list = 3; + * @return Whether the kpiList field is set. */ @java.lang.Override - public boolean hasKpiValue() { - return kpiValue_ != null; + public boolean hasKpiList() { + return kpiList_ != null; } /** - * .monitoring.KpiValue kpi_value = 3; - * @return The kpiValue. + * .monitoring.KpiList kpi_list = 3; + * @return The kpiList. */ @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiValue() { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + public monitoring.Monitoring.KpiList getKpiList() { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } /** - * .monitoring.KpiValue kpi_value = 3; + * .monitoring.KpiList kpi_list = 3; */ @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); - } - - public static final int TIMESTAMP_FIELD_NUMBER = 4; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 4; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 4; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 4; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + return getKpiList(); } private byte memoizedIsInitialized = -1; @@ -17544,11 +16805,8 @@ public final class Monitoring { if (!getTextBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); } - if (kpiValue_ != null) { - output.writeMessage(3, getKpiValue()); - } - if (timestamp_ != null) { - output.writeMessage(4, getTimestamp()); + if (kpiList_ != null) { + output.writeMessage(3, getKpiList()); } unknownFields.writeTo(output); } @@ -17566,13 +16824,9 @@ public final class Monitoring { if (!getTextBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); } - if (kpiValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getKpiValue()); - } - if (timestamp_ != null) { + if (kpiList_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getTimestamp()); + .computeMessageSize(3, getKpiList()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -17596,15 +16850,10 @@ public final class Monitoring { } if (!getText() .equals(other.getText())) return false; - if (hasKpiValue() != other.hasKpiValue()) return false; - if (hasKpiValue()) { - if (!getKpiValue() - .equals(other.getKpiValue())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; + if (hasKpiList() != other.hasKpiList()) return false; + if (hasKpiList()) { + if (!getKpiList() + .equals(other.getKpiList())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -17623,13 +16872,9 @@ public final class Monitoring { } hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); - if (hasKpiValue()) { - hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValue().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); + if (hasKpiList()) { + hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -17772,17 +17017,11 @@ public final class Monitoring { } text_ = ""; - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; + if (kpiListBuilder_ == null) { + kpiList_ = null; } else { - timestamp_ = null; - timestampBuilder_ = null; + kpiList_ = null; + kpiListBuilder_ = null; } return this; } @@ -17816,15 +17055,10 @@ public final class Monitoring { result.alarmId_ = alarmIdBuilder_.build(); } result.text_ = text_; - if (kpiValueBuilder_ == null) { - result.kpiValue_ = kpiValue_; - } else { - result.kpiValue_ = kpiValueBuilder_.build(); - } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; + if (kpiListBuilder_ == null) { + result.kpiList_ = kpiList_; } else { - result.timestamp_ = timestampBuilder_.build(); + result.kpiList_ = kpiListBuilder_.build(); } onBuilt(); return result; @@ -17881,11 +17115,8 @@ public final class Monitoring { text_ = other.text_; onChanged(); } - if (other.hasKpiValue()) { - mergeKpiValue(other.getKpiValue()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); + if (other.hasKpiList()) { + mergeKpiList(other.getKpiList()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -18111,242 +17342,123 @@ public final class Monitoring { return this; } - private monitoring.Monitoring.KpiValue kpiValue_; + private monitoring.Monitoring.KpiList kpiList_; private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiValueBuilder_; - /** - * .monitoring.KpiValue kpi_value = 3; - * @return Whether the kpiValue field is set. - */ - public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpi_value = 3; - * @return The kpiValue. - */ - public monitoring.Monitoring.KpiValue getKpiValue() { - if (kpiValueBuilder_ == null) { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } else { - return kpiValueBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiValue_ = value; - onChanged(); - } else { - kpiValueBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder setKpiValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiValueBuilder_ == null) { - kpiValue_ = builderForValue.build(); - onChanged(); - } else { - kpiValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); - } else { - kpiValue_ = value; - } - onChanged(); - } else { - kpiValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { - - onChanged(); - return getKpiValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - if (kpiValueBuilder_ != null) { - return kpiValueBuilder_.getMessageOrBuilder(); - } else { - return kpiValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiValueFieldBuilder() { - if (kpiValueBuilder_ == null) { - kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiValue(), - getParentForChildren(), - isClean()); - kpiValue_ = null; - } - return kpiValueBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; + monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> kpiListBuilder_; /** - * .context.Timestamp timestamp = 4; - * @return Whether the timestamp field is set. + * .monitoring.KpiList kpi_list = 3; + * @return Whether the kpiList field is set. */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; + public boolean hasKpiList() { + return kpiListBuilder_ != null || kpiList_ != null; } /** - * .context.Timestamp timestamp = 4; - * @return The timestamp. + * .monitoring.KpiList kpi_list = 3; + * @return The kpiList. */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + public monitoring.Monitoring.KpiList getKpiList() { + if (kpiListBuilder_ == null) { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } else { - return timestampBuilder_.getMessage(); + return kpiListBuilder_.getMessage(); } } /** - * .context.Timestamp timestamp = 4; + * .monitoring.KpiList kpi_list = 3; */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { + public Builder setKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - timestamp_ = value; + kpiList_ = value; onChanged(); } else { - timestampBuilder_.setMessage(value); + kpiListBuilder_.setMessage(value); } return this; } /** - * .context.Timestamp timestamp = 4; + * .monitoring.KpiList kpi_list = 3; */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); + public Builder setKpiList( + monitoring.Monitoring.KpiList.Builder builderForValue) { + if (kpiListBuilder_ == null) { + kpiList_ = builderForValue.build(); onChanged(); } else { - timestampBuilder_.setMessage(builderForValue.build()); + kpiListBuilder_.setMessage(builderForValue.build()); } return this; } /** - * .context.Timestamp timestamp = 4; + * .monitoring.KpiList kpi_list = 3; */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (kpiList_ != null) { + kpiList_ = + monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); } else { - timestamp_ = value; + kpiList_ = value; } onChanged(); } else { - timestampBuilder_.mergeFrom(value); + kpiListBuilder_.mergeFrom(value); } return this; } /** - * .context.Timestamp timestamp = 4; + * .monitoring.KpiList kpi_list = 3; */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; + public Builder clearKpiList() { + if (kpiListBuilder_ == null) { + kpiList_ = null; onChanged(); } else { - timestamp_ = null; - timestampBuilder_ = null; + kpiList_ = null; + kpiListBuilder_ = null; } return this; } /** - * .context.Timestamp timestamp = 4; + * .monitoring.KpiList kpi_list = 3; */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { onChanged(); - return getTimestampFieldBuilder().getBuilder(); + return getKpiListFieldBuilder().getBuilder(); } /** - * .context.Timestamp timestamp = 4; + * .monitoring.KpiList kpi_list = 3; */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + if (kpiListBuilder_ != null) { + return kpiListBuilder_.getMessageOrBuilder(); } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + return kpiList_ == null ? + monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } } /** - * .context.Timestamp timestamp = 4; + * .monitoring.KpiList kpi_list = 3; */ private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), + monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> + getKpiListFieldBuilder() { + if (kpiListBuilder_ == null) { + kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder>( + getKpiList(), getParentForChildren(), isClean()); - timestamp_ = null; + kpiList_ = null; } - return timestampBuilder_; + return kpiListBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -18401,55 +17513,55 @@ public final class Monitoring { } - public interface AlarmIDListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmIDList) + public interface AlarmListOrBuilder extends + // @@protoc_insertion_point(interface_extends:monitoring.AlarmList) com.google.protobuf.MessageOrBuilder { /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - java.util.List - getAlarmListList(); + java.util.List + getAlarmDescriptorList(); /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - monitoring.Monitoring.AlarmID getAlarmList(int index); + monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index); /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - int getAlarmListCount(); + int getAlarmDescriptorCount(); /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - java.util.List - getAlarmListOrBuilderList(); + java.util.List + getAlarmDescriptorOrBuilderList(); /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmListOrBuilder( + monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( int index); } /** - * Protobuf type {@code monitoring.AlarmIDList} + * Protobuf type {@code monitoring.AlarmList} */ - public static final class AlarmIDList extends + public static final class AlarmList extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmIDList) - AlarmIDListOrBuilder { + // @@protoc_insertion_point(message_implements:monitoring.AlarmList) + AlarmListOrBuilder { private static final long serialVersionUID = 0L; - // Use AlarmIDList.newBuilder() to construct. - private AlarmIDList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use AlarmList.newBuilder() to construct. + private AlarmList(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AlarmIDList() { - alarmList_ = java.util.Collections.emptyList(); + private AlarmList() { + alarmDescriptor_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new AlarmIDList(); + return new AlarmList(); } @java.lang.Override @@ -18457,7 +17569,7 @@ public final class Monitoring { getUnknownFields() { return this.unknownFields; } - private AlarmIDList( + private AlarmList( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -18478,11 +17590,11 @@ public final class Monitoring { break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - alarmList_ = new java.util.ArrayList(); + alarmDescriptor_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } - alarmList_.add( - input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry)); + alarmDescriptor_.add( + input.readMessage(monitoring.Monitoring.AlarmDescriptor.parser(), extensionRegistry)); break; } default: { @@ -18501,7 +17613,7 @@ public final class Monitoring { e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - alarmList_ = java.util.Collections.unmodifiableList(alarmList_); + alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -18509,55 +17621,55 @@ public final class Monitoring { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_fieldAccessorTable + return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmIDList.class, monitoring.Monitoring.AlarmIDList.Builder.class); + monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); } - public static final int ALARM_LIST_FIELD_NUMBER = 1; - private java.util.List alarmList_; + public static final int ALARM_DESCRIPTOR_FIELD_NUMBER = 1; + private java.util.List alarmDescriptor_; /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ @java.lang.Override - public java.util.List getAlarmListList() { - return alarmList_; + public java.util.List getAlarmDescriptorList() { + return alarmDescriptor_; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ @java.lang.Override - public java.util.List - getAlarmListOrBuilderList() { - return alarmList_; + public java.util.List + getAlarmDescriptorOrBuilderList() { + return alarmDescriptor_; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ @java.lang.Override - public int getAlarmListCount() { - return alarmList_.size(); + public int getAlarmDescriptorCount() { + return alarmDescriptor_.size(); } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmList(int index) { - return alarmList_.get(index); + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { + return alarmDescriptor_.get(index); } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmListOrBuilder( + public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( int index) { - return alarmList_.get(index); + return alarmDescriptor_.get(index); } private byte memoizedIsInitialized = -1; @@ -18574,8 +17686,8 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < alarmList_.size(); i++) { - output.writeMessage(1, alarmList_.get(i)); + for (int i = 0; i < alarmDescriptor_.size(); i++) { + output.writeMessage(1, alarmDescriptor_.get(i)); } unknownFields.writeTo(output); } @@ -18586,9 +17698,9 @@ public final class Monitoring { if (size != -1) return size; size = 0; - for (int i = 0; i < alarmList_.size(); i++) { + for (int i = 0; i < alarmDescriptor_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, alarmList_.get(i)); + .computeMessageSize(1, alarmDescriptor_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -18600,13 +17712,13 @@ public final class Monitoring { if (obj == this) { return true; } - if (!(obj instanceof monitoring.Monitoring.AlarmIDList)) { + if (!(obj instanceof monitoring.Monitoring.AlarmList)) { return super.equals(obj); } - monitoring.Monitoring.AlarmIDList other = (monitoring.Monitoring.AlarmIDList) obj; + monitoring.Monitoring.AlarmList other = (monitoring.Monitoring.AlarmList) obj; - if (!getAlarmListList() - .equals(other.getAlarmListList())) return false; + if (!getAlarmDescriptorList() + .equals(other.getAlarmDescriptorList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -18618,78 +17730,78 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getAlarmListCount() > 0) { - hash = (37 * hash) + ALARM_LIST_FIELD_NUMBER; - hash = (53 * hash) + getAlarmListList().hashCode(); + if (getAlarmDescriptorCount() > 0) { + hash = (37 * hash) + ALARM_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getAlarmDescriptorList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseFrom(byte[] data) + public static monitoring.Monitoring.AlarmList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseFrom(java.io.InputStream input) + public static monitoring.Monitoring.AlarmList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseDelimitedFrom(java.io.InputStream input) + public static monitoring.Monitoring.AlarmList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static monitoring.Monitoring.AlarmIDList parseDelimitedFrom( + public static monitoring.Monitoring.AlarmList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18702,7 +17814,7 @@ public final class Monitoring { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(monitoring.Monitoring.AlarmIDList prototype) { + public static Builder newBuilder(monitoring.Monitoring.AlarmList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -18718,26 +17830,26 @@ public final class Monitoring { return builder; } /** - * Protobuf type {@code monitoring.AlarmIDList} + * Protobuf type {@code monitoring.AlarmList} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmIDList) - monitoring.Monitoring.AlarmIDListOrBuilder { + // @@protoc_insertion_point(builder_implements:monitoring.AlarmList) + monitoring.Monitoring.AlarmListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_fieldAccessorTable + return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmIDList.class, monitoring.Monitoring.AlarmIDList.Builder.class); + monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); } - // Construct using monitoring.Monitoring.AlarmIDList.newBuilder() + // Construct using monitoring.Monitoring.AlarmList.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -18750,17 +17862,17 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getAlarmListFieldBuilder(); + getAlarmDescriptorFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (alarmListBuilder_ == null) { - alarmList_ = java.util.Collections.emptyList(); + if (alarmDescriptorBuilder_ == null) { + alarmDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - alarmListBuilder_.clear(); + alarmDescriptorBuilder_.clear(); } return this; } @@ -18768,17 +17880,17 @@ public final class Monitoring { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; } @java.lang.Override - public monitoring.Monitoring.AlarmIDList getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmIDList.getDefaultInstance(); + public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmList.getDefaultInstance(); } @java.lang.Override - public monitoring.Monitoring.AlarmIDList build() { - monitoring.Monitoring.AlarmIDList result = buildPartial(); + public monitoring.Monitoring.AlarmList build() { + monitoring.Monitoring.AlarmList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -18786,17 +17898,17 @@ public final class Monitoring { } @java.lang.Override - public monitoring.Monitoring.AlarmIDList buildPartial() { - monitoring.Monitoring.AlarmIDList result = new monitoring.Monitoring.AlarmIDList(this); + public monitoring.Monitoring.AlarmList buildPartial() { + monitoring.Monitoring.AlarmList result = new monitoring.Monitoring.AlarmList(this); int from_bitField0_ = bitField0_; - if (alarmListBuilder_ == null) { + if (alarmDescriptorBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - alarmList_ = java.util.Collections.unmodifiableList(alarmList_); + alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); bitField0_ = (bitField0_ & ~0x00000001); } - result.alarmList_ = alarmList_; + result.alarmDescriptor_ = alarmDescriptor_; } else { - result.alarmList_ = alarmListBuilder_.build(); + result.alarmDescriptor_ = alarmDescriptorBuilder_.build(); } onBuilt(); return result; @@ -18836,39 +17948,39 @@ public final class Monitoring { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmIDList) { - return mergeFrom((monitoring.Monitoring.AlarmIDList)other); + if (other instanceof monitoring.Monitoring.AlarmList) { + return mergeFrom((monitoring.Monitoring.AlarmList)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(monitoring.Monitoring.AlarmIDList other) { - if (other == monitoring.Monitoring.AlarmIDList.getDefaultInstance()) return this; - if (alarmListBuilder_ == null) { - if (!other.alarmList_.isEmpty()) { - if (alarmList_.isEmpty()) { - alarmList_ = other.alarmList_; + public Builder mergeFrom(monitoring.Monitoring.AlarmList other) { + if (other == monitoring.Monitoring.AlarmList.getDefaultInstance()) return this; + if (alarmDescriptorBuilder_ == null) { + if (!other.alarmDescriptor_.isEmpty()) { + if (alarmDescriptor_.isEmpty()) { + alarmDescriptor_ = other.alarmDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureAlarmListIsMutable(); - alarmList_.addAll(other.alarmList_); + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.addAll(other.alarmDescriptor_); } onChanged(); } } else { - if (!other.alarmList_.isEmpty()) { - if (alarmListBuilder_.isEmpty()) { - alarmListBuilder_.dispose(); - alarmListBuilder_ = null; - alarmList_ = other.alarmList_; + if (!other.alarmDescriptor_.isEmpty()) { + if (alarmDescriptorBuilder_.isEmpty()) { + alarmDescriptorBuilder_.dispose(); + alarmDescriptorBuilder_ = null; + alarmDescriptor_ = other.alarmDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); - alarmListBuilder_ = + alarmDescriptorBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAlarmListFieldBuilder() : null; + getAlarmDescriptorFieldBuilder() : null; } else { - alarmListBuilder_.addAllMessages(other.alarmList_); + alarmDescriptorBuilder_.addAllMessages(other.alarmDescriptor_); } } } @@ -18887,11 +17999,11 @@ public final class Monitoring { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.AlarmIDList parsedMessage = null; + monitoring.Monitoring.AlarmList parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmIDList) e.getUnfinishedMessage(); + parsedMessage = (monitoring.Monitoring.AlarmList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -18902,244 +18014,244 @@ public final class Monitoring { } private int bitField0_; - private java.util.List alarmList_ = + private java.util.List alarmDescriptor_ = java.util.Collections.emptyList(); - private void ensureAlarmListIsMutable() { + private void ensureAlarmDescriptorIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - alarmList_ = new java.util.ArrayList(alarmList_); + alarmDescriptor_ = new java.util.ArrayList(alarmDescriptor_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmListBuilder_; + monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder> alarmDescriptorBuilder_; /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public java.util.List getAlarmListList() { - if (alarmListBuilder_ == null) { - return java.util.Collections.unmodifiableList(alarmList_); + public java.util.List getAlarmDescriptorList() { + if (alarmDescriptorBuilder_ == null) { + return java.util.Collections.unmodifiableList(alarmDescriptor_); } else { - return alarmListBuilder_.getMessageList(); + return alarmDescriptorBuilder_.getMessageList(); } } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public int getAlarmListCount() { - if (alarmListBuilder_ == null) { - return alarmList_.size(); + public int getAlarmDescriptorCount() { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.size(); } else { - return alarmListBuilder_.getCount(); + return alarmDescriptorBuilder_.getCount(); } } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public monitoring.Monitoring.AlarmID getAlarmList(int index) { - if (alarmListBuilder_ == null) { - return alarmList_.get(index); + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.get(index); } else { - return alarmListBuilder_.getMessage(index); + return alarmDescriptorBuilder_.getMessage(index); } } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public Builder setAlarmList( - int index, monitoring.Monitoring.AlarmID value) { - if (alarmListBuilder_ == null) { + public Builder setAlarmDescriptor( + int index, monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureAlarmListIsMutable(); - alarmList_.set(index, value); + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.set(index, value); onChanged(); } else { - alarmListBuilder_.setMessage(index, value); + alarmDescriptorBuilder_.setMessage(index, value); } return this; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public Builder setAlarmList( - int index, monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); - alarmList_.set(index, builderForValue.build()); + public Builder setAlarmDescriptor( + int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.set(index, builderForValue.build()); onChanged(); } else { - alarmListBuilder_.setMessage(index, builderForValue.build()); + alarmDescriptorBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public Builder addAlarmList(monitoring.Monitoring.AlarmID value) { - if (alarmListBuilder_ == null) { + public Builder addAlarmDescriptor(monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureAlarmListIsMutable(); - alarmList_.add(value); + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(value); onChanged(); } else { - alarmListBuilder_.addMessage(value); + alarmDescriptorBuilder_.addMessage(value); } return this; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public Builder addAlarmList( - int index, monitoring.Monitoring.AlarmID value) { - if (alarmListBuilder_ == null) { + public Builder addAlarmDescriptor( + int index, monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureAlarmListIsMutable(); - alarmList_.add(index, value); + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(index, value); onChanged(); } else { - alarmListBuilder_.addMessage(index, value); + alarmDescriptorBuilder_.addMessage(index, value); } return this; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public Builder addAlarmList( - monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); - alarmList_.add(builderForValue.build()); + public Builder addAlarmDescriptor( + monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(builderForValue.build()); onChanged(); } else { - alarmListBuilder_.addMessage(builderForValue.build()); + alarmDescriptorBuilder_.addMessage(builderForValue.build()); } return this; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public Builder addAlarmList( - int index, monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); - alarmList_.add(index, builderForValue.build()); + public Builder addAlarmDescriptor( + int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(index, builderForValue.build()); onChanged(); } else { - alarmListBuilder_.addMessage(index, builderForValue.build()); + alarmDescriptorBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public Builder addAllAlarmList( - java.lang.Iterable values) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); + public Builder addAllAlarmDescriptor( + java.lang.Iterable values) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, alarmList_); + values, alarmDescriptor_); onChanged(); } else { - alarmListBuilder_.addAllMessages(values); + alarmDescriptorBuilder_.addAllMessages(values); } return this; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public Builder clearAlarmList() { - if (alarmListBuilder_ == null) { - alarmList_ = java.util.Collections.emptyList(); + public Builder clearAlarmDescriptor() { + if (alarmDescriptorBuilder_ == null) { + alarmDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - alarmListBuilder_.clear(); + alarmDescriptorBuilder_.clear(); } return this; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public Builder removeAlarmList(int index) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); - alarmList_.remove(index); + public Builder removeAlarmDescriptor(int index) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.remove(index); onChanged(); } else { - alarmListBuilder_.remove(index); + alarmDescriptorBuilder_.remove(index); } return this; } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public monitoring.Monitoring.AlarmID.Builder getAlarmListBuilder( + public monitoring.Monitoring.AlarmDescriptor.Builder getAlarmDescriptorBuilder( int index) { - return getAlarmListFieldBuilder().getBuilder(index); + return getAlarmDescriptorFieldBuilder().getBuilder(index); } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmListOrBuilder( + public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( int index) { - if (alarmListBuilder_ == null) { - return alarmList_.get(index); } else { - return alarmListBuilder_.getMessageOrBuilder(index); + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.get(index); } else { + return alarmDescriptorBuilder_.getMessageOrBuilder(index); } } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public java.util.List - getAlarmListOrBuilderList() { - if (alarmListBuilder_ != null) { - return alarmListBuilder_.getMessageOrBuilderList(); + public java.util.List + getAlarmDescriptorOrBuilderList() { + if (alarmDescriptorBuilder_ != null) { + return alarmDescriptorBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(alarmList_); + return java.util.Collections.unmodifiableList(alarmDescriptor_); } } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public monitoring.Monitoring.AlarmID.Builder addAlarmListBuilder() { - return getAlarmListFieldBuilder().addBuilder( - monitoring.Monitoring.AlarmID.getDefaultInstance()); + public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder() { + return getAlarmDescriptorFieldBuilder().addBuilder( + monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public monitoring.Monitoring.AlarmID.Builder addAlarmListBuilder( + public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder( int index) { - return getAlarmListFieldBuilder().addBuilder( - index, monitoring.Monitoring.AlarmID.getDefaultInstance()); + return getAlarmDescriptorFieldBuilder().addBuilder( + index, monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); } /** - * repeated .monitoring.AlarmID alarm_list = 1; + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; */ - public java.util.List - getAlarmListBuilderList() { - return getAlarmListFieldBuilder().getBuilderList(); + public java.util.List + getAlarmDescriptorBuilderList() { + return getAlarmDescriptorFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmListFieldBuilder() { - if (alarmListBuilder_ == null) { - alarmListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - alarmList_, + monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder> + getAlarmDescriptorFieldBuilder() { + if (alarmDescriptorBuilder_ == null) { + alarmDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder>( + alarmDescriptor_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - alarmList_ = null; + alarmDescriptor_ = null; } - return alarmListBuilder_; + return alarmDescriptorBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -19154,41 +18266,41 @@ public final class Monitoring { } - // @@protoc_insertion_point(builder_scope:monitoring.AlarmIDList) + // @@protoc_insertion_point(builder_scope:monitoring.AlarmList) } - // @@protoc_insertion_point(class_scope:monitoring.AlarmIDList) - private static final monitoring.Monitoring.AlarmIDList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:monitoring.AlarmList) + private static final monitoring.Monitoring.AlarmList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmIDList(); + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmList(); } - public static monitoring.Monitoring.AlarmIDList getDefaultInstance() { + public static monitoring.Monitoring.AlarmList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public AlarmIDList parsePartialFrom( + public AlarmList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AlarmIDList(input, extensionRegistry); + return new AlarmList(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public monitoring.Monitoring.AlarmIDList getDefaultInstanceForType() { + public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -19255,10 +18367,10 @@ public final class Monitoring { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubsResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubsIDList_descriptor; + internal_static_monitoring_SubsList_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubsIDList_fieldAccessorTable; + internal_static_monitoring_SubsList_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmDescriptor_descriptor; private static final @@ -19280,10 +18392,10 @@ public final class Monitoring { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmIDList_descriptor; + internal_static_monitoring_AlarmList_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmIDList_fieldAccessorTable; + internal_static_monitoring_AlarmList_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -19306,7 +18418,7 @@ public final class Monitoring { "d\"l\n\021MonitorKpiRequest\022!\n\006kpi_id\030\001 \001(\0132\021" + ".monitoring.KpiId\022\033\n\023monitoring_window_s" + "\030\002 \001(\002\022\027\n\017sampling_rate_s\030\003 \001(\002\"\323\001\n\010KpiQ" + - "uery\022!\n\006kpi_id\030\001 \003(\0132\021.monitoring.KpiId\022" + + "uery\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring.KpiId\022" + "\033\n\023monitoring_window_s\030\002 \001(\002\022\027\n\017sampling" + "_rate_s\030\003 \001(\002\022\026\n\016last_n_samples\030\004 \001(\r\022+\n" + "\017start_timestamp\030\005 \001(\0132\022.context.Timesta" + @@ -19323,66 +18435,66 @@ public final class Monitoring { "Val\030\001 \001(\005H\000\022\023\n\tuint32Val\030\002 \001(\rH\000\022\022\n\010int6" + "4Val\030\003 \001(\003H\000\022\023\n\tuint64Val\030\004 \001(\004H\000\022\022\n\010flo" + "atVal\030\005 \001(\002H\000\022\023\n\tstringVal\030\006 \001(\tH\000\022\021\n\007bo" + - "olVal\030\007 \001(\010H\000B\007\n\005value\",\n\007KpiList\022!\n\010kpi" + - "_list\030\001 \003(\0132\017.monitoring.Kpi\"K\n\021KpiDescr" + - "iptorList\0226\n\023kpi_descriptor_list\030\001 \003(\0132\031" + - ".monitoring.KpiDescriptor\"\362\001\n\016SubsDescri" + - "ptor\022+\n\007subs_id\030\001 \001(\0132\032.monitoring.Subsc" + - "riptionID\022!\n\006kpi_id\030\002 \001(\0132\021.monitoring.K" + - "piId\022\033\n\023sampling_duration_s\030\003 \001(\002\022\033\n\023sam" + - "pling_interval_s\030\004 \001(\002\022+\n\017start_timestam" + - "p\030\005 \001(\0132\022.context.Timestamp\022)\n\rend_times" + - "tamp\030\006 \001(\0132\022.context.Timestamp\"0\n\016Subscr" + - "iptionID\022\036\n\007subs_id\030\001 \001(\0132\r.context.Uuid" + - "\"b\n\014SubsResponse\022+\n\007subs_id\030\001 \001(\0132\032.moni" + - "toring.SubscriptionID\022%\n\010kpi_list\030\002 \003(\0132" + - "\023.monitoring.KpiList\";\n\nSubsIDList\022-\n\tsu" + - "bs_list\030\001 \003(\0132\032.monitoring.SubscriptionI" + - "D\"\337\001\n\017AlarmDescriptor\022%\n\010alarm_id\030\001 \001(\0132" + - "\023.monitoring.AlarmID\022\031\n\021alarm_descriptio" + - "n\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022!\n\006kpi_id\030\004 \003(\0132\021." + - "monitoring.KpiId\0222\n\017kpi_value_range\030\005 \003(" + - "\0132\031.monitoring.KpiValueRange\022%\n\ttimestam" + - "p\030\006 \001(\0132\022.context.Timestamp\"*\n\007AlarmID\022\037" + - "\n\010alarm_id\030\001 \001(\0132\r.context.Uuid\"|\n\021Alarm" + - "Subscription\022$\n\007alarmID\030\001 \001(\0132\023.monitori" + + "olVal\030\007 \001(\010H\000B\007\n\005value\"\'\n\007KpiList\022\034\n\003kpi" + + "\030\001 \003(\0132\017.monitoring.Kpi\"K\n\021KpiDescriptor" + + "List\0226\n\023kpi_descriptor_list\030\001 \003(\0132\031.moni" + + "toring.KpiDescriptor\"\362\001\n\016SubsDescriptor\022" + + "+\n\007subs_id\030\001 \001(\0132\032.monitoring.Subscripti" + + "onID\022!\n\006kpi_id\030\002 \001(\0132\021.monitoring.KpiId\022" + + "\033\n\023sampling_duration_s\030\003 \001(\002\022\033\n\023sampling" + + "_interval_s\030\004 \001(\002\022+\n\017start_timestamp\030\005 \001" + + "(\0132\022.context.Timestamp\022)\n\rend_timestamp\030" + + "\006 \001(\0132\022.context.Timestamp\"0\n\016Subscriptio" + + "nID\022\036\n\007subs_id\030\001 \001(\0132\r.context.Uuid\"b\n\014S" + + "ubsResponse\022+\n\007subs_id\030\001 \001(\0132\032.monitorin" + + "g.SubscriptionID\022%\n\010kpi_list\030\002 \001(\0132\023.mon" + + "itoring.KpiList\"?\n\010SubsList\0223\n\017subs_desc" + + "riptor\030\001 \003(\0132\032.monitoring.SubsDescriptor" + + "\"\337\001\n\017AlarmDescriptor\022%\n\010alarm_id\030\001 \001(\0132\023" + + ".monitoring.AlarmID\022\031\n\021alarm_description" + + "\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022!\n\006kpi_id\030\004 \001(\0132\021.m" + + "onitoring.KpiId\0222\n\017kpi_value_range\030\005 \001(\013" + + "2\031.monitoring.KpiValueRange\022%\n\ttimestamp" + + "\030\006 \001(\0132\022.context.Timestamp\"*\n\007AlarmID\022\037\n" + + "\010alarm_id\030\001 \001(\0132\r.context.Uuid\"}\n\021AlarmS" + + "ubscription\022%\n\010alarm_id\030\001 \001(\0132\023.monitori" + "ng.AlarmID\022\036\n\026subscription_timeout_s\030\002 \001" + - "(\002\022!\n\031subscription_frequency_ms\030\003 \001(\002\"\224\001" + - "\n\rAlarmResponse\022%\n\010alarm_id\030\001 \001(\0132\023.moni" + - "toring.AlarmID\022\014\n\004text\030\002 \001(\t\022\'\n\tkpi_valu" + - "e\030\003 \001(\0132\024.monitoring.KpiValue\022%\n\ttimesta" + - "mp\030\004 \001(\0132\022.context.Timestamp\"6\n\013AlarmIDL" + - "ist\022\'\n\nalarm_list\030\001 \003(\0132\023.monitoring.Ala" + - "rmID2\233\t\n\021MonitoringService\0228\n\006SetKpi\022\031.m" + - "onitoring.KpiDescriptor\032\021.monitoring.Kpi" + - "Id\"\000\0220\n\tDeleteKpi\022\021.monitoring.KpiId\032\016.c" + - "ontext.Empty\"\000\022B\n\020GetKpiDescriptor\022\021.mon" + - "itoring.KpiId\032\031.monitoring.KpiDescriptor" + - "\"\000\022G\n\024GetKpiDescriptorList\022\016.context.Emp" + - "ty\032\035.monitoring.KpiDescriptorList\"\000\022/\n\nI" + - "ncludeKpi\022\017.monitoring.Kpi\032\016.context.Emp" + - "ty\"\000\022=\n\nMonitorKpi\022\035.monitoring.MonitorK" + - "piRequest\032\016.context.Empty\"\000\022;\n\014QueryKpiD" + - "ata\022\024.monitoring.KpiQuery\032\023.monitoring.K" + - "piList\"\000\022I\n\022SetKpiSubscription\022\032.monitor" + - "ing.SubsDescriptor\032\023.monitoring.KpiList\"" + - "\0000\001\022M\n\021GetSubsDescriptor\022\032.monitoring.Su" + - "bscriptionID\032\032.monitoring.SubsDescriptor" + - "\"\000\022<\n\020GetSubscriptions\022\016.context.Empty\032\026" + - ".monitoring.SubsIDList\"\000\022B\n\022DeleteSubscr" + - "iption\022\032.monitoring.SubscriptionID\032\016.con" + - "text.Empty\"\000\022A\n\013SetKpiAlarm\022\033.monitoring" + - ".AlarmDescriptor\032\023.monitoring.AlarmID\"\000\022" + - "6\n\tGetAlarms\022\016.context.Empty\032\027.monitorin" + - "g.AlarmIDList\"\000\022H\n\022GetAlarmDescriptor\022\023." + - "monitoring.AlarmID\032\033.monitoring.AlarmDes" + - "criptor\"\000\022V\n\026GetAlarmResponseStream\022\035.mo" + - "nitoring.AlarmSubscription\032\031.monitoring." + - "AlarmResponse\"\0000\001\0224\n\013DeleteAlarm\022\023.monit" + - "oring.AlarmID\032\016.context.Empty\"\000\0226\n\014GetSt" + - "reamKpi\022\021.monitoring.KpiId\032\017.monitoring." + - "Kpi\"\0000\001\0229\n\rGetInstantKpi\022\021.monitoring.Kp" + - "iId\032\023.monitoring.KpiList\"\000b\006proto3" + "(\002\022!\n\031subscription_frequency_ms\030\003 \001(\002\"k\n" + + "\rAlarmResponse\022%\n\010alarm_id\030\001 \001(\0132\023.monit" + + "oring.AlarmID\022\014\n\004text\030\002 \001(\t\022%\n\010kpi_list\030" + + "\003 \001(\0132\023.monitoring.KpiList\"B\n\tAlarmList\022" + + "5\n\020alarm_descriptor\030\001 \003(\0132\033.monitoring.A" + + "larmDescriptor2\230\t\n\021MonitoringService\0228\n\006" + + "SetKpi\022\031.monitoring.KpiDescriptor\032\021.moni" + + "toring.KpiId\"\000\0220\n\tDeleteKpi\022\021.monitoring" + + ".KpiId\032\016.context.Empty\"\000\022B\n\020GetKpiDescri" + + "ptor\022\021.monitoring.KpiId\032\031.monitoring.Kpi" + + "Descriptor\"\000\022G\n\024GetKpiDescriptorList\022\016.c" + + "ontext.Empty\032\035.monitoring.KpiDescriptorL" + + "ist\"\000\022/\n\nIncludeKpi\022\017.monitoring.Kpi\032\016.c" + + "ontext.Empty\"\000\022=\n\nMonitorKpi\022\035.monitorin" + + "g.MonitorKpiRequest\032\016.context.Empty\"\000\022;\n" + + "\014QueryKpiData\022\024.monitoring.KpiQuery\032\023.mo" + + "nitoring.KpiList\"\000\022N\n\022SetKpiSubscription" + + "\022\032.monitoring.SubsDescriptor\032\030.monitorin" + + "g.SubsResponse\"\0000\001\022M\n\021GetSubsDescriptor\022" + + "\032.monitoring.SubscriptionID\032\032.monitoring" + + ".SubsDescriptor\"\000\022:\n\020GetSubscriptions\022\016." + + "context.Empty\032\024.monitoring.SubsList\"\000\022B\n" + + "\022DeleteSubscription\022\032.monitoring.Subscri" + + "ptionID\032\016.context.Empty\"\000\022A\n\013SetKpiAlarm" + + "\022\033.monitoring.AlarmDescriptor\032\023.monitori" + + "ng.AlarmID\"\000\0224\n\tGetAlarms\022\016.context.Empt" + + "y\032\025.monitoring.AlarmList\"\000\022H\n\022GetAlarmDe" + + "scriptor\022\023.monitoring.AlarmID\032\033.monitori" + + "ng.AlarmDescriptor\"\000\022V\n\026GetAlarmResponse" + + "Stream\022\035.monitoring.AlarmSubscription\032\031." + + "monitoring.AlarmResponse\"\0000\001\0224\n\013DeleteAl" + + "arm\022\023.monitoring.AlarmID\032\016.context.Empty" + + "\"\000\0226\n\014GetStreamKpi\022\021.monitoring.KpiId\032\017." + + "monitoring.Kpi\"\0000\001\0225\n\rGetInstantKpi\022\021.mo" + + "nitoring.KpiId\032\017.monitoring.Kpi\"\000b\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -19437,7 +18549,7 @@ public final class Monitoring { internal_static_monitoring_KpiList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_KpiList_descriptor, - new java.lang.String[] { "KpiList", }); + new java.lang.String[] { "Kpi", }); internal_static_monitoring_KpiDescriptorList_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_monitoring_KpiDescriptorList_fieldAccessorTable = new @@ -19462,12 +18574,12 @@ public final class Monitoring { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_SubsResponse_descriptor, new java.lang.String[] { "SubsId", "KpiList", }); - internal_static_monitoring_SubsIDList_descriptor = + internal_static_monitoring_SubsList_descriptor = getDescriptor().getMessageTypes().get(12); - internal_static_monitoring_SubsIDList_fieldAccessorTable = new + internal_static_monitoring_SubsList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubsIDList_descriptor, - new java.lang.String[] { "SubsList", }); + internal_static_monitoring_SubsList_descriptor, + new java.lang.String[] { "SubsDescriptor", }); internal_static_monitoring_AlarmDescriptor_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_monitoring_AlarmDescriptor_fieldAccessorTable = new @@ -19485,19 +18597,19 @@ public final class Monitoring { internal_static_monitoring_AlarmSubscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_AlarmSubscription_descriptor, - new java.lang.String[] { "AlarmID", "SubscriptionTimeoutS", "SubscriptionFrequencyMs", }); + new java.lang.String[] { "AlarmId", "SubscriptionTimeoutS", "SubscriptionFrequencyMs", }); internal_static_monitoring_AlarmResponse_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_monitoring_AlarmResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_AlarmResponse_descriptor, - new java.lang.String[] { "AlarmId", "Text", "KpiValue", "Timestamp", }); - internal_static_monitoring_AlarmIDList_descriptor = + new java.lang.String[] { "AlarmId", "Text", "KpiList", }); + internal_static_monitoring_AlarmList_descriptor = getDescriptor().getMessageTypes().get(17); - internal_static_monitoring_AlarmIDList_fieldAccessorTable = new + internal_static_monitoring_AlarmList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmIDList_descriptor, - new java.lang.String[] { "AlarmList", }); + internal_static_monitoring_AlarmList_descriptor, + new java.lang.String[] { "AlarmDescriptor", }); context.ContextOuterClass.getDescriptor(); kpi_sample_types.KpiSampleTypes.getDescriptor(); } diff --git a/src/policy/target/generated-sources/grpc/monitoring/MonitoringService.java b/src/policy/target/generated-sources/grpc/monitoring/MonitoringService.java index 637260068..e43e9174c 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MonitoringService.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MonitoringService.java @@ -24,22 +24,22 @@ public interface MonitoringService extends MutinyService { io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request); - io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request); + io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request); io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request); io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request); - io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request); + io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request); io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request); io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request); - io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request); + io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request); - io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request); + io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request); io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request); diff --git a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java index 21f7f48ac..83c1b9cd1 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java @@ -80,7 +80,7 @@ public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.Monitorin } } @Override - public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { try { return delegate.getSubscriptions(request); } catch (UnsupportedOperationException e) { @@ -104,7 +104,7 @@ public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.Monitorin } } @Override - public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { try { return delegate.getAlarms(request); } catch (UnsupportedOperationException e) { @@ -128,7 +128,7 @@ public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.Monitorin } } @Override - public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { + public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { try { return delegate.getInstantKpi(request); } catch (UnsupportedOperationException e) { @@ -137,7 +137,7 @@ public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.Monitorin } @Override - public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { try { return delegate.setKpiSubscription(request); } catch (UnsupportedOperationException e) { diff --git a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java index 6b6dc3864..fc16b2b9b 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java @@ -53,7 +53,7 @@ public class MonitoringServiceClient implements MonitoringService, MutinyClient< return stub.getSubsDescriptor(request); } @Override - public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { return stub.getSubscriptions(request); } @Override @@ -65,7 +65,7 @@ public class MonitoringServiceClient implements MonitoringService, MutinyClient< return stub.setKpiAlarm(request); } @Override - public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { return stub.getAlarms(request); } @Override @@ -77,12 +77,12 @@ public class MonitoringServiceClient implements MonitoringService, MutinyClient< return stub.deleteAlarm(request); } @Override - public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { + public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { return stub.getInstantKpi(request); } @Override - public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { return stub.setKpiSubscription(request); } diff --git a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java index fe92a7814..9f3d85f72 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java @@ -232,28 +232,28 @@ public final class MonitoringServiceGrpc { } private static volatile io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; + monitoring.Monitoring.SubsResponse> getSetKpiSubscriptionMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "SetKpiSubscription", requestType = monitoring.Monitoring.SubsDescriptor.class, - responseType = monitoring.Monitoring.KpiList.class, + responseType = monitoring.Monitoring.SubsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) public static io.grpc.MethodDescriptor getSetKpiSubscriptionMethod() { - io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; + monitoring.Monitoring.SubsResponse> getSetKpiSubscriptionMethod() { + io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { synchronized (MonitoringServiceGrpc.class) { if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { MonitoringServiceGrpc.getSetKpiSubscriptionMethod = getSetKpiSubscriptionMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiSubscription")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( monitoring.Monitoring.SubsDescriptor.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiList.getDefaultInstance())) + monitoring.Monitoring.SubsResponse.getDefaultInstance())) .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiSubscription")) .build(); } @@ -294,28 +294,28 @@ public final class MonitoringServiceGrpc { } private static volatile io.grpc.MethodDescriptor getGetSubscriptionsMethod; + monitoring.Monitoring.SubsList> getGetSubscriptionsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetSubscriptions", requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.SubsIDList.class, + responseType = monitoring.Monitoring.SubsList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetSubscriptionsMethod() { - io.grpc.MethodDescriptor getGetSubscriptionsMethod; + monitoring.Monitoring.SubsList> getGetSubscriptionsMethod() { + io.grpc.MethodDescriptor getGetSubscriptionsMethod; if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { synchronized (MonitoringServiceGrpc.class) { if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { MonitoringServiceGrpc.getGetSubscriptionsMethod = getGetSubscriptionsMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubscriptions")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( context.ContextOuterClass.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsIDList.getDefaultInstance())) + monitoring.Monitoring.SubsList.getDefaultInstance())) .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubscriptions")) .build(); } @@ -387,28 +387,28 @@ public final class MonitoringServiceGrpc { } private static volatile io.grpc.MethodDescriptor getGetAlarmsMethod; + monitoring.Monitoring.AlarmList> getGetAlarmsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetAlarms", requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.AlarmIDList.class, + responseType = monitoring.Monitoring.AlarmList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetAlarmsMethod() { - io.grpc.MethodDescriptor getGetAlarmsMethod; + monitoring.Monitoring.AlarmList> getGetAlarmsMethod() { + io.grpc.MethodDescriptor getGetAlarmsMethod; if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { synchronized (MonitoringServiceGrpc.class) { if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { MonitoringServiceGrpc.getGetAlarmsMethod = getGetAlarmsMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarms")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( context.ContextOuterClass.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmIDList.getDefaultInstance())) + monitoring.Monitoring.AlarmList.getDefaultInstance())) .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarms")) .build(); } @@ -542,28 +542,28 @@ public final class MonitoringServiceGrpc { } private static volatile io.grpc.MethodDescriptor getGetInstantKpiMethod; + monitoring.Monitoring.Kpi> getGetInstantKpiMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetInstantKpi", requestType = monitoring.Monitoring.KpiId.class, - responseType = monitoring.Monitoring.KpiList.class, + responseType = monitoring.Monitoring.Kpi.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetInstantKpiMethod() { - io.grpc.MethodDescriptor getGetInstantKpiMethod; + monitoring.Monitoring.Kpi> getGetInstantKpiMethod() { + io.grpc.MethodDescriptor getGetInstantKpiMethod; if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { synchronized (MonitoringServiceGrpc.class) { if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { MonitoringServiceGrpc.getGetInstantKpiMethod = getGetInstantKpiMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstantKpi")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( monitoring.Monitoring.KpiId.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiList.getDefaultInstance())) + monitoring.Monitoring.Kpi.getDefaultInstance())) .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetInstantKpi")) .build(); } @@ -672,7 +672,7 @@ public final class MonitoringServiceGrpc { /** */ public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiSubscriptionMethod(), responseObserver); } @@ -686,7 +686,7 @@ public final class MonitoringServiceGrpc { /** */ public void getSubscriptions(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionsMethod(), responseObserver); } @@ -707,7 +707,7 @@ public final class MonitoringServiceGrpc { /** */ public void getAlarms(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmsMethod(), responseObserver); } @@ -742,7 +742,7 @@ public final class MonitoringServiceGrpc { /** */ public void getInstantKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstantKpiMethod(), responseObserver); } @@ -802,7 +802,7 @@ public final class MonitoringServiceGrpc { io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< monitoring.Monitoring.SubsDescriptor, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.SubsResponse>( this, METHODID_SET_KPI_SUBSCRIPTION))) .addMethod( getGetSubsDescriptorMethod(), @@ -816,7 +816,7 @@ public final class MonitoringServiceGrpc { io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.Empty, - monitoring.Monitoring.SubsIDList>( + monitoring.Monitoring.SubsList>( this, METHODID_GET_SUBSCRIPTIONS))) .addMethod( getDeleteSubscriptionMethod(), @@ -837,7 +837,7 @@ public final class MonitoringServiceGrpc { io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.Empty, - monitoring.Monitoring.AlarmIDList>( + monitoring.Monitoring.AlarmList>( this, METHODID_GET_ALARMS))) .addMethod( getGetAlarmDescriptorMethod(), @@ -872,7 +872,7 @@ public final class MonitoringServiceGrpc { io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< monitoring.Monitoring.KpiId, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.Kpi>( this, METHODID_GET_INSTANT_KPI))) .build(); } @@ -951,7 +951,7 @@ public final class MonitoringServiceGrpc { /** */ public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getSetKpiSubscriptionMethod(), getCallOptions()), request, responseObserver); } @@ -967,7 +967,7 @@ public final class MonitoringServiceGrpc { /** */ public void getSubscriptions(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request, responseObserver); } @@ -991,7 +991,7 @@ public final class MonitoringServiceGrpc { /** */ public void getAlarms(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request, responseObserver); } @@ -1031,7 +1031,7 @@ public final class MonitoringServiceGrpc { /** */ public void getInstantKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request, responseObserver); } @@ -1102,7 +1102,7 @@ public final class MonitoringServiceGrpc { /** */ - public java.util.Iterator setKpiSubscription( + public java.util.Iterator setKpiSubscription( monitoring.Monitoring.SubsDescriptor request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getSetKpiSubscriptionMethod(), getCallOptions(), request); @@ -1117,7 +1117,7 @@ public final class MonitoringServiceGrpc { /** */ - public monitoring.Monitoring.SubsIDList getSubscriptions(context.ContextOuterClass.Empty request) { + public monitoring.Monitoring.SubsList getSubscriptions(context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetSubscriptionsMethod(), getCallOptions(), request); } @@ -1138,7 +1138,7 @@ public final class MonitoringServiceGrpc { /** */ - public monitoring.Monitoring.AlarmIDList getAlarms(context.ContextOuterClass.Empty request) { + public monitoring.Monitoring.AlarmList getAlarms(context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetAlarmsMethod(), getCallOptions(), request); } @@ -1175,7 +1175,7 @@ public final class MonitoringServiceGrpc { /** */ - public monitoring.Monitoring.KpiList getInstantKpi(monitoring.Monitoring.KpiId request) { + public monitoring.Monitoring.Kpi getInstantKpi(monitoring.Monitoring.KpiId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetInstantKpiMethod(), getCallOptions(), request); } @@ -1261,7 +1261,7 @@ public final class MonitoringServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture getSubscriptions( + public com.google.common.util.concurrent.ListenableFuture getSubscriptions( context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request); @@ -1285,7 +1285,7 @@ public final class MonitoringServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture getAlarms( + public com.google.common.util.concurrent.ListenableFuture getAlarms( context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request); @@ -1309,7 +1309,7 @@ public final class MonitoringServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture getInstantKpi( + public com.google.common.util.concurrent.ListenableFuture getInstantKpi( monitoring.Monitoring.KpiId request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request); @@ -1382,7 +1382,7 @@ public final class MonitoringServiceGrpc { break; case METHODID_SET_KPI_SUBSCRIPTION: serviceImpl.setKpiSubscription((monitoring.Monitoring.SubsDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_SUBS_DESCRIPTOR: serviceImpl.getSubsDescriptor((monitoring.Monitoring.SubscriptionID) request, @@ -1390,7 +1390,7 @@ public final class MonitoringServiceGrpc { break; case METHODID_GET_SUBSCRIPTIONS: serviceImpl.getSubscriptions((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_DELETE_SUBSCRIPTION: serviceImpl.deleteSubscription((monitoring.Monitoring.SubscriptionID) request, @@ -1402,7 +1402,7 @@ public final class MonitoringServiceGrpc { break; case METHODID_GET_ALARMS: serviceImpl.getAlarms((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_ALARM_DESCRIPTOR: serviceImpl.getAlarmDescriptor((monitoring.Monitoring.AlarmID) request, @@ -1422,7 +1422,7 @@ public final class MonitoringServiceGrpc { break; case METHODID_GET_INSTANT_KPI: serviceImpl.getInstantKpi((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); diff --git a/src/policy/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java b/src/policy/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java index d663b38c9..8f066682b 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java @@ -76,7 +76,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSubscriptions); } @@ -91,7 +91,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getAlarms); } @@ -106,12 +106,12 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { + public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getInstantKpi); } - public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::setKpiSubscription); } @@ -183,7 +183,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -198,7 +198,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -213,12 +213,12 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { + public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -288,7 +288,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim asyncServerStreamingCall( new MethodHandlers< monitoring.Monitoring.SubsDescriptor, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.SubsResponse>( this, METHODID_SET_KPI_SUBSCRIPTION, compression))) .addMethod( monitoring.MonitoringServiceGrpc.getGetSubsDescriptorMethod(), @@ -302,7 +302,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.Empty, - monitoring.Monitoring.SubsIDList>( + monitoring.Monitoring.SubsList>( this, METHODID_GET_SUBSCRIPTIONS, compression))) .addMethod( monitoring.MonitoringServiceGrpc.getDeleteSubscriptionMethod(), @@ -323,7 +323,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.Empty, - monitoring.Monitoring.AlarmIDList>( + monitoring.Monitoring.AlarmList>( this, METHODID_GET_ALARMS, compression))) .addMethod( monitoring.MonitoringServiceGrpc.getGetAlarmDescriptorMethod(), @@ -358,7 +358,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim asyncUnaryCall( new MethodHandlers< monitoring.Monitoring.KpiId, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.Kpi>( this, METHODID_GET_INSTANT_KPI, compression))) .build(); } @@ -446,7 +446,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim break; case METHODID_SET_KPI_SUBSCRIPTION: io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.SubsDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setKpiSubscription); break; @@ -458,7 +458,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim break; case METHODID_GET_SUBSCRIPTIONS: io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getSubscriptions); break; @@ -476,7 +476,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim break; case METHODID_GET_ALARMS: io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getAlarms); break; @@ -506,7 +506,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim break; case METHODID_GET_INSTANT_KPI: io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getInstantKpi); break; -- GitLab From 43e4ede8490e16d3636ea0975d5f1f5c42c04d43 Mon Sep 17 00:00:00 2001 From: Katopodisv Date: Wed, 9 Nov 2022 16:47:34 +0200 Subject: [PATCH 2/5] Refactor monitoring AlarmDescriptor object --- .../eu/teraflow/policy/PolicyServiceImpl.java | 155 ++++++++---------- 1 file changed, 66 insertions(+), 89 deletions(-) diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java index 19e2d3abe..6dbf82428 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java @@ -27,7 +27,6 @@ import eu.teraflow.policy.context.model.ConstraintTypeCustom; import eu.teraflow.policy.context.model.ServiceConfig; import eu.teraflow.policy.device.DeviceService; import eu.teraflow.policy.model.BooleanOperator; -import eu.teraflow.policy.model.NumericalOperator; import eu.teraflow.policy.model.PolicyRule; import eu.teraflow.policy.model.PolicyRuleAction; import eu.teraflow.policy.model.PolicyRuleActionConfig; @@ -53,10 +52,8 @@ import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Random; -import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import javax.enterprise.context.ApplicationScoped; @@ -667,10 +664,7 @@ public class PolicyServiceImpl implements PolicyService { List alarmDescriptorList = new ArrayList<>(); for (PolicyRuleCondition policyRuleCondition : policyRuleConditions) { - - var kpiIdList = Arrays.asList(policyRuleCondition.getKpiId()); - var kpiValueRange = convertPolicyRuleConditionToAlarmDescriptor(policyRuleCondition); - var kpiValueRangeList = Arrays.asList(kpiValueRange); + var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); // TODO: Temp fix for AlarmDescriptor object AlarmDescriptor alarmDescriptor = @@ -678,8 +672,8 @@ public class PolicyServiceImpl implements PolicyService { "alarmId-" + gen(), "alarmDescription", "alarmName-" + gen(), - kpiIdList.get(0), - kpiValueRangeList.get(0), + policyRuleCondition.getKpiId(), + kpiValueRange, getTimeStamp()); alarmDescriptorList.add(alarmDescriptor); @@ -697,122 +691,68 @@ public class PolicyServiceImpl implements PolicyService { private AlarmDescriptor parsePolicyRuleConditionAnd(PolicyRuleBasic policyRuleBasic) { + // TODO: KpiIds should be the same. Add check. + List policyRuleConditionList = policyRuleBasic.getPolicyRuleConditions(); List kpisList = new ArrayList(); for (PolicyRuleCondition policyRuleCondition : policyRuleConditionList) { kpisList.add(policyRuleCondition.getKpiId()); } - Set kpisSet = new HashSet(kpisList); - if (kpisSet.size() == kpisList.size()) { - return createAlarmDescriptorWithoutRange(policyRuleConditionList, kpisList); + if (policyRuleConditionList.size() > 1) { + return createAlarmDescriptorWithRange(policyRuleConditionList); } - return createAlarmDescriptorWithRange(policyRuleConditionList, kpisList); + return createAlarmDescriptorWithoutRange(policyRuleConditionList.get(0)); } private AlarmDescriptor createAlarmDescriptorWithoutRange( - List policyRuleConditionList, List kpisList) { - - List kpiIdList = new ArrayList<>(); - List kpiValueRangeList = new ArrayList<>(); + PolicyRuleCondition policyRuleCondition) { - for (PolicyRuleCondition policyRuleCondition : policyRuleConditionList) { - kpisList.add(policyRuleCondition.getKpiId()); - kpiValueRangeList.add(convertPolicyRuleConditionToAlarmDescriptor(policyRuleCondition)); - } + final var kpiId = policyRuleCondition.getKpiId(); + final var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); - // TODO: Temp fix for AlarmDescriptor object return new AlarmDescriptor( "alarmId-" + gen(), "alarmDescription", "alarmName-" + gen(), - kpiIdList.get(0), - kpiValueRangeList.get(0), + kpiId, + kpiValueRange, getTimeStamp()); } private AlarmDescriptor createAlarmDescriptorWithRange( - List policyRuleConditionList, List kpisList) { + List policyRuleConditionList) { + + final var kpiId = policyRuleConditionList.get(0).getKpiId(); HashMap KpiValueRangeMap = new HashMap<>(); for (PolicyRuleCondition policyRuleCondition : policyRuleConditionList) { - if (KpiValueRangeMap.containsKey(policyRuleCondition.getKpiId())) { - var kpiValueRange = KpiValueRangeMap.get(policyRuleCondition.getKpiId()); - - if (kpiValueRange.getInRange() == true) { - LOGGER.errorf("KpiId: %s, has already range values", policyRuleCondition.getKpiId()); - return null; - } - - if ((kpiValueRange.getKpiMaxValue() != null) && (kpiValueRange.getKpiMinValue() != null)) { - LOGGER.errorf( - "KpiId: %s, has already min and max values", policyRuleCondition.getKpiId()); - return null; - } - - var kpiMinValue = kpiValueRange.getKpiMinValue(); - var kpiMaxValue = kpiValueRange.getKpiMaxValue(); - boolean inRange = false; - boolean includeMinValue = kpiValueRange.getIncludeMinValue(); - boolean includeMaxValue = kpiValueRange.getIncludeMaxValue(); - - if (policyRuleCondition.getNumericalOperator() - == NumericalOperator.POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN - && kpiValueRange.getKpiMinValue() == null) { - - kpiMinValue = policyRuleCondition.getKpiValue(); - inRange = true; - includeMinValue = false; - - } else if (policyRuleCondition.getNumericalOperator() - == NumericalOperator.POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL - && kpiValueRange.getKpiMinValue() == null) { - - kpiMinValue = policyRuleCondition.getKpiValue(); - inRange = true; - includeMinValue = true; - } else if (policyRuleCondition.getNumericalOperator() - == NumericalOperator.POLICY_RULE_CONDITION_NUMERICAL_LESS_THAN - && kpiValueRange.getKpiMaxValue() == null) { - - kpiMaxValue = policyRuleCondition.getKpiValue(); - inRange = true; - includeMaxValue = false; - } else if (policyRuleCondition.getNumericalOperator() - == NumericalOperator.POLICY_RULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL - && kpiValueRange.getKpiMaxValue() == null) { - - kpiMaxValue = policyRuleCondition.getKpiValue(); - inRange = true; - includeMaxValue = true; - } else { - return null; - } - - KpiValueRangeMap.put( - policyRuleCondition.getKpiId(), - new KpiValueRange(kpiMinValue, kpiMaxValue, inRange, includeMinValue, includeMaxValue)); + if (!KpiValueRangeMap.containsKey(kpiId)) { + var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); + KpiValueRangeMap.put(kpiId, kpiValueRange); + continue; } - } - List kpiIdList = new ArrayList<>(); - kpiIdList.addAll(KpiValueRangeMap.keySet()); - List kpiValueRangeList = new ArrayList<>(KpiValueRangeMap.values()); + var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); + // TODO: Handle combineKpiValueRanges exceptions + var combinedKpiValueRange = + combineKpiValueRanges(kpiId, KpiValueRangeMap.get(kpiId), kpiValueRange); + KpiValueRangeMap.put(kpiId, combinedKpiValueRange); + } - // TODO: Temp fix for AlarmDescriptor object return new AlarmDescriptor( "alarmId-" + gen(), "alarmDescription", "alarmName-" + gen(), - kpiIdList.get(0), - kpiValueRangeList.get(0), + kpiId, + KpiValueRangeMap.get(kpiId), getTimeStamp()); } - private KpiValueRange convertPolicyRuleConditionToAlarmDescriptor( + private KpiValueRange convertPolicyRuleConditionToKpiValueRange( PolicyRuleCondition policyRuleCondition) { switch (policyRuleCondition.getNumericalOperator()) { @@ -843,6 +783,43 @@ public class PolicyServiceImpl implements PolicyService { } } + private KpiValueRange combineKpiValueRanges( + String kpiId, KpiValueRange firstKpiValueRange, KpiValueRange secondKpiValueRange) { + if (secondKpiValueRange.getInRange() == true) { + LOGGER.errorf("KpiId: %s, has already range values", kpiId); + return null; + } + + if ((firstKpiValueRange.getKpiMinValue() != null) + && (secondKpiValueRange.getKpiMinValue() != null)) { + LOGGER.errorf("KpiId: %s, has already min value", kpiId); + return null; + } + + if ((firstKpiValueRange.getKpiMaxValue() != null) + && (secondKpiValueRange.getKpiMinValue() != null)) { + LOGGER.errorf("KpiId: %s, has already max value", kpiId); + return null; + } + + // Objects.nonNull(secondKpiValueRange); + + var kpiMinValue = + firstKpiValueRange.getKpiMinValue() != null + ? firstKpiValueRange.getKpiMinValue() + : secondKpiValueRange.getKpiMinValue(); + var kpiMaxValue = + firstKpiValueRange.getKpiMaxValue() != null + ? firstKpiValueRange.getKpiMaxValue() + : secondKpiValueRange.getKpiMaxValue(); + boolean includeMinValue = + firstKpiValueRange.getIncludeMinValue() || secondKpiValueRange.getIncludeMinValue(); + boolean includeMaxValue = + firstKpiValueRange.getIncludeMaxValue() || secondKpiValueRange.getIncludeMaxValue(); + + return new KpiValueRange(kpiMinValue, kpiMaxValue, true, includeMinValue, includeMaxValue); + } + private List returnInvalidDeviceIds(List deviceIds) { var invalidDeviceIds = new ArrayList(); -- GitLab From 0f8230b9f9508ef8f9c14725df86caae32ed7945 Mon Sep 17 00:00:00 2001 From: Katopodisv Date: Mon, 14 Nov 2022 15:35:35 +0200 Subject: [PATCH 3/5] Add monitor Kpi to monitoring service step. --- src/policy/pom.xml | 2 +- .../eu/teraflow/policy/PolicyServiceImpl.java | 22 +++++++++ .../java/eu/teraflow/policy/Serializer.java | 27 +++++++++++ .../policy/monitoring/MonitoringGateway.java | 3 ++ .../monitoring/MonitoringGatewayImpl.java | 11 +++++ .../policy/monitoring/MonitoringService.java | 3 ++ .../monitoring/MonitoringServiceImpl.java | 6 +++ .../monitoring/model/MonitorKpiRequest.java | 48 +++++++++++++++++++ 8 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 src/policy/src/main/java/eu/teraflow/policy/monitoring/model/MonitorKpiRequest.java diff --git a/src/policy/pom.xml b/src/policy/pom.xml index 531cc7ecf..24b1bf200 100644 --- a/src/policy/pom.xml +++ b/src/policy/pom.xml @@ -201,7 +201,7 @@ ${java.version} ${java.version} - -Xlint:deprecation + -Xlint:unchecked diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java index 6dbf82428..0807b9e77 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java @@ -44,6 +44,7 @@ import eu.teraflow.policy.monitoring.model.AlarmDescriptor; import eu.teraflow.policy.monitoring.model.AlarmResponse; import eu.teraflow.policy.monitoring.model.AlarmSubscription; import eu.teraflow.policy.monitoring.model.KpiValueRange; +import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; import eu.teraflow.policy.service.ServiceService; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; @@ -269,6 +270,20 @@ public class PolicyServiceImpl implements PolicyService { return Uni.createFrom().item(policyRuleBasic.getPolicyRuleState()); } + private void monitorKpi(List alarmDescriptorList) { + + for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { + var monitorKpiRequest = new MonitorKpiRequest(alarmDescriptor.getKpiId(), 5, 1); + monitoringService + .monitorKpi(monitorKpiRequest) + .subscribe() + .with( + emptyMessage -> + LOGGER.infof( + "Kpi [%s] has started to be monitored.\n", alarmDescriptor.getKpiId())); + } + } + private void provisionAlarm( PolicyRule policyRule, List alarmDescriptorList, Boolean isService) { @@ -306,8 +321,14 @@ public class PolicyServiceImpl implements PolicyService { alarmResponse -> { LOGGER.info(alarmResponse); if (isService) { + if (!alarmPolicyRuleServiceMap.containsKey(alarmResponse.getAlarmId())) { + return; + } applyActionService(alarmResponse.getAlarmId()); } else { + if (!alarmPolicyRuleDeviceMap.containsKey(alarmResponse.getAlarmId())) { + return; + } applyActionDevice(alarmResponse.getAlarmId()); } }); @@ -525,6 +546,7 @@ public class PolicyServiceImpl implements PolicyService { final var policyRuleTypeService = new PolicyRuleTypeDevice(policyRuleDevice); final var policyRule = new PolicyRule(policyRuleTypeService); + monitorKpi(alarmDescriptorList); provisionAlarm(policyRule, alarmDescriptorList, false); return; } diff --git a/src/policy/src/main/java/eu/teraflow/policy/Serializer.java b/src/policy/src/main/java/eu/teraflow/policy/Serializer.java index 8ebbdc1a2..88ebd332c 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/Serializer.java +++ b/src/policy/src/main/java/eu/teraflow/policy/Serializer.java @@ -88,6 +88,7 @@ import eu.teraflow.policy.monitoring.model.KpiDescriptor; import eu.teraflow.policy.monitoring.model.KpiValue; import eu.teraflow.policy.monitoring.model.KpiValueRange; import eu.teraflow.policy.monitoring.model.LongKpiValue; +import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; import eu.teraflow.policy.monitoring.model.StringKpiValue; import eu.teraflow.policy.monitoring.model.SubsDescriptor; import eu.teraflow.policy.monitoring.model.SubsResponse; @@ -1674,6 +1675,32 @@ public class Serializer { return new AlarmResponse(alarmId, kpisList); } + public Monitoring.MonitorKpiRequest serialize(MonitorKpiRequest monitorKpiRequest) { + final var builder = Monitoring.MonitorKpiRequest.newBuilder(); + + final var kpiId = monitorKpiRequest.getKpiId(); + final var monitoringWindow = monitorKpiRequest.getMonitoringWindow(); + final var samplingRate = monitorKpiRequest.getSamplingRate(); + + final var serializedKpiId = serializeKpiId(kpiId); + + builder.setKpiId(serializedKpiId); + builder.setMonitoringWindowS(monitoringWindow); + builder.setSamplingRateS(samplingRate); + + return builder.build(); + } + + public MonitorKpiRequest deserialize(Monitoring.MonitorKpiRequest serializedMonitorKpiRequest) { + + final var serializedKpiId = serializedMonitorKpiRequest.getKpiId(); + final var kpiId = deserialize(serializedKpiId); + final var monitoringWindow = serializedMonitorKpiRequest.getMonitoringWindowS(); + final var samplingRate = serializedMonitorKpiRequest.getSamplingRateS(); + + return new MonitorKpiRequest(kpiId, monitoringWindow, samplingRate); + } + public SubsResponse deserialize(Monitoring.SubsResponse serializedSubsResponse) { final var serializedSubsId = serializedSubsResponse.getSubsId(); final var serializedKpiList = serializedSubsResponse.getKpiList(); diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java index 4a1bf0ff4..9fa2ba41d 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java @@ -21,6 +21,7 @@ import eu.teraflow.policy.monitoring.model.AlarmDescriptor; import eu.teraflow.policy.monitoring.model.AlarmResponse; import eu.teraflow.policy.monitoring.model.AlarmSubscription; import eu.teraflow.policy.monitoring.model.KpiDescriptor; +import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; import eu.teraflow.policy.monitoring.model.SubsDescriptor; import eu.teraflow.policy.monitoring.model.SubsResponse; import io.smallrye.mutiny.Multi; @@ -32,6 +33,8 @@ public interface MonitoringGateway { Uni getKpiDescriptor(String kpiId); + Uni monitorKpi(MonitorKpiRequest monitorKpiRequest); + Multi setKpiSubscription(SubsDescriptor subsDescriptor); Uni getSubsDescriptor(String subscriptionId); diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java index 9c6450913..3c248bb54 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java @@ -22,6 +22,7 @@ import eu.teraflow.policy.monitoring.model.AlarmDescriptor; import eu.teraflow.policy.monitoring.model.AlarmResponse; import eu.teraflow.policy.monitoring.model.AlarmSubscription; import eu.teraflow.policy.monitoring.model.KpiDescriptor; +import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; import eu.teraflow.policy.monitoring.model.SubsDescriptor; import eu.teraflow.policy.monitoring.model.SubsResponse; import io.quarkus.grpc.GrpcClient; @@ -64,6 +65,16 @@ public class MonitoringGatewayImpl implements MonitoringGateway { .transform(serializer::deserialize); } + @Override + public Uni monitorKpi(MonitorKpiRequest monitorKpiRequest) { + final var serializedKpiId = serializer.serialize(monitorKpiRequest); + + return streamingDelegateMonitoring + .monitorKpi(serializedKpiId) + .onItem() + .transform(serializer::deserializeEmpty); + } + @Override public Multi setKpiSubscription(SubsDescriptor subsDescriptor) { final var serializedSubsDescriptor = serializer.serialize(subsDescriptor); diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java index d63bfb5fb..e9d71918f 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java @@ -21,6 +21,7 @@ import eu.teraflow.policy.monitoring.model.AlarmDescriptor; import eu.teraflow.policy.monitoring.model.AlarmResponse; import eu.teraflow.policy.monitoring.model.AlarmSubscription; import eu.teraflow.policy.monitoring.model.KpiDescriptor; +import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; import eu.teraflow.policy.monitoring.model.SubsDescriptor; import eu.teraflow.policy.monitoring.model.SubsResponse; import io.smallrye.mutiny.Multi; @@ -32,6 +33,8 @@ public interface MonitoringService { Uni getKpiDescriptor(String kpiId); + Uni monitorKpi(MonitorKpiRequest monitorKpiRequest); + Multi setKpiSubscription(SubsDescriptor subsDescriptor); Uni getSubsDescriptor(String subscriptionId); diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java index ed53e4518..0bafcaca8 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java @@ -21,6 +21,7 @@ import eu.teraflow.policy.monitoring.model.AlarmDescriptor; import eu.teraflow.policy.monitoring.model.AlarmResponse; import eu.teraflow.policy.monitoring.model.AlarmSubscription; import eu.teraflow.policy.monitoring.model.KpiDescriptor; +import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; import eu.teraflow.policy.monitoring.model.SubsDescriptor; import eu.teraflow.policy.monitoring.model.SubsResponse; import io.smallrye.mutiny.Multi; @@ -48,6 +49,11 @@ public class MonitoringServiceImpl implements MonitoringService { return monitoringGateway.getKpiDescriptor(kpiId); } + @Override + public Uni monitorKpi(MonitorKpiRequest monitorKpiRequest) { + return monitoringGateway.monitorKpi(monitorKpiRequest); + } + @Override public Multi setKpiSubscription(SubsDescriptor subsDescriptor) { return monitoringGateway.setKpiSubscription(subsDescriptor); diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/MonitorKpiRequest.java b/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/MonitorKpiRequest.java new file mode 100644 index 000000000..61e0e209c --- /dev/null +++ b/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/MonitorKpiRequest.java @@ -0,0 +1,48 @@ +/* +* Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +* +* 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. +*/ + +package eu.teraflow.policy.monitoring.model; + +public class MonitorKpiRequest { + private final String kpiId; + private final float monitoringWindow; + private final float samplingRate; + + public MonitorKpiRequest(String kpiId, float monitoringWindow, float samplingRate) { + this.kpiId = kpiId; + this.monitoringWindow = monitoringWindow; + this.samplingRate = samplingRate; + } + + public String getKpiId() { + return kpiId; + } + + public float getMonitoringWindow() { + return monitoringWindow; + } + + public float getSamplingRate() { + return samplingRate; + } + + @Override + public String toString() { + return String.format( + "%s:{KpiId:\"%s\", [%s], [%s]}", + getClass().getSimpleName(), kpiId, monitoringWindow, samplingRate); + } +} -- GitLab From 8f7923234a235746acf6e9da3969743e09d0bf15 Mon Sep 17 00:00:00 2001 From: Katopodisv Date: Mon, 14 Nov 2022 17:21:41 +0200 Subject: [PATCH 4/5] Make MonitorKpiRequest arguments constants. --- .../src/main/java/eu/teraflow/policy/PolicyServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java index 0807b9e77..071057fcb 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java @@ -69,6 +69,8 @@ public class PolicyServiceImpl implements PolicyService { private static final String VALID_MESSAGE = "%s is valid."; private static final int POLICY_EVALUATION_TIMEOUT = 5; private static final int ACCEPTABLE_NUMBER_OF_ALARMS = 3; + private static final int MONITORING_WINDOW_IN_SECONDS = 5; + private static final int SAMPLING_RATE_PER_SECOND = 1; private static final PolicyRuleState INSERTED_POLICYRULE_STATE = new PolicyRuleState( @@ -273,7 +275,7 @@ public class PolicyServiceImpl implements PolicyService { private void monitorKpi(List alarmDescriptorList) { for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { - var monitorKpiRequest = new MonitorKpiRequest(alarmDescriptor.getKpiId(), 5, 1); + var monitorKpiRequest = new MonitorKpiRequest(alarmDescriptor.getKpiId(), MONITORING_WINDOW_IN_SECONDS, SAMPLING_RATE_PER_SECOND); monitoringService .monitorKpi(monitorKpiRequest) .subscribe() -- GitLab From e369fc6b4de63303f91e1fd3de0b6a591a86c0f5 Mon Sep 17 00:00:00 2001 From: Katopodisv Date: Wed, 16 Nov 2022 15:05:28 +0200 Subject: [PATCH 5/5] Fix error handling of PolicyRuleService and PolicyRuleDevice constructors. --- .../eu/teraflow/policy/PolicyServiceImpl.java | 57 ++++++++++++++++--- .../policy/model/PolicyRuleService.java | 3 +- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java index 071057fcb..499d4cd0e 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java @@ -148,8 +148,18 @@ public class PolicyServiceImpl implements PolicyService { public Uni addPolicyService(PolicyRuleService policyRuleService) { LOGGER.infof("Received %s", policyRuleService); + if (!policyRuleService.areArgumentsValid()) { + LOGGER.error(policyRuleService.getExeceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleService.getExeceptionMessage()); + + return Uni.createFrom().item(policyRuleState); + } + final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); - if (!policyRuleBasic.areArgumentsValid() || !policyRuleService.areArgumentsValid()) { + if (!policyRuleBasic.areArgumentsValid()) { + LOGGER.error(policyRuleService.getExeceptionMessage()); setPolicyRuleServiceToContext( policyRuleService, new PolicyRuleState( @@ -166,7 +176,6 @@ public class PolicyServiceImpl implements PolicyService { .setPolicyRule(policyRule) .subscribe() .with(id -> validateService(policyRuleService)); - return Uni.createFrom().item(policyRuleBasic.getPolicyRuleState()); } @@ -174,8 +183,18 @@ public class PolicyServiceImpl implements PolicyService { public Uni updatePolicyService(PolicyRuleService policyRuleService) { LOGGER.infof("Received %s", policyRuleService); + if (!policyRuleService.areArgumentsValid()) { + LOGGER.error(policyRuleService.getExeceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleService.getExeceptionMessage()); + + return Uni.createFrom().item(policyRuleState); + } + final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); - if (!policyRuleBasic.areArgumentsValid() || !policyRuleService.areArgumentsValid()) { + if (!policyRuleBasic.areArgumentsValid()) { + LOGGER.error(policyRuleService.getExeceptionMessage()); setPolicyRuleServiceToContext( policyRuleService, new PolicyRuleState( @@ -200,8 +219,18 @@ public class PolicyServiceImpl implements PolicyService { public Uni addPolicyDevice(PolicyRuleDevice policyRuleDevice) { LOGGER.infof("Received %s", policyRuleDevice); + if (!policyRuleDevice.areArgumentsValid()) { + LOGGER.error(policyRuleDevice.getExeceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleDevice.getExeceptionMessage()); + + return Uni.createFrom().item(policyRuleState); + } + final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); - if (!policyRuleBasic.areArgumentsValid() || !policyRuleDevice.areArgumentsValid()) { + if (!policyRuleBasic.areArgumentsValid()) { + LOGGER.error(policyRuleDevice.getExeceptionMessage()); setPolicyRuleDeviceToContext( policyRuleDevice, new PolicyRuleState( @@ -225,8 +254,18 @@ public class PolicyServiceImpl implements PolicyService { public Uni updatePolicyDevice(PolicyRuleDevice policyRuleDevice) { LOGGER.infof("Received %s", policyRuleDevice); + if (!policyRuleDevice.areArgumentsValid()) { + LOGGER.error(policyRuleDevice.getExeceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleDevice.getExeceptionMessage()); + + return Uni.createFrom().item(policyRuleState); + } + final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); - if (!policyRuleBasic.areArgumentsValid() || !policyRuleDevice.areArgumentsValid()) { + if (!policyRuleBasic.areArgumentsValid()) { + LOGGER.error(policyRuleDevice.getExeceptionMessage()); setPolicyRuleDeviceToContext( policyRuleDevice, new PolicyRuleState( @@ -275,7 +314,9 @@ public class PolicyServiceImpl implements PolicyService { private void monitorKpi(List alarmDescriptorList) { for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { - var monitorKpiRequest = new MonitorKpiRequest(alarmDescriptor.getKpiId(), MONITORING_WINDOW_IN_SECONDS, SAMPLING_RATE_PER_SECOND); + var monitorKpiRequest = + new MonitorKpiRequest( + alarmDescriptor.getKpiId(), MONITORING_WINDOW_IN_SECONDS, SAMPLING_RATE_PER_SECOND); monitoringService .monitorKpi(monitorKpiRequest) .subscribe() @@ -563,7 +604,7 @@ public class PolicyServiceImpl implements PolicyService { .subscribe() .with( policyRuleBoolean -> { - if (Boolean.FALSE.equals(isUpdatedPolicyRuleValid)) { + if (Boolean.FALSE.equals(policyRuleBoolean)) { String message = String.format( @@ -589,7 +630,7 @@ public class PolicyServiceImpl implements PolicyService { .subscribe() .with( policyRuleBoolean -> { - if (Boolean.FALSE.equals(isUpdatedPolicyRuleValid)) { + if (Boolean.FALSE.equals(policyRuleBoolean)) { String message = String.format( "PolicyRule with ID: %s was not found. PolicyUpdateDevice failed", diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleService.java b/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleService.java index 71b7fc5e5..a480b6111 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleService.java +++ b/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleService.java @@ -40,7 +40,8 @@ public class PolicyRuleService { !serviceId.getContextId().isBlank(), "Context Id of Service Id must not be empty."); checkArgument(!serviceId.getId().isBlank(), "Service Id must not be empty."); this.serviceId = serviceId; - checkArgument(!deviceIds.isEmpty(), "Device Ids must not be empty."); + // TODO If device list not empty + // checkArgument(!deviceIds.isEmpty(), "Device Ids must not be empty."); this.deviceIds = deviceIds; this.isValid = true; this.exceptionMessage = ""; -- GitLab