diff --git a/proto/policy.proto b/proto/policy.proto index 0887ae955edb544616d711189db0133fa788c104..9e67b776464b8d29023cc702341320b94e338714 100644 --- a/proto/policy.proto +++ b/proto/policy.proto @@ -20,23 +20,28 @@ import "policy-condition.proto"; import "policy-action.proto"; service PolicyService { - rpc PolicyAdd (PolicyRule) returns (PolicyRuleState) {} - rpc PolicyUpdate (PolicyRule) returns (PolicyRuleState) {} - rpc PolicyDelete (PolicyRule) returns (PolicyRuleState) {} - rpc GetPolicy (PolicyRuleId) returns (PolicyRule) {} - rpc GetPolicyByDeviceId (context.DeviceId) returns (PolicyRuleList) {} - rpc GetPolicyByServiceId (context.ServiceId) returns (PolicyRuleList) {} + rpc PolicyAddService (PolicyRuleService) returns (PolicyRuleState) {} + rpc PolicyAddDevice (PolicyRuleDevice) returns (PolicyRuleState) {} + rpc PolicyUpdateService (PolicyRuleService) returns (PolicyRuleState) {} + rpc PolicyUpdateDevice (PolicyRuleDevice) returns (PolicyRuleState) {} + rpc PolicyDelete (PolicyRuleId) returns (PolicyRuleState) {} + rpc GetPolicyService (PolicyRuleId) returns (PolicyRuleService) {} + rpc GetPolicyDevice (PolicyRuleId) returns (PolicyRuleDevice) {} + rpc GetPolicyByServiceId (context.ServiceId) returns (PolicyRuleServiceList) {} } enum RuleState { - POLICY_INACTIVE = 0; // Rule is currently inactive - POLICY_PLANNED = 1; // Rule installation planned - POLICY_ACTIVE = 2; // Rule is currently active -} - -enum PolicyRuleType { - POLICYTYPE_DEVICE = 0; // Device-level - POLICYTYPE_NETWORK = 1; // Network-wide + POLICY_UNDEFINED = 0; // Undefined rule state + POLICY_FAILED = 1; // Rule failed + POLICY_INSERTED = 2; // Rule is just inserted + POLICY_VALIDATED = 3; // Rule content is correct + POLICY_PROVISIONED = 4; // Rule subscribed to Monitoring + POLICY_ACTIVE = 5; // Rule is currently active (alarm is just thrown by Monitoring) + POLICY_ENFORCED = 6; // Rule action is successfully enforced + POLICY_INEFFECTIVE = 7; // The applied rule action did not work as expected + POLICY_EFFECTIVE = 8; // The applied rule action did work as expected + POLICY_UPDATED = 9; // Operator requires a policy to change + POLICY_REMOVED = 10; // Operator requires to remove a policy } message PolicyRuleId { @@ -44,39 +49,51 @@ message PolicyRuleId { } message PolicyRuleState { - context.Uuid policyRuleId = 1; - RuleState policyRuleState = 2; + RuleState policyRuleState = 1; } -// IETF draft: Framework for Use of ECA (Event Condition Action) in Network Self Management -// Source: https://datatracker.ietf.org/doc/draft-bwd-netmod-eca-framework/ -// Event -message PolicyRuleEvent { - context.Event event = 1; +// Basic policy rule attributes +message PolicyRuleBasic { + PolicyRuleId policyRuleId = 1; + optional PolicyRuleState policyRuleState = 2; + uint32 priority = 3; + + // Event-Condition-Action (ECA) model + repeated PolicyRuleCondition conditionList = 4; // When these policy conditions are met, an event is automatically thrown + BooleanOperator booleanOperator = 5; // Evaluation operator to be used + repeated PolicyRuleAction actionList = 6; // One or more actions should be applied } -// Policy rule partially complies with IETF’s: -// RFC 3060: https://datatracker.ietf.org/doc/html/rfc3060 -// RFC 3460: https://datatracker.ietf.org/doc/html/rfc3460 -// Enhanced with a policy rule event according to the ECA model -message PolicyRule { +// Service-oriented policy rule +message PolicyRuleService { // Basic policy rule attributes - PolicyRuleId policyRuleId = 1; - PolicyRuleType policyRuleType = 2; - uint32 priority = 3; + PolicyRuleBasic policyRuleBasic = 1; - // Event-Condition-Action model - PolicyRuleEvent event = 4; // A single event triggers the policy - repeated PolicyRuleCondition conditionList = 5; // One or more conditions must be met - BooleanOperator booleanOperator = 6; // Evaluation operator to be used - repeated PolicyRuleAction actionList = 7; // One or more actions should be applied + // Affected service and (some of) its device(s) + context.ServiceId serviceId = 2; + repeated context.DeviceId deviceList = 3; // List of devices this service is traversing (not exhaustive) +} + +// Device-oriented policy rule +message PolicyRuleDevice { + // Basic policy rule attributes + PolicyRuleBasic policyRuleBasic = 1; + + // Affected device(s) + repeated context.DeviceId deviceList = 2; +} + +// A list of policy rule IDs +message PolicyRuleIdList { + repeated PolicyRuleId policyRuleIdList = 1; +} - // Affected service and devices - context.ServiceId serviceId = 8; - repeated context.DeviceId deviceList = 9; +// A list of service-oriented policy rules +message PolicyRuleServiceList { + repeated PolicyRuleService policyRuleServiceList = 1; } -// A list of policy rules -message PolicyRuleList { - repeated PolicyRule policyRuleList = 1; +// A list of device-oriented policy rules +message PolicyRuleDeviceList { + repeated PolicyRuleDevice policyRuleDeviceList = 1; } diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyGatewayImpl.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyGatewayImpl.java index b95271708bf66833e09d9eed97b0b24ecfe09552..642fabcba92c82cab8cc0c43dca805aa95231df6 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyGatewayImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyGatewayImpl.java @@ -16,11 +16,18 @@ package eu.teraflow.policy; -import context.ContextOuterClass; +import context.ContextOuterClass.ServiceId; import io.quarkus.grpc.GrpcService; import io.smallrye.mutiny.Uni; import javax.inject.Inject; import policy.Policy; +import policy.Policy.PolicyRuleBasic; +import policy.Policy.PolicyRuleDevice; +import policy.Policy.PolicyRuleId; +import policy.Policy.PolicyRuleService; +import policy.Policy.PolicyRuleServiceList; +import policy.Policy.PolicyRuleState; +import policy.Policy.RuleState; @GrpcService public class PolicyGatewayImpl implements PolicyGateway { @@ -33,50 +40,77 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override - public Uni<Policy.PolicyRuleState> policyAdd(Policy.PolicyRule request) { + public Uni<PolicyRuleState> policyAddService(PolicyRuleService request) { return Uni.createFrom() .item( () -> Policy.PolicyRuleState.newBuilder() - .setPolicyRuleId(request.getPolicyRuleId().getUuid()) + .setPolicyRuleState( + request.getPolicyRuleBasic().getPolicyRuleState().getPolicyRuleState()) .build()); } @Override - public Uni<Policy.PolicyRuleState> policyUpdate(Policy.PolicyRule request) { + public Uni<PolicyRuleState> policyAddDevice(PolicyRuleDevice request) { return Uni.createFrom() .item( () -> Policy.PolicyRuleState.newBuilder() - .setPolicyRuleId(request.getPolicyRuleId().getUuid()) + .setPolicyRuleState( + request.getPolicyRuleBasic().getPolicyRuleState().getPolicyRuleState()) .build()); } @Override - public Uni<Policy.PolicyRuleState> policyDelete(Policy.PolicyRule request) { + public Uni<PolicyRuleState> policyUpdateService(PolicyRuleService request) { return Uni.createFrom() .item( () -> Policy.PolicyRuleState.newBuilder() - .setPolicyRuleId(request.getPolicyRuleId().getUuid()) + .setPolicyRuleState( + request.getPolicyRuleBasic().getPolicyRuleState().getPolicyRuleState()) .build()); } @Override - public Uni<Policy.PolicyRule> getPolicy(Policy.PolicyRuleId request) { + public Uni<PolicyRuleState> policyUpdateDevice(PolicyRuleDevice request) { return Uni.createFrom() - .item(() -> Policy.PolicyRule.newBuilder().setPolicyRuleId(request).build()); + .item( + () -> + Policy.PolicyRuleState.newBuilder() + .setPolicyRuleState( + request.getPolicyRuleBasic().getPolicyRuleState().getPolicyRuleState()) + .build()); } @Override - public Uni<Policy.PolicyRuleList> getPolicyByDeviceId(ContextOuterClass.DeviceId request) { + public Uni<PolicyRuleState> policyDelete(PolicyRuleId request) { + return Uni.createFrom() + .item( + () -> + Policy.PolicyRuleState.newBuilder() + .setPolicyRuleState(RuleState.POLICY_REMOVED) + .build()); + } + + @Override + public Uni<PolicyRuleService> getPolicyService(PolicyRuleId request) { + final var policyRuleBasic = PolicyRuleBasic.newBuilder().setPolicyRuleId(request).build(); - return Uni.createFrom().item(() -> Policy.PolicyRuleList.newBuilder().build()); + return Uni.createFrom() + .item(() -> PolicyRuleService.newBuilder().setPolicyRuleBasic(policyRuleBasic).build()); } @Override - public Uni<Policy.PolicyRuleList> getPolicyByServiceId(ContextOuterClass.ServiceId request) { + public Uni<PolicyRuleDevice> getPolicyDevice(PolicyRuleId request) { + final var policyRuleBasic = PolicyRuleBasic.newBuilder().setPolicyRuleId(request).build(); - return Uni.createFrom().item(() -> Policy.PolicyRuleList.newBuilder().build()); + return Uni.createFrom() + .item(() -> PolicyRuleDevice.newBuilder().setPolicyRuleBasic(policyRuleBasic).build()); + } + + @Override + public Uni<PolicyRuleServiceList> getPolicyByServiceId(ServiceId request) { + return Uni.createFrom().item(() -> Policy.PolicyRuleServiceList.newBuilder().build()); } } diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyService.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyService.java index d20775cc137240611b665c08adeaa725e15ad35e..14ffbb41ef60a438990bfe59e1d9539b48b51d75 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyService.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyService.java @@ -16,11 +16,14 @@ package eu.teraflow.policy; -import eu.teraflow.policy.model.PolicyRule; import eu.teraflow.policy.model.PolicyRuleState; import io.smallrye.mutiny.Uni; +import policy.Policy.PolicyRuleDevice; +import policy.Policy.PolicyRuleService; public interface PolicyService { - Uni<PolicyRuleState> addPolicy(PolicyRule policyRule); + Uni<PolicyRuleState> addPolicyService(PolicyRuleService policyRuleService); + + Uni<PolicyRuleState> addPolicyDevice(PolicyRuleDevice policyRuleDevice); } 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 d8025d0809526934b4fa3959781ab88f5f10160a..c9645c5e30b1b4380bb9c0004a8b66f734f279d1 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java @@ -16,19 +16,25 @@ package eu.teraflow.policy; -import eu.teraflow.policy.model.PolicyRule; import eu.teraflow.policy.model.PolicyRuleState; import io.smallrye.mutiny.Uni; import javax.enterprise.context.ApplicationScoped; import org.jboss.logging.Logger; +import policy.Policy.PolicyRuleDevice; +import policy.Policy.PolicyRuleService; @ApplicationScoped public class PolicyServiceImpl implements PolicyService { private static final Logger LOGGER = Logger.getLogger(PolicyServiceImpl.class); - public Uni<PolicyRuleState> addPolicy(PolicyRule policyRule) { + @Override + public Uni<PolicyRuleState> addPolicyService(PolicyRuleService policyRuleService) { + return null; + } + @Override + public Uni<PolicyRuleState> addPolicyDevice(PolicyRuleDevice policyRuleDevice) { return null; } } diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRule.java b/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRule.java deleted file mode 100644 index 18dbfa73d396770e71f0e1c864e2440f10b28a55..0000000000000000000000000000000000000000 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRule.java +++ /dev/null @@ -1,111 +0,0 @@ -/* -* 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.model; - -import eu.teraflow.policy.context.model.ServiceId; -import java.util.List; -import java.util.stream.Collectors; - -public class PolicyRule { - - private final String policyRuleId; - private final PolicyRuleType policyRuleType; - private final int priority; - private final PolicyRuleEvent event; - private final List<PolicyRuleCondition> policyRuleConditions; - private final BooleanOperator booleanOperator; - private final List<PolicyRuleAction> policyRuleActions; - private final ServiceId serviceId; - private final List<String> deviceIds; - - public PolicyRule( - String policyRuleId, - PolicyRuleType policyRuleType, - int priority, - PolicyRuleEvent event, - List<PolicyRuleCondition> policyRuleConditions, - BooleanOperator booleanOperator, - List<PolicyRuleAction> policyRuleActions, - ServiceId serviceId, - List<String> deviceIds) { - this.policyRuleId = policyRuleId; - this.policyRuleType = policyRuleType; - this.priority = priority; - this.event = event; - this.policyRuleConditions = policyRuleConditions; - this.booleanOperator = booleanOperator; - this.policyRuleActions = policyRuleActions; - this.serviceId = serviceId; - this.deviceIds = deviceIds; - } - - public String getPolicyRuleId() { - return policyRuleId; - } - - public PolicyRuleType getPolicyRuleType() { - return policyRuleType; - } - - public int getPriority() { - return priority; - } - - public PolicyRuleEvent getEvent() { - return event; - } - - public List<PolicyRuleCondition> getPolicyRuleConditions() { - return policyRuleConditions; - } - - public BooleanOperator getBooleanOperator() { - return booleanOperator; - } - - public List<PolicyRuleAction> getPolicyRuleActions() { - return policyRuleActions; - } - - public ServiceId getServiceId() { - return serviceId; - } - - public List<String> getDeviceIds() { - return deviceIds; - } - - @Override - public String toString() { - return String.format( - "%s:{policyRuleId:\"%s\", policyRuleType:\"%s\", priority:%d, %s, [%s], booleanOperator:\"%s\", [%s], %s, [%s]}", - getClass().getSimpleName(), - policyRuleId, - policyRuleType.toString(), - priority, - event, - toString(policyRuleConditions), - booleanOperator.toString(), - toString(policyRuleActions), - serviceId, - toString(deviceIds)); - } - - private <T> String toString(List<T> list) { - return list.stream().map(T::toString).collect(Collectors.joining(", ")); - } -} diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleEvent.java b/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleEvent.java deleted file mode 100644 index 412c6c7183250aae26de75a945bf57164634bc32..0000000000000000000000000000000000000000 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleEvent.java +++ /dev/null @@ -1,37 +0,0 @@ -/* -* 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.model; - -import eu.teraflow.policy.context.model.Event; - -public class PolicyRuleEvent { - - private final Event event; - - public PolicyRuleEvent(Event event) { - this.event = event; - } - - public Event getEvent() { - return event; - } - - @Override - public String toString() { - return String.format("%s:{%s}", getClass().getSimpleName(), event); - } -} diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleType.java b/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleType.java deleted file mode 100644 index 321220176adb7a336870b4845d3883e367c12078..0000000000000000000000000000000000000000 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleType.java +++ /dev/null @@ -1,22 +0,0 @@ -/* -* 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.model; - -public enum PolicyRuleType { - POLICYTYPE_DEVICE, - POLICYTYPE_NETWORK -} diff --git a/src/policy/src/test/java/eu/teraflow/policy/PolicyServiceTest.java b/src/policy/src/test/java/eu/teraflow/policy/PolicyServiceTest.java index 47a5502d15bb06c5851a01693e469a9c88588bfe..bf1af532f06accf9c0410548ad7f4aa85757dbb1 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/PolicyServiceTest.java +++ b/src/policy/src/test/java/eu/teraflow/policy/PolicyServiceTest.java @@ -29,6 +29,8 @@ import java.util.concurrent.TimeoutException; import org.jboss.logging.Logger; import org.junit.jupiter.api.Test; import policy.Policy; +import policy.Policy.PolicyRuleBasic; +import policy.Policy.RuleState; import policy.PolicyService; @QuarkusTest @@ -38,47 +40,89 @@ class PolicyServiceTest { @GrpcClient PolicyService client; @Test - void shouldAddPolicy() throws ExecutionException, InterruptedException, TimeoutException { + void shouldAddPolicyService() throws ExecutionException, InterruptedException, TimeoutException { CompletableFuture<String> message = new CompletableFuture<>(); - final var uuid = - ContextOuterClass.Uuid.newBuilder() - .setUuid(UUID.fromString("0f14d0ab-9608-7862-a9e4-5ed26688389b").toString()) - .build(); - final var policyRuleId = Policy.PolicyRuleId.newBuilder().setUuid(uuid).build(); - final var policyRule = Policy.PolicyRule.newBuilder().setPolicyRuleId(policyRuleId).build(); + final var expectedPolicyRuleState = + Policy.PolicyRuleState.newBuilder().setPolicyRuleState(RuleState.POLICY_ACTIVE).build(); + + final var policyRuleBasic = + PolicyRuleBasic.newBuilder().setPolicyRuleState(expectedPolicyRuleState).build(); + final var policyRuleService = + Policy.PolicyRuleService.newBuilder().setPolicyRuleBasic(policyRuleBasic).build(); client - .policyAdd(policyRule) + .policyAddService(policyRuleService) .subscribe() - .with( - policyRuleState -> { - LOGGER.infof("Adding policy: %s", policyRuleState.getPolicyRuleId().getUuid()); - message.complete(policyRuleState.getPolicyRuleId().getUuid()); - }); - assertThat(message.get(5, TimeUnit.SECONDS)).isEqualTo(policyRuleId.getUuid().getUuid()); + .with(policyRuleState -> message.complete(policyRuleState.getPolicyRuleState().toString())); + + assertThat(message.get(5, TimeUnit.SECONDS)) + .isEqualTo(expectedPolicyRuleState.getPolicyRuleState().toString()); } @Test - void shouldUpdatePolicy() throws ExecutionException, InterruptedException, TimeoutException { + void shouldAddPolicyDevice() throws ExecutionException, InterruptedException, TimeoutException { CompletableFuture<String> message = new CompletableFuture<>(); - final var uuid = - ContextOuterClass.Uuid.newBuilder() - .setUuid(UUID.fromString("0f14d0ab-9608-7862-a9e4-5ed26688389b").toString()) - .build(); - final var policyRuleId = Policy.PolicyRuleId.newBuilder().setUuid(uuid).build(); - final var policyRule = Policy.PolicyRule.newBuilder().setPolicyRuleId(policyRuleId).build(); + final var expectedPolicyRuleState = + Policy.PolicyRuleState.newBuilder().setPolicyRuleState(RuleState.POLICY_EFFECTIVE).build(); + + final var policyRuleBasic = + PolicyRuleBasic.newBuilder().setPolicyRuleState(expectedPolicyRuleState).build(); + final var policyRuleDevice = + Policy.PolicyRuleDevice.newBuilder().setPolicyRuleBasic(policyRuleBasic).build(); client - .policyUpdate(policyRule) + .policyAddDevice(policyRuleDevice) .subscribe() - .with( - policyRuleState -> { - LOGGER.infof("Updating policy: %s", policyRuleState.getPolicyRuleId().getUuid()); - message.complete(policyRuleState.getPolicyRuleId().getUuid()); - }); - assertThat(message.get(5, TimeUnit.SECONDS)).isEqualTo(policyRuleId.getUuid().getUuid()); + .with(policyRuleState -> message.complete(policyRuleState.getPolicyRuleState().toString())); + + assertThat(message.get(5, TimeUnit.SECONDS)) + .isEqualTo(expectedPolicyRuleState.getPolicyRuleState().toString()); + } + + @Test + void shouldUpdatePolicyService() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture<String> message = new CompletableFuture<>(); + + final var expectedPolicyRuleState = + Policy.PolicyRuleState.newBuilder().setPolicyRuleState(RuleState.POLICY_ENFORCED).build(); + + final var policyRuleBasic = + PolicyRuleBasic.newBuilder().setPolicyRuleState(expectedPolicyRuleState).build(); + final var policyRuleService = + Policy.PolicyRuleService.newBuilder().setPolicyRuleBasic(policyRuleBasic).build(); + + client + .policyUpdateService(policyRuleService) + .subscribe() + .with(policyRuleState -> message.complete(policyRuleState.getPolicyRuleState().toString())); + + assertThat(message.get(5, TimeUnit.SECONDS)) + .isEqualTo(expectedPolicyRuleState.getPolicyRuleState().toString()); + } + + @Test + void shouldUpdatePolicyDevice() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture<String> message = new CompletableFuture<>(); + + final var expectedPolicyRuleState = + Policy.PolicyRuleState.newBuilder().setPolicyRuleState(RuleState.POLICY_ENFORCED).build(); + + final var policyRuleBasic = + PolicyRuleBasic.newBuilder().setPolicyRuleState(expectedPolicyRuleState).build(); + final var policyRuleDevice = + Policy.PolicyRuleDevice.newBuilder().setPolicyRuleBasic(policyRuleBasic).build(); + + client + .policyUpdateDevice(policyRuleDevice) + .subscribe() + .with(policyRuleState -> message.complete(policyRuleState.getPolicyRuleState().toString())); + + assertThat(message.get(5, TimeUnit.SECONDS)) + .isEqualTo(expectedPolicyRuleState.getPolicyRuleState().toString()); } @Test @@ -90,21 +134,21 @@ class PolicyServiceTest { .setUuid(UUID.fromString("0f14d0ab-9608-7862-a9e4-5ed26688389b").toString()) .build(); final var policyRuleId = Policy.PolicyRuleId.newBuilder().setUuid(uuid).build(); - final var policyRule = Policy.PolicyRule.newBuilder().setPolicyRuleId(policyRuleId).build(); + + final var expectedPolicyRuleState = + Policy.PolicyRuleState.newBuilder().setPolicyRuleState(RuleState.POLICY_REMOVED).build(); client - .policyDelete(policyRule) + .policyDelete(policyRuleId) .subscribe() - .with( - policyRuleState -> { - LOGGER.infof("Deleting policy: %s", policyRuleState.getPolicyRuleId().getUuid()); - message.complete(policyRuleState.getPolicyRuleId().getUuid()); - }); - assertThat(message.get(5, TimeUnit.SECONDS)).isEqualTo(policyRuleId.getUuid().getUuid()); + .with(policyRuleState -> message.complete(policyRuleState.getPolicyRuleState().toString())); + + assertThat(message.get(5, TimeUnit.SECONDS)) + .isEqualTo(expectedPolicyRuleState.getPolicyRuleState().toString()); } @Test - void shouldGetPolicy() throws ExecutionException, InterruptedException, TimeoutException { + void shouldGetPolicyService() throws ExecutionException, InterruptedException, TimeoutException { CompletableFuture<String> message = new CompletableFuture<>(); final var uuid = @@ -114,40 +158,43 @@ class PolicyServiceTest { final var policyRuleId = Policy.PolicyRuleId.newBuilder().setUuid(uuid).build(); client - .getPolicy(policyRuleId) + .getPolicyService(policyRuleId) .subscribe() .with( - policyRuleState -> { + policyRuleService -> { LOGGER.infof( "Getting policy with ID: %s", - policyRuleState.getPolicyRuleId().getUuid().getUuid()); - message.complete(policyRuleState.getPolicyRuleId().getUuid().getUuid()); + policyRuleService.getPolicyRuleBasic().getPolicyRuleId().getUuid()); + message.complete( + policyRuleService.getPolicyRuleBasic().getPolicyRuleId().getUuid().getUuid()); }); + assertThat(message.get(5, TimeUnit.SECONDS)).isEqualTo(policyRuleId.getUuid().getUuid()); } @Test - void shouldGetPolicyByDeviceId() - throws ExecutionException, InterruptedException, TimeoutException { - + void shouldGetPolicyDevice() throws ExecutionException, InterruptedException, TimeoutException { CompletableFuture<String> message = new CompletableFuture<>(); final var uuid = ContextOuterClass.Uuid.newBuilder() .setUuid(UUID.fromString("0f14d0ab-9608-7862-a9e4-5ed26688389b").toString()) .build(); - final var deviceId = ContextOuterClass.DeviceId.newBuilder().setDeviceUuid(uuid).build(); + final var policyRuleId = Policy.PolicyRuleId.newBuilder().setUuid(uuid).build(); client - .getPolicyByDeviceId(deviceId) + .getPolicyDevice(policyRuleId) .subscribe() .with( - policyRuleList -> { - LOGGER.infof("Getting policyRuleList with ID: %s", policyRuleList); - message.complete(policyRuleList.toString()); + policyRuleService -> { + LOGGER.infof( + "Getting policy with ID: %s", + policyRuleService.getPolicyRuleBasic().getPolicyRuleId().getUuid()); + message.complete( + policyRuleService.getPolicyRuleBasic().getPolicyRuleId().getUuid().getUuid()); }); - assertThat(message.get(5, TimeUnit.SECONDS)).isEmpty(); + assertThat(message.get(5, TimeUnit.SECONDS)).isEqualTo(policyRuleId.getUuid().getUuid()); } @Test diff --git a/src/policy/target/generated-sources/grpc/policy/MutinyPolicyServiceGrpc.java b/src/policy/target/generated-sources/grpc/policy/MutinyPolicyServiceGrpc.java index bad12a99d34a314f9c097ee7fda4ba7219dbb984..b9d840730272b2d6185cb2eba0c93e8cf4d11e6c 100644 --- a/src/policy/target/generated-sources/grpc/policy/MutinyPolicyServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/policy/MutinyPolicyServiceGrpc.java @@ -36,32 +36,42 @@ public final class MutinyPolicyServiceGrpc implements io.quarkus.grpc.runtime.Mu } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAdd(policy.Policy.PolicyRule request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyAdd); + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddService(policy.Policy.PolicyRuleService request) { + return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyAddService); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdate(policy.Policy.PolicyRule request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyUpdate); + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddDevice(policy.Policy.PolicyRuleDevice request) { + return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyAddDevice); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRule request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateService(policy.Policy.PolicyRuleService request) { + return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyUpdateService); + } + + + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { + return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyUpdateDevice); + } + + + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRuleId request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyDelete); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRule> getPolicy(policy.Policy.PolicyRuleId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getPolicy); + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleService> getPolicyService(policy.Policy.PolicyRuleId request) { + return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getPolicyService); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByDeviceId(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getPolicyByDeviceId); + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleDevice> getPolicyDevice(policy.Policy.PolicyRuleId request) { + return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getPolicyDevice); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleServiceList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getPolicyByServiceId); } @@ -83,89 +93,115 @@ public final class MutinyPolicyServiceGrpc implements io.quarkus.grpc.runtime.Mu - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAdd(policy.Policy.PolicyRule request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddService(policy.Policy.PolicyRuleService request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddDevice(policy.Policy.PolicyRuleDevice request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateService(policy.Policy.PolicyRuleService request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdate(policy.Policy.PolicyRule request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRule request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRuleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRule> getPolicy(policy.Policy.PolicyRuleId request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleService> getPolicyService(policy.Policy.PolicyRuleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByDeviceId(context.ContextOuterClass.DeviceId request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleDevice> getPolicyDevice(policy.Policy.PolicyRuleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleServiceList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - policy.PolicyServiceGrpc.getPolicyAddMethod(), + policy.PolicyServiceGrpc.getPolicyAddServiceMethod(), + asyncUnaryCall( + new MethodHandlers< + policy.Policy.PolicyRuleService, + policy.Policy.PolicyRuleState>( + this, METHODID_POLICY_ADD_SERVICE, compression))) + .addMethod( + policy.PolicyServiceGrpc.getPolicyAddDeviceMethod(), + asyncUnaryCall( + new MethodHandlers< + policy.Policy.PolicyRuleDevice, + policy.Policy.PolicyRuleState>( + this, METHODID_POLICY_ADD_DEVICE, compression))) + .addMethod( + policy.PolicyServiceGrpc.getPolicyUpdateServiceMethod(), asyncUnaryCall( new MethodHandlers< - policy.Policy.PolicyRule, + policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState>( - this, METHODID_POLICY_ADD, compression))) + this, METHODID_POLICY_UPDATE_SERVICE, compression))) .addMethod( - policy.PolicyServiceGrpc.getPolicyUpdateMethod(), + policy.PolicyServiceGrpc.getPolicyUpdateDeviceMethod(), asyncUnaryCall( new MethodHandlers< - policy.Policy.PolicyRule, + policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState>( - this, METHODID_POLICY_UPDATE, compression))) + this, METHODID_POLICY_UPDATE_DEVICE, compression))) .addMethod( policy.PolicyServiceGrpc.getPolicyDeleteMethod(), asyncUnaryCall( new MethodHandlers< - policy.Policy.PolicyRule, + policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleState>( this, METHODID_POLICY_DELETE, compression))) .addMethod( - policy.PolicyServiceGrpc.getGetPolicyMethod(), + policy.PolicyServiceGrpc.getGetPolicyServiceMethod(), asyncUnaryCall( new MethodHandlers< policy.Policy.PolicyRuleId, - policy.Policy.PolicyRule>( - this, METHODID_GET_POLICY, compression))) + policy.Policy.PolicyRuleService>( + this, METHODID_GET_POLICY_SERVICE, compression))) .addMethod( - policy.PolicyServiceGrpc.getGetPolicyByDeviceIdMethod(), + policy.PolicyServiceGrpc.getGetPolicyDeviceMethod(), asyncUnaryCall( new MethodHandlers< - context.ContextOuterClass.DeviceId, - policy.Policy.PolicyRuleList>( - this, METHODID_GET_POLICY_BY_DEVICE_ID, compression))) + policy.Policy.PolicyRuleId, + policy.Policy.PolicyRuleDevice>( + this, METHODID_GET_POLICY_DEVICE, compression))) .addMethod( policy.PolicyServiceGrpc.getGetPolicyByServiceIdMethod(), asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.ServiceId, - policy.Policy.PolicyRuleList>( + policy.Policy.PolicyRuleServiceList>( this, METHODID_GET_POLICY_BY_SERVICE_ID, compression))) .build(); } } - private static final int METHODID_POLICY_ADD = 0; - private static final int METHODID_POLICY_UPDATE = 1; - private static final int METHODID_POLICY_DELETE = 2; - private static final int METHODID_GET_POLICY = 3; - private static final int METHODID_GET_POLICY_BY_DEVICE_ID = 4; - private static final int METHODID_GET_POLICY_BY_SERVICE_ID = 5; + private static final int METHODID_POLICY_ADD_SERVICE = 0; + private static final int METHODID_POLICY_ADD_DEVICE = 1; + private static final int METHODID_POLICY_UPDATE_SERVICE = 2; + private static final int METHODID_POLICY_UPDATE_DEVICE = 3; + private static final int METHODID_POLICY_DELETE = 4; + private static final int METHODID_GET_POLICY_SERVICE = 5; + private static final int METHODID_GET_POLICY_DEVICE = 6; + private static final int METHODID_GET_POLICY_BY_SERVICE_ID = 7; private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, @@ -186,39 +222,51 @@ public final class MutinyPolicyServiceGrpc implements io.quarkus.grpc.runtime.Mu @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { - case METHODID_POLICY_ADD: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRule) request, + case METHODID_POLICY_ADD_SERVICE: + io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleService) request, (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver, compression, - serviceImpl::policyAdd); + serviceImpl::policyAddService); break; - case METHODID_POLICY_UPDATE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRule) request, + case METHODID_POLICY_ADD_DEVICE: + io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleDevice) request, (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver, compression, - serviceImpl::policyUpdate); + serviceImpl::policyAddDevice); + break; + case METHODID_POLICY_UPDATE_SERVICE: + io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleService) request, + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver, + compression, + serviceImpl::policyUpdateService); + break; + case METHODID_POLICY_UPDATE_DEVICE: + io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleDevice) request, + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver, + compression, + serviceImpl::policyUpdateDevice); break; case METHODID_POLICY_DELETE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRule) request, + io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver, compression, serviceImpl::policyDelete); break; - case METHODID_GET_POLICY: + case METHODID_GET_POLICY_SERVICE: io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver<policy.Policy.PolicyRule>) responseObserver, + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleService>) responseObserver, compression, - serviceImpl::getPolicy); + serviceImpl::getPolicyService); break; - case METHODID_GET_POLICY_BY_DEVICE_ID: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList>) responseObserver, + case METHODID_GET_POLICY_DEVICE: + io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleDevice>) responseObserver, compression, - serviceImpl::getPolicyByDeviceId); + serviceImpl::getPolicyDevice); break; case METHODID_GET_POLICY_BY_SERVICE_ID: io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList>) responseObserver, + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleServiceList>) responseObserver, compression, serviceImpl::getPolicyByServiceId); break; diff --git a/src/policy/target/generated-sources/grpc/policy/Policy.java b/src/policy/target/generated-sources/grpc/policy/Policy.java index 78734473960668d0c7792df03104b91b5fabdbcb..324f67cddbb0acf4a0d1527c4f70055caa16e50c 100644 --- a/src/policy/target/generated-sources/grpc/policy/Policy.java +++ b/src/policy/target/generated-sources/grpc/policy/Policy.java @@ -21,180 +21,183 @@ public final class Policy { implements com.google.protobuf.ProtocolMessageEnum { /** * <pre> - * Rule is currently inactive + * Undefined rule state * </pre> * - * <code>POLICY_INACTIVE = 0;</code> + * <code>POLICY_UNDEFINED = 0;</code> */ - POLICY_INACTIVE(0), + POLICY_UNDEFINED(0), /** * <pre> - * Rule installation planned + * Rule failed * </pre> * - * <code>POLICY_PLANNED = 1;</code> + * <code>POLICY_FAILED = 1;</code> */ - POLICY_PLANNED(1), + POLICY_FAILED(1), /** * <pre> - * Rule is currently active + * Rule is just inserted * </pre> * - * <code>POLICY_ACTIVE = 2;</code> + * <code>POLICY_INSERTED = 2;</code> */ - POLICY_ACTIVE(2), - UNRECOGNIZED(-1), - ; - + POLICY_INSERTED(2), /** * <pre> - * Rule is currently inactive + * Rule content is correct * </pre> * - * <code>POLICY_INACTIVE = 0;</code> + * <code>POLICY_VALIDATED = 3;</code> */ - public static final int POLICY_INACTIVE_VALUE = 0; + POLICY_VALIDATED(3), /** * <pre> - * Rule installation planned + * Rule subscribed to Monitoring * </pre> * - * <code>POLICY_PLANNED = 1;</code> + * <code>POLICY_PROVISIONED = 4;</code> */ - public static final int POLICY_PLANNED_VALUE = 1; + POLICY_PROVISIONED(4), /** * <pre> - * Rule is currently active + * Rule is currently active (alarm is just thrown by Monitoring) * </pre> * - * <code>POLICY_ACTIVE = 2;</code> + * <code>POLICY_ACTIVE = 5;</code> */ - public static final int POLICY_ACTIVE_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - + POLICY_ACTIVE(5), /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. + * <pre> + * Rule action is successfully enforced + * </pre> + * + * <code>POLICY_ENFORCED = 6;</code> */ - @java.lang.Deprecated - public static RuleState valueOf(int value) { - return forNumber(value); - } - + POLICY_ENFORCED(6), /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * <pre> + * The applied rule action did not work as expected + * </pre> + * + * <code>POLICY_INEFFECTIVE = 7;</code> */ - public static RuleState forNumber(int value) { - switch (value) { - case 0: return POLICY_INACTIVE; - case 1: return POLICY_PLANNED; - case 2: return POLICY_ACTIVE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap<RuleState> - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - RuleState> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap<RuleState>() { - public RuleState findValueByNumber(int number) { - return RuleState.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return policy.Policy.getDescriptor().getEnumTypes().get(0); - } - - private static final RuleState[] VALUES = values(); - - public static RuleState valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private RuleState(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:policy.RuleState) - } - - /** - * Protobuf enum {@code policy.PolicyRuleType} - */ - public enum PolicyRuleType - implements com.google.protobuf.ProtocolMessageEnum { + POLICY_INEFFECTIVE(7), + /** + * <pre> + * The applied rule action did work as expected + * </pre> + * + * <code>POLICY_EFFECTIVE = 8;</code> + */ + POLICY_EFFECTIVE(8), /** * <pre> - * Device-level + * Operator requires a policy to change * </pre> * - * <code>POLICYTYPE_DEVICE = 0;</code> + * <code>POLICY_UPDATED = 9;</code> */ - POLICYTYPE_DEVICE(0), + POLICY_UPDATED(9), /** * <pre> - * Network-wide + * Operator requires to remove a policy * </pre> * - * <code>POLICYTYPE_NETWORK = 1;</code> + * <code>POLICY_REMOVED = 10;</code> */ - POLICYTYPE_NETWORK(1), + POLICY_REMOVED(10), UNRECOGNIZED(-1), ; /** * <pre> - * Device-level + * Undefined rule state + * </pre> + * + * <code>POLICY_UNDEFINED = 0;</code> + */ + public static final int POLICY_UNDEFINED_VALUE = 0; + /** + * <pre> + * Rule failed + * </pre> + * + * <code>POLICY_FAILED = 1;</code> + */ + public static final int POLICY_FAILED_VALUE = 1; + /** + * <pre> + * Rule is just inserted + * </pre> + * + * <code>POLICY_INSERTED = 2;</code> + */ + public static final int POLICY_INSERTED_VALUE = 2; + /** + * <pre> + * Rule content is correct + * </pre> + * + * <code>POLICY_VALIDATED = 3;</code> + */ + public static final int POLICY_VALIDATED_VALUE = 3; + /** + * <pre> + * Rule subscribed to Monitoring + * </pre> + * + * <code>POLICY_PROVISIONED = 4;</code> + */ + public static final int POLICY_PROVISIONED_VALUE = 4; + /** + * <pre> + * Rule is currently active (alarm is just thrown by Monitoring) + * </pre> + * + * <code>POLICY_ACTIVE = 5;</code> + */ + public static final int POLICY_ACTIVE_VALUE = 5; + /** + * <pre> + * Rule action is successfully enforced + * </pre> + * + * <code>POLICY_ENFORCED = 6;</code> + */ + public static final int POLICY_ENFORCED_VALUE = 6; + /** + * <pre> + * The applied rule action did not work as expected + * </pre> + * + * <code>POLICY_INEFFECTIVE = 7;</code> + */ + public static final int POLICY_INEFFECTIVE_VALUE = 7; + /** + * <pre> + * The applied rule action did work as expected + * </pre> + * + * <code>POLICY_EFFECTIVE = 8;</code> + */ + public static final int POLICY_EFFECTIVE_VALUE = 8; + /** + * <pre> + * Operator requires a policy to change * </pre> * - * <code>POLICYTYPE_DEVICE = 0;</code> + * <code>POLICY_UPDATED = 9;</code> */ - public static final int POLICYTYPE_DEVICE_VALUE = 0; + public static final int POLICY_UPDATED_VALUE = 9; /** * <pre> - * Network-wide + * Operator requires to remove a policy * </pre> * - * <code>POLICYTYPE_NETWORK = 1;</code> + * <code>POLICY_REMOVED = 10;</code> */ - public static final int POLICYTYPE_NETWORK_VALUE = 1; + public static final int POLICY_REMOVED_VALUE = 10; public final int getNumber() { @@ -211,7 +214,7 @@ public final class Policy { * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated - public static PolicyRuleType valueOf(int value) { + public static RuleState valueOf(int value) { return forNumber(value); } @@ -219,23 +222,32 @@ public final class Policy { * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ - public static PolicyRuleType forNumber(int value) { + public static RuleState forNumber(int value) { switch (value) { - case 0: return POLICYTYPE_DEVICE; - case 1: return POLICYTYPE_NETWORK; + case 0: return POLICY_UNDEFINED; + case 1: return POLICY_FAILED; + case 2: return POLICY_INSERTED; + case 3: return POLICY_VALIDATED; + case 4: return POLICY_PROVISIONED; + case 5: return POLICY_ACTIVE; + case 6: return POLICY_ENFORCED; + case 7: return POLICY_INEFFECTIVE; + case 8: return POLICY_EFFECTIVE; + case 9: return POLICY_UPDATED; + case 10: return POLICY_REMOVED; default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap<PolicyRuleType> + public static com.google.protobuf.Internal.EnumLiteMap<RuleState> internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< - PolicyRuleType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap<PolicyRuleType>() { - public PolicyRuleType findValueByNumber(int number) { - return PolicyRuleType.forNumber(number); + RuleState> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<RuleState>() { + public RuleState findValueByNumber(int number) { + return RuleState.forNumber(number); } }; @@ -253,12 +265,12 @@ public final class Policy { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return policy.Policy.getDescriptor().getEnumTypes().get(1); + return policy.Policy.getDescriptor().getEnumTypes().get(0); } - private static final PolicyRuleType[] VALUES = values(); + private static final RuleState[] VALUES = values(); - public static PolicyRuleType valueOf( + public static RuleState valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( @@ -272,11 +284,11 @@ public final class Policy { private final int value; - private PolicyRuleType(int value) { + private RuleState(int value) { this.value = value; } - // @@protoc_insertion_point(enum_scope:policy.PolicyRuleType) + // @@protoc_insertion_point(enum_scope:policy.RuleState) } public interface PolicyRuleIdOrBuilder extends @@ -905,27 +917,12 @@ public final class Policy { com.google.protobuf.MessageOrBuilder { /** - * <code>.context.Uuid policyRuleId = 1;</code> - * @return Whether the policyRuleId field is set. - */ - boolean hasPolicyRuleId(); - /** - * <code>.context.Uuid policyRuleId = 1;</code> - * @return The policyRuleId. - */ - context.ContextOuterClass.Uuid getPolicyRuleId(); - /** - * <code>.context.Uuid policyRuleId = 1;</code> - */ - context.ContextOuterClass.UuidOrBuilder getPolicyRuleIdOrBuilder(); - - /** - * <code>.policy.RuleState policyRuleState = 2;</code> + * <code>.policy.RuleState policyRuleState = 1;</code> * @return The enum numeric value on the wire for policyRuleState. */ int getPolicyRuleStateValue(); /** - * <code>.policy.RuleState policyRuleState = 2;</code> + * <code>.policy.RuleState policyRuleState = 1;</code> * @return The policyRuleState. */ policy.Policy.RuleState getPolicyRuleState(); @@ -976,20 +973,7 @@ public final class Policy { case 0: done = true; break; - case 10: { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (policyRuleId_ != null) { - subBuilder = policyRuleId_.toBuilder(); - } - policyRuleId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policyRuleId_); - policyRuleId_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { + case 8: { int rawValue = input.readEnum(); policyRuleState_ = rawValue; @@ -1027,43 +1011,17 @@ public final class Policy { policy.Policy.PolicyRuleState.class, policy.Policy.PolicyRuleState.Builder.class); } - public static final int POLICYRULEID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid policyRuleId_; - /** - * <code>.context.Uuid policyRuleId = 1;</code> - * @return Whether the policyRuleId field is set. - */ - @java.lang.Override - public boolean hasPolicyRuleId() { - return policyRuleId_ != null; - } - /** - * <code>.context.Uuid policyRuleId = 1;</code> - * @return The policyRuleId. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getPolicyRuleId() { - return policyRuleId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : policyRuleId_; - } - /** - * <code>.context.Uuid policyRuleId = 1;</code> - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getPolicyRuleIdOrBuilder() { - return getPolicyRuleId(); - } - - public static final int POLICYRULESTATE_FIELD_NUMBER = 2; + public static final int POLICYRULESTATE_FIELD_NUMBER = 1; private int policyRuleState_; /** - * <code>.policy.RuleState policyRuleState = 2;</code> + * <code>.policy.RuleState policyRuleState = 1;</code> * @return The enum numeric value on the wire for policyRuleState. */ @java.lang.Override public int getPolicyRuleStateValue() { return policyRuleState_; } /** - * <code>.policy.RuleState policyRuleState = 2;</code> + * <code>.policy.RuleState policyRuleState = 1;</code> * @return The policyRuleState. */ @java.lang.Override public policy.Policy.RuleState getPolicyRuleState() { @@ -1086,11 +1044,8 @@ public final class Policy { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (policyRuleId_ != null) { - output.writeMessage(1, getPolicyRuleId()); - } - if (policyRuleState_ != policy.Policy.RuleState.POLICY_INACTIVE.getNumber()) { - output.writeEnum(2, policyRuleState_); + if (policyRuleState_ != policy.Policy.RuleState.POLICY_UNDEFINED.getNumber()) { + output.writeEnum(1, policyRuleState_); } unknownFields.writeTo(output); } @@ -1101,13 +1056,9 @@ public final class Policy { if (size != -1) return size; size = 0; - if (policyRuleId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getPolicyRuleId()); - } - if (policyRuleState_ != policy.Policy.RuleState.POLICY_INACTIVE.getNumber()) { + if (policyRuleState_ != policy.Policy.RuleState.POLICY_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, policyRuleState_); + .computeEnumSize(1, policyRuleState_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -1124,11 +1075,6 @@ public final class Policy { } policy.Policy.PolicyRuleState other = (policy.Policy.PolicyRuleState) obj; - if (hasPolicyRuleId() != other.hasPolicyRuleId()) return false; - if (hasPolicyRuleId()) { - if (!getPolicyRuleId() - .equals(other.getPolicyRuleId())) return false; - } if (policyRuleState_ != other.policyRuleState_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -1141,10 +1087,6 @@ public final class Policy { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicyRuleId()) { - hash = (37 * hash) + POLICYRULEID_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleId().hashCode(); - } hash = (37 * hash) + POLICYRULESTATE_FIELD_NUMBER; hash = (53 * hash) + policyRuleState_; hash = (29 * hash) + unknownFields.hashCode(); @@ -1280,12 +1222,6 @@ public final class Policy { @java.lang.Override public Builder clear() { super.clear(); - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = null; - } else { - policyRuleId_ = null; - policyRuleIdBuilder_ = null; - } policyRuleState_ = 0; return this; @@ -1314,11 +1250,6 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleState buildPartial() { policy.Policy.PolicyRuleState result = new policy.Policy.PolicyRuleState(this); - if (policyRuleIdBuilder_ == null) { - result.policyRuleId_ = policyRuleId_; - } else { - result.policyRuleId_ = policyRuleIdBuilder_.build(); - } result.policyRuleState_ = policyRuleState_; onBuilt(); return result; @@ -1368,9 +1299,6 @@ public final class Policy { public Builder mergeFrom(policy.Policy.PolicyRuleState other) { if (other == policy.Policy.PolicyRuleState.getDefaultInstance()) return this; - if (other.hasPolicyRuleId()) { - mergePolicyRuleId(other.getPolicyRuleId()); - } if (other.policyRuleState_ != 0) { setPolicyRuleStateValue(other.getPolicyRuleStateValue()); } @@ -1403,146 +1331,27 @@ public final class Policy { return this; } - private context.ContextOuterClass.Uuid policyRuleId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> policyRuleIdBuilder_; - /** - * <code>.context.Uuid policyRuleId = 1;</code> - * @return Whether the policyRuleId field is set. - */ - public boolean hasPolicyRuleId() { - return policyRuleIdBuilder_ != null || policyRuleId_ != null; - } + private int policyRuleState_ = 0; /** - * <code>.context.Uuid policyRuleId = 1;</code> - * @return The policyRuleId. + * <code>.policy.RuleState policyRuleState = 1;</code> + * @return The enum numeric value on the wire for policyRuleState. */ - public context.ContextOuterClass.Uuid getPolicyRuleId() { - if (policyRuleIdBuilder_ == null) { - return policyRuleId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : policyRuleId_; - } else { - return policyRuleIdBuilder_.getMessage(); - } + @java.lang.Override public int getPolicyRuleStateValue() { + return policyRuleState_; } /** - * <code>.context.Uuid policyRuleId = 1;</code> + * <code>.policy.RuleState policyRuleState = 1;</code> + * @param value The enum numeric value on the wire for policyRuleState to set. + * @return This builder for chaining. */ - public Builder setPolicyRuleId(context.ContextOuterClass.Uuid value) { - if (policyRuleIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policyRuleId_ = value; - onChanged(); - } else { - policyRuleIdBuilder_.setMessage(value); - } - + public Builder setPolicyRuleStateValue(int value) { + + policyRuleState_ = value; + onChanged(); return this; } /** - * <code>.context.Uuid policyRuleId = 1;</code> - */ - public Builder setPolicyRuleId( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = builderForValue.build(); - onChanged(); - } else { - policyRuleIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * <code>.context.Uuid policyRuleId = 1;</code> - */ - public Builder mergePolicyRuleId(context.ContextOuterClass.Uuid value) { - if (policyRuleIdBuilder_ == null) { - if (policyRuleId_ != null) { - policyRuleId_ = - context.ContextOuterClass.Uuid.newBuilder(policyRuleId_).mergeFrom(value).buildPartial(); - } else { - policyRuleId_ = value; - } - onChanged(); - } else { - policyRuleIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * <code>.context.Uuid policyRuleId = 1;</code> - */ - public Builder clearPolicyRuleId() { - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = null; - onChanged(); - } else { - policyRuleId_ = null; - policyRuleIdBuilder_ = null; - } - - return this; - } - /** - * <code>.context.Uuid policyRuleId = 1;</code> - */ - public context.ContextOuterClass.Uuid.Builder getPolicyRuleIdBuilder() { - - onChanged(); - return getPolicyRuleIdFieldBuilder().getBuilder(); - } - /** - * <code>.context.Uuid policyRuleId = 1;</code> - */ - public context.ContextOuterClass.UuidOrBuilder getPolicyRuleIdOrBuilder() { - if (policyRuleIdBuilder_ != null) { - return policyRuleIdBuilder_.getMessageOrBuilder(); - } else { - return policyRuleId_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : policyRuleId_; - } - } - /** - * <code>.context.Uuid policyRuleId = 1;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getPolicyRuleIdFieldBuilder() { - if (policyRuleIdBuilder_ == null) { - policyRuleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getPolicyRuleId(), - getParentForChildren(), - isClean()); - policyRuleId_ = null; - } - return policyRuleIdBuilder_; - } - - private int policyRuleState_ = 0; - /** - * <code>.policy.RuleState policyRuleState = 2;</code> - * @return The enum numeric value on the wire for policyRuleState. - */ - @java.lang.Override public int getPolicyRuleStateValue() { - return policyRuleState_; - } - /** - * <code>.policy.RuleState policyRuleState = 2;</code> - * @param value The enum numeric value on the wire for policyRuleState to set. - * @return This builder for chaining. - */ - public Builder setPolicyRuleStateValue(int value) { - - policyRuleState_ = value; - onChanged(); - return this; - } - /** - * <code>.policy.RuleState policyRuleState = 2;</code> + * <code>.policy.RuleState policyRuleState = 1;</code> * @return The policyRuleState. */ @java.lang.Override @@ -1552,7 +1361,7 @@ public final class Policy { return result == null ? policy.Policy.RuleState.UNRECOGNIZED : result; } /** - * <code>.policy.RuleState policyRuleState = 2;</code> + * <code>.policy.RuleState policyRuleState = 1;</code> * @param value The policyRuleState to set. * @return This builder for chaining. */ @@ -1566,7 +1375,7 @@ public final class Policy { return this; } /** - * <code>.policy.RuleState policyRuleState = 2;</code> + * <code>.policy.RuleState policyRuleState = 1;</code> * @return This builder for chaining. */ public Builder clearPolicyRuleState() { @@ -1628,51 +1437,180 @@ public final class Policy { } - public interface PolicyRuleEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleEvent) + public interface PolicyRuleBasicOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.PolicyRuleBasic) com.google.protobuf.MessageOrBuilder { /** - * <code>.context.Event event = 1;</code> - * @return Whether the event field is set. + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * @return Whether the policyRuleId field is set. + */ + boolean hasPolicyRuleId(); + /** + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * @return The policyRuleId. + */ + policy.Policy.PolicyRuleId getPolicyRuleId(); + /** + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + */ + policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder(); + + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + * @return Whether the policyRuleState field is set. + */ + boolean hasPolicyRuleState(); + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + * @return The policyRuleState. + */ + policy.Policy.PolicyRuleState getPolicyRuleState(); + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + */ + policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder(); + + /** + * <code>uint32 priority = 3;</code> + * @return The priority. + */ + int getPriority(); + + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + java.util.List<policy.PolicyCondition.PolicyRuleCondition> + getConditionListList(); + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + policy.PolicyCondition.PolicyRuleCondition getConditionList(int index); + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + int getConditionListCount(); + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + java.util.List<? extends policy.PolicyCondition.PolicyRuleConditionOrBuilder> + getConditionListOrBuilderList(); + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder( + int index); + + /** + * <pre> + * Evaluation operator to be used + * </pre> + * + * <code>.policy.BooleanOperator booleanOperator = 5;</code> + * @return The enum numeric value on the wire for booleanOperator. + */ + int getBooleanOperatorValue(); + /** + * <pre> + * Evaluation operator to be used + * </pre> + * + * <code>.policy.BooleanOperator booleanOperator = 5;</code> + * @return The booleanOperator. + */ + policy.PolicyCondition.BooleanOperator getBooleanOperator(); + + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + java.util.List<policy.PolicyAction.PolicyRuleAction> + getActionListList(); + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + policy.PolicyAction.PolicyRuleAction getActionList(int index); + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> */ - boolean hasEvent(); + int getActionListCount(); /** - * <code>.context.Event event = 1;</code> - * @return The event. + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> */ - context.ContextOuterClass.Event getEvent(); + java.util.List<? extends policy.PolicyAction.PolicyRuleActionOrBuilder> + getActionListOrBuilderList(); /** - * <code>.context.Event event = 1;</code> + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder( + int index); } /** * <pre> - * IETF draft: Framework for Use of ECA (Event Condition Action) in Network Self Management - * Source: https://datatracker.ietf.org/doc/draft-bwd-netmod-eca-framework/ - * Event + * Basic policy rule attributes * </pre> * - * Protobuf type {@code policy.PolicyRuleEvent} + * Protobuf type {@code policy.PolicyRuleBasic} */ - public static final class PolicyRuleEvent extends + public static final class PolicyRuleBasic extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleEvent) - PolicyRuleEventOrBuilder { + // @@protoc_insertion_point(message_implements:policy.PolicyRuleBasic) + PolicyRuleBasicOrBuilder { private static final long serialVersionUID = 0L; - // Use PolicyRuleEvent.newBuilder() to construct. - private PolicyRuleEvent(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + // Use PolicyRuleBasic.newBuilder() to construct. + private PolicyRuleBasic(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } - private PolicyRuleEvent() { + private PolicyRuleBasic() { + conditionList_ = java.util.Collections.emptyList(); + booleanOperator_ = 0; + actionList_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new PolicyRuleEvent(); + return new PolicyRuleBasic(); } @java.lang.Override @@ -1680,7 +1618,7 @@ public final class Policy { getUnknownFields() { return this.unknownFields; } - private PolicyRuleEvent( + private PolicyRuleBasic( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1688,6 +1626,7 @@ public final class Policy { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -1699,16 +1638,58 @@ public final class Policy { done = true; break; case 10: { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); + policy.Policy.PolicyRuleId.Builder subBuilder = null; + if (policyRuleId_ != null) { + subBuilder = policyRuleId_.toBuilder(); + } + policyRuleId_ = input.readMessage(policy.Policy.PolicyRuleId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policyRuleId_); + policyRuleId_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + policy.Policy.PolicyRuleState.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) != 0)) { + subBuilder = policyRuleState_.toBuilder(); } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); + policyRuleState_ = input.readMessage(policy.Policy.PolicyRuleState.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(policyRuleState_); + policyRuleState_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 24: { + + priority_ = input.readUInt32(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + conditionList_ = new java.util.ArrayList<policy.PolicyCondition.PolicyRuleCondition>(); + mutable_bitField0_ |= 0x00000002; } + conditionList_.add( + input.readMessage(policy.PolicyCondition.PolicyRuleCondition.parser(), extensionRegistry)); + break; + } + case 40: { + int rawValue = input.readEnum(); + booleanOperator_ = rawValue; + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + actionList_ = new java.util.ArrayList<policy.PolicyAction.PolicyRuleAction>(); + mutable_bitField0_ |= 0x00000004; + } + actionList_.add( + input.readMessage(policy.PolicyAction.PolicyRuleAction.parser(), extensionRegistry)); break; } default: { @@ -1726,47 +1707,238 @@ public final class Policy { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + conditionList_ = java.util.Collections.unmodifiableList(conditionList_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + actionList_ = java.util.Collections.unmodifiableList(actionList_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleEvent_descriptor; + return policy.Policy.internal_static_policy_PolicyRuleBasic_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleEvent_fieldAccessorTable + return policy.Policy.internal_static_policy_PolicyRuleBasic_fieldAccessorTable .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleEvent.class, policy.Policy.PolicyRuleEvent.Builder.class); + policy.Policy.PolicyRuleBasic.class, policy.Policy.PolicyRuleBasic.Builder.class); } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; + private int bitField0_; + public static final int POLICYRULEID_FIELD_NUMBER = 1; + private policy.Policy.PolicyRuleId policyRuleId_; /** - * <code>.context.Event event = 1;</code> - * @return Whether the event field is set. + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * @return Whether the policyRuleId field is set. */ @java.lang.Override - public boolean hasEvent() { - return event_ != null; + public boolean hasPolicyRuleId() { + return policyRuleId_ != null; } /** - * <code>.context.Event event = 1;</code> - * @return The event. + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * @return The policyRuleId. */ @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + public policy.Policy.PolicyRuleId getPolicyRuleId() { + return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; + } + /** + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + */ + @java.lang.Override + public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder() { + return getPolicyRuleId(); + } + + public static final int POLICYRULESTATE_FIELD_NUMBER = 2; + private policy.Policy.PolicyRuleState policyRuleState_; + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + * @return Whether the policyRuleState field is set. + */ + @java.lang.Override + public boolean hasPolicyRuleState() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + * @return The policyRuleState. + */ + @java.lang.Override + public policy.Policy.PolicyRuleState getPolicyRuleState() { + return policyRuleState_ == null ? policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + */ + @java.lang.Override + public policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder() { + return policyRuleState_ == null ? policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; + } + + public static final int PRIORITY_FIELD_NUMBER = 3; + private int priority_; + /** + * <code>uint32 priority = 3;</code> + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int CONDITIONLIST_FIELD_NUMBER = 4; + private java.util.List<policy.PolicyCondition.PolicyRuleCondition> conditionList_; + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + @java.lang.Override + public java.util.List<policy.PolicyCondition.PolicyRuleCondition> getConditionListList() { + return conditionList_; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + @java.lang.Override + public java.util.List<? extends policy.PolicyCondition.PolicyRuleConditionOrBuilder> + getConditionListOrBuilderList() { + return conditionList_; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + @java.lang.Override + public int getConditionListCount() { + return conditionList_.size(); + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + @java.lang.Override + public policy.PolicyCondition.PolicyRuleCondition getConditionList(int index) { + return conditionList_.get(index); + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + @java.lang.Override + public policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder( + int index) { + return conditionList_.get(index); + } + + public static final int BOOLEANOPERATOR_FIELD_NUMBER = 5; + private int booleanOperator_; + /** + * <pre> + * Evaluation operator to be used + * </pre> + * + * <code>.policy.BooleanOperator booleanOperator = 5;</code> + * @return The enum numeric value on the wire for booleanOperator. + */ + @java.lang.Override public int getBooleanOperatorValue() { + return booleanOperator_; + } + /** + * <pre> + * Evaluation operator to be used + * </pre> + * + * <code>.policy.BooleanOperator booleanOperator = 5;</code> + * @return The booleanOperator. + */ + @java.lang.Override public policy.PolicyCondition.BooleanOperator getBooleanOperator() { + @SuppressWarnings("deprecation") + policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); + return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; + } + + public static final int ACTIONLIST_FIELD_NUMBER = 6; + private java.util.List<policy.PolicyAction.PolicyRuleAction> actionList_; + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + @java.lang.Override + public java.util.List<policy.PolicyAction.PolicyRuleAction> getActionListList() { + return actionList_; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + @java.lang.Override + public java.util.List<? extends policy.PolicyAction.PolicyRuleActionOrBuilder> + getActionListOrBuilderList() { + return actionList_; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + @java.lang.Override + public int getActionListCount() { + return actionList_.size(); + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + @java.lang.Override + public policy.PolicyAction.PolicyRuleAction getActionList(int index) { + return actionList_.get(index); } /** - * <code>.context.Event event = 1;</code> + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> */ @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + public policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder( + int index) { + return actionList_.get(index); } private byte memoizedIsInitialized = -1; @@ -1783,8 +1955,23 @@ public final class Policy { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); + if (policyRuleId_ != null) { + output.writeMessage(1, getPolicyRuleId()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPolicyRuleState()); + } + if (priority_ != 0) { + output.writeUInt32(3, priority_); + } + for (int i = 0; i < conditionList_.size(); i++) { + output.writeMessage(4, conditionList_.get(i)); + } + if (booleanOperator_ != policy.PolicyCondition.BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_UNDEFINED.getNumber()) { + output.writeEnum(5, booleanOperator_); + } + for (int i = 0; i < actionList_.size(); i++) { + output.writeMessage(6, actionList_.get(i)); } unknownFields.writeTo(output); } @@ -1795,9 +1982,29 @@ public final class Policy { if (size != -1) return size; size = 0; - if (event_ != null) { + if (policyRuleId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPolicyRuleId()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPolicyRuleState()); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, priority_); + } + for (int i = 0; i < conditionList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, conditionList_.get(i)); + } + if (booleanOperator_ != policy.PolicyCondition.BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); + .computeEnumSize(5, booleanOperator_); + } + for (int i = 0; i < actionList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, actionList_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -1809,16 +2016,28 @@ public final class Policy { if (obj == this) { return true; } - if (!(obj instanceof policy.Policy.PolicyRuleEvent)) { + if (!(obj instanceof policy.Policy.PolicyRuleBasic)) { return super.equals(obj); } - policy.Policy.PolicyRuleEvent other = (policy.Policy.PolicyRuleEvent) obj; + policy.Policy.PolicyRuleBasic other = (policy.Policy.PolicyRuleBasic) obj; - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; + if (hasPolicyRuleId() != other.hasPolicyRuleId()) return false; + if (hasPolicyRuleId()) { + if (!getPolicyRuleId() + .equals(other.getPolicyRuleId())) return false; + } + if (hasPolicyRuleState() != other.hasPolicyRuleState()) return false; + if (hasPolicyRuleState()) { + if (!getPolicyRuleState() + .equals(other.getPolicyRuleState())) return false; } + if (getPriority() + != other.getPriority()) return false; + if (!getConditionListList() + .equals(other.getConditionListList())) return false; + if (booleanOperator_ != other.booleanOperator_) return false; + if (!getActionListList() + .equals(other.getActionListList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1830,78 +2049,94 @@ public final class Policy { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); + if (hasPolicyRuleId()) { + hash = (37 * hash) + POLICYRULEID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleId().hashCode(); + } + if (hasPolicyRuleState()) { + hash = (37 * hash) + POLICYRULESTATE_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleState().hashCode(); + } + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + if (getConditionListCount() > 0) { + hash = (37 * hash) + CONDITIONLIST_FIELD_NUMBER; + hash = (53 * hash) + getConditionListList().hashCode(); + } + hash = (37 * hash) + BOOLEANOPERATOR_FIELD_NUMBER; + hash = (53 * hash) + booleanOperator_; + if (getActionListCount() > 0) { + hash = (37 * hash) + ACTIONLIST_FIELD_NUMBER; + hash = (53 * hash) + getActionListList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static policy.Policy.PolicyRuleEvent parseFrom( + public static policy.Policy.PolicyRuleBasic parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static policy.Policy.PolicyRuleEvent parseFrom( + public static policy.Policy.PolicyRuleBasic parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static policy.Policy.PolicyRuleEvent parseFrom( + public static policy.Policy.PolicyRuleBasic parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static policy.Policy.PolicyRuleEvent parseFrom( + public static policy.Policy.PolicyRuleBasic parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static policy.Policy.PolicyRuleEvent parseFrom(byte[] data) + public static policy.Policy.PolicyRuleBasic parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static policy.Policy.PolicyRuleEvent parseFrom( + public static policy.Policy.PolicyRuleBasic parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static policy.Policy.PolicyRuleEvent parseFrom(java.io.InputStream input) + public static policy.Policy.PolicyRuleBasic parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static policy.Policy.PolicyRuleEvent parseFrom( + public static policy.Policy.PolicyRuleBasic 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 policy.Policy.PolicyRuleEvent parseDelimitedFrom(java.io.InputStream input) + public static policy.Policy.PolicyRuleBasic parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static policy.Policy.PolicyRuleEvent parseDelimitedFrom( + public static policy.Policy.PolicyRuleBasic 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 policy.Policy.PolicyRuleEvent parseFrom( + public static policy.Policy.PolicyRuleBasic parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static policy.Policy.PolicyRuleEvent parseFrom( + public static policy.Policy.PolicyRuleBasic parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1914,7 +2149,7 @@ public final class Policy { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(policy.Policy.PolicyRuleEvent prototype) { + public static Builder newBuilder(policy.Policy.PolicyRuleBasic prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -1931,31 +2166,29 @@ public final class Policy { } /** * <pre> - * IETF draft: Framework for Use of ECA (Event Condition Action) in Network Self Management - * Source: https://datatracker.ietf.org/doc/draft-bwd-netmod-eca-framework/ - * Event + * Basic policy rule attributes * </pre> * - * Protobuf type {@code policy.PolicyRuleEvent} + * Protobuf type {@code policy.PolicyRuleBasic} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleEvent) - policy.Policy.PolicyRuleEventOrBuilder { + // @@protoc_insertion_point(builder_implements:policy.PolicyRuleBasic) + policy.Policy.PolicyRuleBasicOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleEvent_descriptor; + return policy.Policy.internal_static_policy_PolicyRuleBasic_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleEvent_fieldAccessorTable + return policy.Policy.internal_static_policy_PolicyRuleBasic_fieldAccessorTable .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleEvent.class, policy.Policy.PolicyRuleEvent.Builder.class); + policy.Policy.PolicyRuleBasic.class, policy.Policy.PolicyRuleBasic.Builder.class); } - // Construct using policy.Policy.PolicyRuleEvent.newBuilder() + // Construct using policy.Policy.PolicyRuleBasic.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1968,16 +2201,41 @@ public final class Policy { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { + getPolicyRuleStateFieldBuilder(); + getConditionListFieldBuilder(); + getActionListFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; + if (policyRuleIdBuilder_ == null) { + policyRuleId_ = null; + } else { + policyRuleId_ = null; + policyRuleIdBuilder_ = null; + } + if (policyRuleStateBuilder_ == null) { + policyRuleState_ = null; } else { - event_ = null; - eventBuilder_ = null; + policyRuleStateBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + priority_ = 0; + + if (conditionListBuilder_ == null) { + conditionList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + conditionListBuilder_.clear(); + } + booleanOperator_ = 0; + + if (actionListBuilder_ == null) { + actionList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + actionListBuilder_.clear(); } return this; } @@ -1985,17 +2243,17 @@ public final class Policy { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleEvent_descriptor; + return policy.Policy.internal_static_policy_PolicyRuleBasic_descriptor; } @java.lang.Override - public policy.Policy.PolicyRuleEvent getDefaultInstanceForType() { - return policy.Policy.PolicyRuleEvent.getDefaultInstance(); + public policy.Policy.PolicyRuleBasic getDefaultInstanceForType() { + return policy.Policy.PolicyRuleBasic.getDefaultInstance(); } @java.lang.Override - public policy.Policy.PolicyRuleEvent build() { - policy.Policy.PolicyRuleEvent result = buildPartial(); + public policy.Policy.PolicyRuleBasic build() { + policy.Policy.PolicyRuleBasic result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -2003,25 +2261,56 @@ public final class Policy { } @java.lang.Override - public policy.Policy.PolicyRuleEvent buildPartial() { - policy.Policy.PolicyRuleEvent result = new policy.Policy.PolicyRuleEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; + public policy.Policy.PolicyRuleBasic buildPartial() { + policy.Policy.PolicyRuleBasic result = new policy.Policy.PolicyRuleBasic(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (policyRuleIdBuilder_ == null) { + result.policyRuleId_ = policyRuleId_; } else { - result.event_ = eventBuilder_.build(); + result.policyRuleId_ = policyRuleIdBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + if (((from_bitField0_ & 0x00000001) != 0)) { + if (policyRuleStateBuilder_ == null) { + result.policyRuleState_ = policyRuleState_; + } else { + result.policyRuleState_ = policyRuleStateBuilder_.build(); + } + to_bitField0_ |= 0x00000001; + } + result.priority_ = priority_; + if (conditionListBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + conditionList_ = java.util.Collections.unmodifiableList(conditionList_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.conditionList_ = conditionList_; + } else { + result.conditionList_ = conditionListBuilder_.build(); + } + result.booleanOperator_ = booleanOperator_; + if (actionListBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + actionList_ = java.util.Collections.unmodifiableList(actionList_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.actionList_ = actionList_; + } else { + result.actionList_ = actionListBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } @java.lang.Override @@ -2048,18 +2337,79 @@ public final class Policy { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleEvent) { - return mergeFrom((policy.Policy.PolicyRuleEvent)other); + if (other instanceof policy.Policy.PolicyRuleBasic) { + return mergeFrom((policy.Policy.PolicyRuleBasic)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(policy.Policy.PolicyRuleEvent other) { - if (other == policy.Policy.PolicyRuleEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); + public Builder mergeFrom(policy.Policy.PolicyRuleBasic other) { + if (other == policy.Policy.PolicyRuleBasic.getDefaultInstance()) return this; + if (other.hasPolicyRuleId()) { + mergePolicyRuleId(other.getPolicyRuleId()); + } + if (other.hasPolicyRuleState()) { + mergePolicyRuleState(other.getPolicyRuleState()); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (conditionListBuilder_ == null) { + if (!other.conditionList_.isEmpty()) { + if (conditionList_.isEmpty()) { + conditionList_ = other.conditionList_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConditionListIsMutable(); + conditionList_.addAll(other.conditionList_); + } + onChanged(); + } + } else { + if (!other.conditionList_.isEmpty()) { + if (conditionListBuilder_.isEmpty()) { + conditionListBuilder_.dispose(); + conditionListBuilder_ = null; + conditionList_ = other.conditionList_; + bitField0_ = (bitField0_ & ~0x00000002); + conditionListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConditionListFieldBuilder() : null; + } else { + conditionListBuilder_.addAllMessages(other.conditionList_); + } + } + } + if (other.booleanOperator_ != 0) { + setBooleanOperatorValue(other.getBooleanOperatorValue()); + } + if (actionListBuilder_ == null) { + if (!other.actionList_.isEmpty()) { + if (actionList_.isEmpty()) { + actionList_ = other.actionList_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureActionListIsMutable(); + actionList_.addAll(other.actionList_); + } + onChanged(); + } + } else { + if (!other.actionList_.isEmpty()) { + if (actionListBuilder_.isEmpty()) { + actionListBuilder_.dispose(); + actionListBuilder_ = null; + actionList_ = other.actionList_; + bitField0_ = (bitField0_ & ~0x00000004); + actionListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getActionListFieldBuilder() : null; + } else { + actionListBuilder_.addAllMessages(other.actionList_); + } + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -2076,11 +2426,11 @@ public final class Policy { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleEvent parsedMessage = null; + policy.Policy.PolicyRuleBasic parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleEvent) e.getUnfinishedMessage(); + parsedMessage = (policy.Policy.PolicyRuleBasic) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -2089,895 +2439,2707 @@ public final class Policy { } return this; } + private int bitField0_; - private context.ContextOuterClass.Event event_; + private policy.Policy.PolicyRuleId policyRuleId_; private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; + policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> policyRuleIdBuilder_; /** - * <code>.context.Event event = 1;</code> - * @return Whether the event field is set. + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * @return Whether the policyRuleId field is set. */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + public boolean hasPolicyRuleId() { + return policyRuleIdBuilder_ != null || policyRuleId_ != null; } /** - * <code>.context.Event event = 1;</code> - * @return The event. + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * @return The policyRuleId. */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + public policy.Policy.PolicyRuleId getPolicyRuleId() { + if (policyRuleIdBuilder_ == null) { + return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; } else { - return eventBuilder_.getMessage(); + return policyRuleIdBuilder_.getMessage(); } } /** - * <code>.context.Event event = 1;</code> + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { + public Builder setPolicyRuleId(policy.Policy.PolicyRuleId value) { + if (policyRuleIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - event_ = value; + policyRuleId_ = value; onChanged(); } else { - eventBuilder_.setMessage(value); + policyRuleIdBuilder_.setMessage(value); } return this; } /** - * <code>.context.Event event = 1;</code> + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); + public Builder setPolicyRuleId( + policy.Policy.PolicyRuleId.Builder builderForValue) { + if (policyRuleIdBuilder_ == null) { + policyRuleId_ = builderForValue.build(); onChanged(); } else { - eventBuilder_.setMessage(builderForValue.build()); + policyRuleIdBuilder_.setMessage(builderForValue.build()); } return this; } /** - * <code>.context.Event event = 1;</code> + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + public Builder mergePolicyRuleId(policy.Policy.PolicyRuleId value) { + if (policyRuleIdBuilder_ == null) { + if (policyRuleId_ != null) { + policyRuleId_ = + policy.Policy.PolicyRuleId.newBuilder(policyRuleId_).mergeFrom(value).buildPartial(); } else { - event_ = value; + policyRuleId_ = value; } onChanged(); } else { - eventBuilder_.mergeFrom(value); + policyRuleIdBuilder_.mergeFrom(value); } return this; } /** - * <code>.context.Event event = 1;</code> + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; + public Builder clearPolicyRuleId() { + if (policyRuleIdBuilder_ == null) { + policyRuleId_ = null; onChanged(); } else { - event_ = null; - eventBuilder_ = null; + policyRuleId_ = null; + policyRuleIdBuilder_ = null; } return this; } /** - * <code>.context.Event event = 1;</code> + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { + public policy.Policy.PolicyRuleId.Builder getPolicyRuleIdBuilder() { onChanged(); - return getEventFieldBuilder().getBuilder(); + return getPolicyRuleIdFieldBuilder().getBuilder(); } /** - * <code>.context.Event event = 1;</code> + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); + public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder() { + if (policyRuleIdBuilder_ != null) { + return policyRuleIdBuilder_.getMessageOrBuilder(); } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; + return policyRuleId_ == null ? + policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; } } /** - * <code>.context.Event event = 1;</code> + * <code>.policy.PolicyRuleId policyRuleId = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), + policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> + getPolicyRuleIdFieldBuilder() { + if (policyRuleIdBuilder_ == null) { + policyRuleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder>( + getPolicyRuleId(), getParentForChildren(), isClean()); - event_ = null; + policyRuleId_ = null; } - return eventBuilder_; + return policyRuleIdBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + + private policy.Policy.PolicyRuleState policyRuleState_; + private com.google.protobuf.SingleFieldBuilderV3< + policy.Policy.PolicyRuleState, policy.Policy.PolicyRuleState.Builder, policy.Policy.PolicyRuleStateOrBuilder> policyRuleStateBuilder_; + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + * @return Whether the policyRuleState field is set. + */ + public boolean hasPolicyRuleState() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + * @return The policyRuleState. + */ + public policy.Policy.PolicyRuleState getPolicyRuleState() { + if (policyRuleStateBuilder_ == null) { + return policyRuleState_ == null ? policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; + } else { + return policyRuleStateBuilder_.getMessage(); + } + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + */ + public Builder setPolicyRuleState(policy.Policy.PolicyRuleState value) { + if (policyRuleStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyRuleState_ = value; + onChanged(); + } else { + policyRuleStateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + */ + public Builder setPolicyRuleState( + policy.Policy.PolicyRuleState.Builder builderForValue) { + if (policyRuleStateBuilder_ == null) { + policyRuleState_ = builderForValue.build(); + onChanged(); + } else { + policyRuleStateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + */ + public Builder mergePolicyRuleState(policy.Policy.PolicyRuleState value) { + if (policyRuleStateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + policyRuleState_ != null && + policyRuleState_ != policy.Policy.PolicyRuleState.getDefaultInstance()) { + policyRuleState_ = + policy.Policy.PolicyRuleState.newBuilder(policyRuleState_).mergeFrom(value).buildPartial(); + } else { + policyRuleState_ = value; + } + onChanged(); + } else { + policyRuleStateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + */ + public Builder clearPolicyRuleState() { + if (policyRuleStateBuilder_ == null) { + policyRuleState_ = null; + onChanged(); + } else { + policyRuleStateBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + */ + public policy.Policy.PolicyRuleState.Builder getPolicyRuleStateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPolicyRuleStateFieldBuilder().getBuilder(); + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + */ + public policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder() { + if (policyRuleStateBuilder_ != null) { + return policyRuleStateBuilder_.getMessageOrBuilder(); + } else { + return policyRuleState_ == null ? + policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; + } + } + /** + * <code>optional .policy.PolicyRuleState policyRuleState = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + policy.Policy.PolicyRuleState, policy.Policy.PolicyRuleState.Builder, policy.Policy.PolicyRuleStateOrBuilder> + getPolicyRuleStateFieldBuilder() { + if (policyRuleStateBuilder_ == null) { + policyRuleStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + policy.Policy.PolicyRuleState, policy.Policy.PolicyRuleState.Builder, policy.Policy.PolicyRuleStateOrBuilder>( + getPolicyRuleState(), + getParentForChildren(), + isClean()); + policyRuleState_ = null; + } + return policyRuleStateBuilder_; } + private int priority_ ; + /** + * <code>uint32 priority = 3;</code> + * @return The priority. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public int getPriority() { + return priority_; + } + /** + * <code>uint32 priority = 3;</code> + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + onChanged(); + return this; + } + /** + * <code>uint32 priority = 3;</code> + * @return This builder for chaining. + */ + public Builder clearPriority() { + + priority_ = 0; + onChanged(); + return this; } + private java.util.List<policy.PolicyCondition.PolicyRuleCondition> conditionList_ = + java.util.Collections.emptyList(); + private void ensureConditionListIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + conditionList_ = new java.util.ArrayList<policy.PolicyCondition.PolicyRuleCondition>(conditionList_); + bitField0_ |= 0x00000002; + } + } - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleEvent) - } + private com.google.protobuf.RepeatedFieldBuilderV3< + policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder> conditionListBuilder_; + + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public java.util.List<policy.PolicyCondition.PolicyRuleCondition> getConditionListList() { + if (conditionListBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditionList_); + } else { + return conditionListBuilder_.getMessageList(); + } + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public int getConditionListCount() { + if (conditionListBuilder_ == null) { + return conditionList_.size(); + } else { + return conditionListBuilder_.getCount(); + } + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public policy.PolicyCondition.PolicyRuleCondition getConditionList(int index) { + if (conditionListBuilder_ == null) { + return conditionList_.get(index); + } else { + return conditionListBuilder_.getMessage(index); + } + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public Builder setConditionList( + int index, policy.PolicyCondition.PolicyRuleCondition value) { + if (conditionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionListIsMutable(); + conditionList_.set(index, value); + onChanged(); + } else { + conditionListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public Builder setConditionList( + int index, policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + conditionList_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public Builder addConditionList(policy.PolicyCondition.PolicyRuleCondition value) { + if (conditionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionListIsMutable(); + conditionList_.add(value); + onChanged(); + } else { + conditionListBuilder_.addMessage(value); + } + return this; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public Builder addConditionList( + int index, policy.PolicyCondition.PolicyRuleCondition value) { + if (conditionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionListIsMutable(); + conditionList_.add(index, value); + onChanged(); + } else { + conditionListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public Builder addConditionList( + policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + conditionList_.add(builderForValue.build()); + onChanged(); + } else { + conditionListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public Builder addConditionList( + int index, policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + conditionList_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public Builder addAllConditionList( + java.lang.Iterable<? extends policy.PolicyCondition.PolicyRuleCondition> values) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, conditionList_); + onChanged(); + } else { + conditionListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public Builder clearConditionList() { + if (conditionListBuilder_ == null) { + conditionList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + conditionListBuilder_.clear(); + } + return this; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public Builder removeConditionList(int index) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + conditionList_.remove(index); + onChanged(); + } else { + conditionListBuilder_.remove(index); + } + return this; + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public policy.PolicyCondition.PolicyRuleCondition.Builder getConditionListBuilder( + int index) { + return getConditionListFieldBuilder().getBuilder(index); + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder( + int index) { + if (conditionListBuilder_ == null) { + return conditionList_.get(index); } else { + return conditionListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public java.util.List<? extends policy.PolicyCondition.PolicyRuleConditionOrBuilder> + getConditionListOrBuilderList() { + if (conditionListBuilder_ != null) { + return conditionListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditionList_); + } + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public policy.PolicyCondition.PolicyRuleCondition.Builder addConditionListBuilder() { + return getConditionListFieldBuilder().addBuilder( + policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()); + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public policy.PolicyCondition.PolicyRuleCondition.Builder addConditionListBuilder( + int index) { + return getConditionListFieldBuilder().addBuilder( + index, policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()); + } + /** + * <pre> + * Event-Condition-Action (ECA) model + * </pre> + * + * <code>repeated .policy.PolicyRuleCondition conditionList = 4;</code> + */ + public java.util.List<policy.PolicyCondition.PolicyRuleCondition.Builder> + getConditionListBuilderList() { + return getConditionListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder> + getConditionListFieldBuilder() { + if (conditionListBuilder_ == null) { + conditionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder>( + conditionList_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + conditionList_ = null; + } + return conditionListBuilder_; + } + + private int booleanOperator_ = 0; + /** + * <pre> + * Evaluation operator to be used + * </pre> + * + * <code>.policy.BooleanOperator booleanOperator = 5;</code> + * @return The enum numeric value on the wire for booleanOperator. + */ + @java.lang.Override public int getBooleanOperatorValue() { + return booleanOperator_; + } + /** + * <pre> + * Evaluation operator to be used + * </pre> + * + * <code>.policy.BooleanOperator booleanOperator = 5;</code> + * @param value The enum numeric value on the wire for booleanOperator to set. + * @return This builder for chaining. + */ + public Builder setBooleanOperatorValue(int value) { + + booleanOperator_ = value; + onChanged(); + return this; + } + /** + * <pre> + * Evaluation operator to be used + * </pre> + * + * <code>.policy.BooleanOperator booleanOperator = 5;</code> + * @return The booleanOperator. + */ + @java.lang.Override + public policy.PolicyCondition.BooleanOperator getBooleanOperator() { + @SuppressWarnings("deprecation") + policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); + return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; + } + /** + * <pre> + * Evaluation operator to be used + * </pre> + * + * <code>.policy.BooleanOperator booleanOperator = 5;</code> + * @param value The booleanOperator to set. + * @return This builder for chaining. + */ + public Builder setBooleanOperator(policy.PolicyCondition.BooleanOperator value) { + if (value == null) { + throw new NullPointerException(); + } + + booleanOperator_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <pre> + * Evaluation operator to be used + * </pre> + * + * <code>.policy.BooleanOperator booleanOperator = 5;</code> + * @return This builder for chaining. + */ + public Builder clearBooleanOperator() { + + booleanOperator_ = 0; + onChanged(); + return this; + } + + private java.util.List<policy.PolicyAction.PolicyRuleAction> actionList_ = + java.util.Collections.emptyList(); + private void ensureActionListIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + actionList_ = new java.util.ArrayList<policy.PolicyAction.PolicyRuleAction>(actionList_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder> actionListBuilder_; + + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public java.util.List<policy.PolicyAction.PolicyRuleAction> getActionListList() { + if (actionListBuilder_ == null) { + return java.util.Collections.unmodifiableList(actionList_); + } else { + return actionListBuilder_.getMessageList(); + } + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public int getActionListCount() { + if (actionListBuilder_ == null) { + return actionList_.size(); + } else { + return actionListBuilder_.getCount(); + } + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public policy.PolicyAction.PolicyRuleAction getActionList(int index) { + if (actionListBuilder_ == null) { + return actionList_.get(index); + } else { + return actionListBuilder_.getMessage(index); + } + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public Builder setActionList( + int index, policy.PolicyAction.PolicyRuleAction value) { + if (actionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionListIsMutable(); + actionList_.set(index, value); + onChanged(); + } else { + actionListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public Builder setActionList( + int index, policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + actionList_.set(index, builderForValue.build()); + onChanged(); + } else { + actionListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public Builder addActionList(policy.PolicyAction.PolicyRuleAction value) { + if (actionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionListIsMutable(); + actionList_.add(value); + onChanged(); + } else { + actionListBuilder_.addMessage(value); + } + return this; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public Builder addActionList( + int index, policy.PolicyAction.PolicyRuleAction value) { + if (actionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionListIsMutable(); + actionList_.add(index, value); + onChanged(); + } else { + actionListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public Builder addActionList( + policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + actionList_.add(builderForValue.build()); + onChanged(); + } else { + actionListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public Builder addActionList( + int index, policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + actionList_.add(index, builderForValue.build()); + onChanged(); + } else { + actionListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public Builder addAllActionList( + java.lang.Iterable<? extends policy.PolicyAction.PolicyRuleAction> values) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actionList_); + onChanged(); + } else { + actionListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public Builder clearActionList() { + if (actionListBuilder_ == null) { + actionList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + actionListBuilder_.clear(); + } + return this; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public Builder removeActionList(int index) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + actionList_.remove(index); + onChanged(); + } else { + actionListBuilder_.remove(index); + } + return this; + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public policy.PolicyAction.PolicyRuleAction.Builder getActionListBuilder( + int index) { + return getActionListFieldBuilder().getBuilder(index); + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder( + int index) { + if (actionListBuilder_ == null) { + return actionList_.get(index); } else { + return actionListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public java.util.List<? extends policy.PolicyAction.PolicyRuleActionOrBuilder> + getActionListOrBuilderList() { + if (actionListBuilder_ != null) { + return actionListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actionList_); + } + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public policy.PolicyAction.PolicyRuleAction.Builder addActionListBuilder() { + return getActionListFieldBuilder().addBuilder( + policy.PolicyAction.PolicyRuleAction.getDefaultInstance()); + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public policy.PolicyAction.PolicyRuleAction.Builder addActionListBuilder( + int index) { + return getActionListFieldBuilder().addBuilder( + index, policy.PolicyAction.PolicyRuleAction.getDefaultInstance()); + } + /** + * <pre> + * One or more actions should be applied + * </pre> + * + * <code>repeated .policy.PolicyRuleAction actionList = 6;</code> + */ + public java.util.List<policy.PolicyAction.PolicyRuleAction.Builder> + getActionListBuilderList() { + return getActionListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder> + getActionListFieldBuilder() { + if (actionListBuilder_ == null) { + actionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder>( + actionList_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + actionList_ = null; + } + return actionListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleBasic) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleBasic) + private static final policy.Policy.PolicyRuleBasic DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleBasic(); + } + + public static policy.Policy.PolicyRuleBasic getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<PolicyRuleBasic> + PARSER = new com.google.protobuf.AbstractParser<PolicyRuleBasic>() { + @java.lang.Override + public PolicyRuleBasic parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PolicyRuleBasic(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<PolicyRuleBasic> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<PolicyRuleBasic> getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleBasic getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PolicyRuleServiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.PolicyRuleService) + com.google.protobuf.MessageOrBuilder { + + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return Whether the policyRuleBasic field is set. + */ + boolean hasPolicyRuleBasic(); + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return The policyRuleBasic. + */ + policy.Policy.PolicyRuleBasic getPolicyRuleBasic(); + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder(); + + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + java.util.List<context.ContextOuterClass.DeviceId> + getDeviceListList(); + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + context.ContextOuterClass.DeviceId getDeviceList(int index); + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + int getDeviceListCount(); + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + java.util.List<? extends context.ContextOuterClass.DeviceIdOrBuilder> + getDeviceListOrBuilderList(); + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( + int index); + } + /** + * <pre> + * Service-oriented policy rule + * </pre> + * + * Protobuf type {@code policy.PolicyRuleService} + */ + public static final class PolicyRuleService extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.PolicyRuleService) + PolicyRuleServiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use PolicyRuleService.newBuilder() to construct. + private PolicyRuleService(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private PolicyRuleService() { + deviceList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PolicyRuleService(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PolicyRuleService( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + policy.Policy.PolicyRuleBasic.Builder subBuilder = null; + if (policyRuleBasic_ != null) { + subBuilder = policyRuleBasic_.toBuilder(); + } + policyRuleBasic_ = input.readMessage(policy.Policy.PolicyRuleBasic.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policyRuleBasic_); + policyRuleBasic_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + context.ContextOuterClass.ServiceId.Builder subBuilder = null; + if (serviceId_ != null) { + subBuilder = serviceId_.toBuilder(); + } + serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(serviceId_); + serviceId_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(); + mutable_bitField0_ |= 0x00000001; + } + deviceList_.add( + input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deviceList_ = java.util.Collections.unmodifiableList(deviceList_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleService_descriptor; + } - // @@protoc_insertion_point(class_scope:policy.PolicyRuleEvent) - private static final policy.Policy.PolicyRuleEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleEvent(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + policy.Policy.PolicyRuleService.class, policy.Policy.PolicyRuleService.Builder.class); + } + + public static final int POLICYRULEBASIC_FIELD_NUMBER = 1; + private policy.Policy.PolicyRuleBasic policyRuleBasic_; + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return Whether the policyRuleBasic field is set. + */ + @java.lang.Override + public boolean hasPolicyRuleBasic() { + return policyRuleBasic_ != null; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return The policyRuleBasic. + */ + @java.lang.Override + public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + @java.lang.Override + public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { + return getPolicyRuleBasic(); + } + + public static final int SERVICEID_FIELD_NUMBER = 2; + private context.ContextOuterClass.ServiceId serviceId_; + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } + + public static final int DEVICELIST_FIELD_NUMBER = 3; + private java.util.List<context.ContextOuterClass.DeviceId> deviceList_; + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + @java.lang.Override + public java.util.List<context.ContextOuterClass.DeviceId> getDeviceListList() { + return deviceList_; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + @java.lang.Override + public java.util.List<? extends context.ContextOuterClass.DeviceIdOrBuilder> + getDeviceListOrBuilderList() { + return deviceList_; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + @java.lang.Override + public int getDeviceListCount() { + return deviceList_.size(); + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceList(int index) { + return deviceList_.get(index); + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( + int index) { + return deviceList_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (policyRuleBasic_ != null) { + output.writeMessage(1, getPolicyRuleBasic()); + } + if (serviceId_ != null) { + output.writeMessage(2, getServiceId()); + } + for (int i = 0; i < deviceList_.size(); i++) { + output.writeMessage(3, deviceList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (policyRuleBasic_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPolicyRuleBasic()); + } + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getServiceId()); + } + for (int i = 0; i < deviceList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, deviceList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleService)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleService other = (policy.Policy.PolicyRuleService) obj; + + if (hasPolicyRuleBasic() != other.hasPolicyRuleBasic()) return false; + if (hasPolicyRuleBasic()) { + if (!getPolicyRuleBasic() + .equals(other.getPolicyRuleBasic())) return false; + } + if (hasServiceId() != other.hasServiceId()) return false; + if (hasServiceId()) { + if (!getServiceId() + .equals(other.getServiceId())) return false; + } + if (!getDeviceListList() + .equals(other.getDeviceListList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicyRuleBasic()) { + hash = (37 * hash) + POLICYRULEBASIC_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleBasic().hashCode(); + } + if (hasServiceId()) { + hash = (37 * hash) + SERVICEID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + if (getDeviceListCount() > 0) { + hash = (37 * hash) + DEVICELIST_FIELD_NUMBER; + hash = (53 * hash) + getDeviceListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRuleService parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static policy.Policy.PolicyRuleService parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static policy.Policy.PolicyRuleService parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static policy.Policy.PolicyRuleService parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static policy.Policy.PolicyRuleService parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static policy.Policy.PolicyRuleService parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static policy.Policy.PolicyRuleService parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static policy.Policy.PolicyRuleService 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 policy.Policy.PolicyRuleEvent getDefaultInstance() { - return DEFAULT_INSTANCE; + public static policy.Policy.PolicyRuleService parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - - private static final com.google.protobuf.Parser<PolicyRuleEvent> - PARSER = new com.google.protobuf.AbstractParser<PolicyRuleEvent>() { - @java.lang.Override - public PolicyRuleEvent parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleEvent(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<PolicyRuleEvent> parser() { - return PARSER; + public static policy.Policy.PolicyRuleService 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 policy.Policy.PolicyRuleService parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static policy.Policy.PolicyRuleService parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public com.google.protobuf.Parser<PolicyRuleEvent> getParserForType() { - return PARSER; + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(policy.Policy.PolicyRuleService prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override - public policy.Policy.PolicyRuleEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - } - - public interface PolicyRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRule) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * Basic policy rule attributes - * </pre> - * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> - * @return Whether the policyRuleId field is set. - */ - boolean hasPolicyRuleId(); - /** - * <pre> - * Basic policy rule attributes - * </pre> - * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> - * @return The policyRuleId. - */ - policy.Policy.PolicyRuleId getPolicyRuleId(); + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * <pre> - * Basic policy rule attributes + * Service-oriented policy rule * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * Protobuf type {@code policy.PolicyRuleService} */ - policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder(); + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:policy.PolicyRuleService) + policy.Policy.PolicyRuleServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleService_descriptor; + } - /** - * <code>.policy.PolicyRuleType policyRuleType = 2;</code> - * @return The enum numeric value on the wire for policyRuleType. - */ - int getPolicyRuleTypeValue(); - /** - * <code>.policy.PolicyRuleType policyRuleType = 2;</code> - * @return The policyRuleType. - */ - policy.Policy.PolicyRuleType getPolicyRuleType(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + policy.Policy.PolicyRuleService.class, policy.Policy.PolicyRuleService.Builder.class); + } - /** - * <code>uint32 priority = 3;</code> - * @return The priority. - */ - int getPriority(); + // Construct using policy.Policy.PolicyRuleService.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - * @return The event. - */ - policy.Policy.PolicyRuleEvent getEvent(); - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - */ - policy.Policy.PolicyRuleEventOrBuilder getEventOrBuilder(); + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDeviceListFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = null; + } else { + policyRuleBasic_ = null; + policyRuleBasicBuilder_ = null; + } + if (serviceIdBuilder_ == null) { + serviceId_ = null; + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + if (deviceListBuilder_ == null) { + deviceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deviceListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleService_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRuleService getDefaultInstanceForType() { + return policy.Policy.PolicyRuleService.getDefaultInstance(); + } + + @java.lang.Override + public policy.Policy.PolicyRuleService build() { + policy.Policy.PolicyRuleService result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public policy.Policy.PolicyRuleService buildPartial() { + policy.Policy.PolicyRuleService result = new policy.Policy.PolicyRuleService(this); + int from_bitField0_ = bitField0_; + if (policyRuleBasicBuilder_ == null) { + result.policyRuleBasic_ = policyRuleBasic_; + } else { + result.policyRuleBasic_ = policyRuleBasicBuilder_.build(); + } + if (serviceIdBuilder_ == null) { + result.serviceId_ = serviceId_; + } else { + result.serviceId_ = serviceIdBuilder_.build(); + } + if (deviceListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deviceList_ = java.util.Collections.unmodifiableList(deviceList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceList_ = deviceList_; + } else { + result.deviceList_ = deviceListBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleService) { + return mergeFrom((policy.Policy.PolicyRuleService)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.Policy.PolicyRuleService other) { + if (other == policy.Policy.PolicyRuleService.getDefaultInstance()) return this; + if (other.hasPolicyRuleBasic()) { + mergePolicyRuleBasic(other.getPolicyRuleBasic()); + } + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + if (deviceListBuilder_ == null) { + if (!other.deviceList_.isEmpty()) { + if (deviceList_.isEmpty()) { + deviceList_ = other.deviceList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceListIsMutable(); + deviceList_.addAll(other.deviceList_); + } + onChanged(); + } + } else { + if (!other.deviceList_.isEmpty()) { + if (deviceListBuilder_.isEmpty()) { + deviceListBuilder_.dispose(); + deviceListBuilder_ = null; + deviceList_ = other.deviceList_; + bitField0_ = (bitField0_ & ~0x00000001); + deviceListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDeviceListFieldBuilder() : null; + } else { + deviceListBuilder_.addAllMessages(other.deviceList_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - java.util.List<policy.PolicyCondition.PolicyRuleCondition> - getConditionListList(); - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - policy.PolicyCondition.PolicyRuleCondition getConditionList(int index); - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - int getConditionListCount(); - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - java.util.List<? extends policy.PolicyCondition.PolicyRuleConditionOrBuilder> - getConditionListOrBuilderList(); - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder( - int index); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + policy.Policy.PolicyRuleService parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleService) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; - /** - * <pre> - * Evaluation operator to be used - * </pre> - * - * <code>.policy.BooleanOperator booleanOperator = 6;</code> - * @return The enum numeric value on the wire for booleanOperator. - */ - int getBooleanOperatorValue(); - /** - * <pre> - * Evaluation operator to be used - * </pre> - * - * <code>.policy.BooleanOperator booleanOperator = 6;</code> - * @return The booleanOperator. - */ - policy.PolicyCondition.BooleanOperator getBooleanOperator(); + private policy.Policy.PolicyRuleBasic policyRuleBasic_; + private com.google.protobuf.SingleFieldBuilderV3< + policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder> policyRuleBasicBuilder_; + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return Whether the policyRuleBasic field is set. + */ + public boolean hasPolicyRuleBasic() { + return policyRuleBasicBuilder_ != null || policyRuleBasic_ != null; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return The policyRuleBasic. + */ + public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { + if (policyRuleBasicBuilder_ == null) { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } else { + return policyRuleBasicBuilder_.getMessage(); + } + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { + if (policyRuleBasicBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyRuleBasic_ = value; + onChanged(); + } else { + policyRuleBasicBuilder_.setMessage(value); + } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - java.util.List<policy.PolicyAction.PolicyRuleAction> - getActionListList(); - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - policy.PolicyAction.PolicyRuleAction getActionList(int index); - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - int getActionListCount(); - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - java.util.List<? extends policy.PolicyAction.PolicyRuleActionOrBuilder> - getActionListOrBuilderList(); - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder( - int index); + return this; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public Builder setPolicyRuleBasic( + policy.Policy.PolicyRuleBasic.Builder builderForValue) { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = builderForValue.build(); + onChanged(); + } else { + policyRuleBasicBuilder_.setMessage(builderForValue.build()); + } - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + return this; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public Builder mergePolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { + if (policyRuleBasicBuilder_ == null) { + if (policyRuleBasic_ != null) { + policyRuleBasic_ = + policy.Policy.PolicyRuleBasic.newBuilder(policyRuleBasic_).mergeFrom(value).buildPartial(); + } else { + policyRuleBasic_ = value; + } + onChanged(); + } else { + policyRuleBasicBuilder_.mergeFrom(value); + } - /** - * <code>repeated .context.DeviceId deviceList = 9;</code> - */ - java.util.List<context.ContextOuterClass.DeviceId> - getDeviceListList(); - /** - * <code>repeated .context.DeviceId deviceList = 9;</code> - */ - context.ContextOuterClass.DeviceId getDeviceList(int index); - /** - * <code>repeated .context.DeviceId deviceList = 9;</code> - */ - int getDeviceListCount(); - /** - * <code>repeated .context.DeviceId deviceList = 9;</code> - */ - java.util.List<? extends context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceListOrBuilderList(); - /** - * <code>repeated .context.DeviceId deviceList = 9;</code> - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( - int index); - } - /** - * <pre> - * Policy rule partially complies with IETF’s: - * RFC 3060: https://datatracker.ietf.org/doc/html/rfc3060 - * RFC 3460: https://datatracker.ietf.org/doc/html/rfc3460 - * Enhanced with a policy rule event according to the ECA model - * </pre> - * - * Protobuf type {@code policy.PolicyRule} - */ - public static final class PolicyRule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRule) - PolicyRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRule.newBuilder() to construct. - private PolicyRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private PolicyRule() { - policyRuleType_ = 0; - conditionList_ = java.util.Collections.emptyList(); - booleanOperator_ = 0; - actionList_ = java.util.Collections.emptyList(); - deviceList_ = java.util.Collections.emptyList(); - } + return this; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public Builder clearPolicyRuleBasic() { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = null; + onChanged(); + } else { + policyRuleBasic_ = null; + policyRuleBasicBuilder_ = null; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRule(); - } + return this; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public policy.Policy.PolicyRuleBasic.Builder getPolicyRuleBasicBuilder() { + + onChanged(); + return getPolicyRuleBasicFieldBuilder().getBuilder(); + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { + if (policyRuleBasicBuilder_ != null) { + return policyRuleBasicBuilder_.getMessageOrBuilder(); + } else { + return policyRuleBasic_ == null ? + policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder> + getPolicyRuleBasicFieldBuilder() { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasicBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder>( + getPolicyRuleBasic(), + getParentForChildren(), + isClean()); + policyRuleBasic_ = null; + } + return policyRuleBasicBuilder_; + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PolicyRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + private context.ContextOuterClass.ServiceId serviceId_; + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - policy.Policy.PolicyRuleId.Builder subBuilder = null; - if (policyRuleId_ != null) { - subBuilder = policyRuleId_.toBuilder(); - } - policyRuleId_ = input.readMessage(policy.Policy.PolicyRuleId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policyRuleId_); - policyRuleId_ = subBuilder.buildPartial(); - } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } - break; - } - case 16: { - int rawValue = input.readEnum(); + return this; + } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + */ + public Builder setServiceId( + context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } - policyRuleType_ = rawValue; - break; - } - case 24: { + return this; + } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = + context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } - priority_ = input.readUInt32(); - break; - } - case 34: { - policy.Policy.PolicyRuleEvent.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(policy.Policy.PolicyRuleEvent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } + return this; + } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - conditionList_ = new java.util.ArrayList<policy.PolicyCondition.PolicyRuleCondition>(); - mutable_bitField0_ |= 0x00000001; - } - conditionList_.add( - input.readMessage(policy.PolicyCondition.PolicyRuleCondition.parser(), extensionRegistry)); - break; - } - case 48: { - int rawValue = input.readEnum(); + return this; + } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? + context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + /** + * <pre> + * Affected service and (some of) its device(s) + * </pre> + * + * <code>.context.ServiceId serviceId = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> + getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( + getServiceId(), + getParentForChildren(), + isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } - booleanOperator_ = rawValue; - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - actionList_ = new java.util.ArrayList<policy.PolicyAction.PolicyRuleAction>(); - mutable_bitField0_ |= 0x00000002; - } - actionList_.add( - input.readMessage(policy.PolicyAction.PolicyRuleAction.parser(), extensionRegistry)); - break; - } - case 66: { - context.ContextOuterClass.ServiceId.Builder subBuilder = null; - if (serviceId_ != null) { - subBuilder = serviceId_.toBuilder(); - } - serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceId_); - serviceId_ = subBuilder.buildPartial(); - } + private java.util.List<context.ContextOuterClass.DeviceId> deviceList_ = + java.util.Collections.emptyList(); + private void ensureDeviceListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(deviceList_); + bitField0_ |= 0x00000001; + } + } - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(); - mutable_bitField0_ |= 0x00000004; - } - deviceList_.add( - input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } + private com.google.protobuf.RepeatedFieldBuilderV3< + context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceListBuilder_; + + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public java.util.List<context.ContextOuterClass.DeviceId> getDeviceListList() { + if (deviceListBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceList_); + } else { + return deviceListBuilder_.getMessageList(); + } + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public int getDeviceListCount() { + if (deviceListBuilder_ == null) { + return deviceList_.size(); + } else { + return deviceListBuilder_.getCount(); + } + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public context.ContextOuterClass.DeviceId getDeviceList(int index) { + if (deviceListBuilder_ == null) { + return deviceList_.get(index); + } else { + return deviceListBuilder_.getMessage(index); + } + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public Builder setDeviceList( + int index, context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureDeviceListIsMutable(); + deviceList_.set(index, value); + onChanged(); + } else { + deviceListBuilder_.setMessage(index, value); } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - conditionList_ = java.util.Collections.unmodifiableList(conditionList_); + return this; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public Builder setDeviceList( + int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.setMessage(index, builderForValue.build()); } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - actionList_ = java.util.Collections.unmodifiableList(actionList_); + return this; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public Builder addDeviceList(context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.add(value); + onChanged(); + } else { + deviceListBuilder_.addMessage(value); } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - deviceList_ = java.util.Collections.unmodifiableList(deviceList_); + return this; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public Builder addDeviceList( + int index, context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.add(index, value); + onChanged(); + } else { + deviceListBuilder_.addMessage(index, value); } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + return this; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public Builder addDeviceList( + context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public Builder addDeviceList( + int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public Builder addAllDeviceList( + java.lang.Iterable<? extends context.ContextOuterClass.DeviceId> values) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, deviceList_); + onChanged(); + } else { + deviceListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public Builder clearDeviceList() { + if (deviceListBuilder_ == null) { + deviceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deviceListBuilder_.clear(); + } + return this; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public Builder removeDeviceList(int index) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.remove(index); + onChanged(); + } else { + deviceListBuilder_.remove(index); + } + return this; + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceListBuilder( + int index) { + return getDeviceListFieldBuilder().getBuilder(index); + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( + int index) { + if (deviceListBuilder_ == null) { + return deviceList_.get(index); } else { + return deviceListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public java.util.List<? extends context.ContextOuterClass.DeviceIdOrBuilder> + getDeviceListOrBuilderList() { + if (deviceListBuilder_ != null) { + return deviceListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceList_); + } + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder() { + return getDeviceListFieldBuilder().addBuilder( + context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder( + int index) { + return getDeviceListFieldBuilder().addBuilder( + index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + /** + * <pre> + * List of devices this service is traversing (not exhaustive) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 3;</code> + */ + public java.util.List<context.ContextOuterClass.DeviceId.Builder> + getDeviceListBuilderList() { + return getDeviceListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> + getDeviceListFieldBuilder() { + if (deviceListBuilder_ == null) { + deviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( + deviceList_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + deviceList_ = null; + } + return deviceListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleService) } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRule_descriptor; + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleService) + private static final policy.Policy.PolicyRuleService DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleService(); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRule.class, policy.Policy.PolicyRule.Builder.class); + public static policy.Policy.PolicyRuleService getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static final int POLICYRULEID_FIELD_NUMBER = 1; - private policy.Policy.PolicyRuleId policyRuleId_; - /** - * <pre> - * Basic policy rule attributes - * </pre> - * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> - * @return Whether the policyRuleId field is set. - */ - @java.lang.Override - public boolean hasPolicyRuleId() { - return policyRuleId_ != null; + private static final com.google.protobuf.Parser<PolicyRuleService> + PARSER = new com.google.protobuf.AbstractParser<PolicyRuleService>() { + @java.lang.Override + public PolicyRuleService parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PolicyRuleService(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<PolicyRuleService> parser() { + return PARSER; } - /** - * <pre> - * Basic policy rule attributes - * </pre> - * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> - * @return The policyRuleId. - */ + @java.lang.Override - public policy.Policy.PolicyRuleId getPolicyRuleId() { - return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; + public com.google.protobuf.Parser<PolicyRuleService> getParserForType() { + return PARSER; } - /** - * <pre> - * Basic policy rule attributes - * </pre> - * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> - */ + @java.lang.Override - public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder() { - return getPolicyRuleId(); + public policy.Policy.PolicyRuleService getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - public static final int POLICYRULETYPE_FIELD_NUMBER = 2; - private int policyRuleType_; - /** - * <code>.policy.PolicyRuleType policyRuleType = 2;</code> - * @return The enum numeric value on the wire for policyRuleType. - */ - @java.lang.Override public int getPolicyRuleTypeValue() { - return policyRuleType_; - } - /** - * <code>.policy.PolicyRuleType policyRuleType = 2;</code> - * @return The policyRuleType. - */ - @java.lang.Override public policy.Policy.PolicyRuleType getPolicyRuleType() { - @SuppressWarnings("deprecation") - policy.Policy.PolicyRuleType result = policy.Policy.PolicyRuleType.valueOf(policyRuleType_); - return result == null ? policy.Policy.PolicyRuleType.UNRECOGNIZED : result; - } + } - public static final int PRIORITY_FIELD_NUMBER = 3; - private int priority_; - /** - * <code>uint32 priority = 3;</code> - * @return The priority. - */ - @java.lang.Override - public int getPriority() { - return priority_; - } + public interface PolicyRuleDeviceOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.PolicyRuleDevice) + com.google.protobuf.MessageOrBuilder { - public static final int EVENT_FIELD_NUMBER = 4; - private policy.Policy.PolicyRuleEvent event_; /** * <pre> - * Event-Condition-Action model + * Basic policy rule attributes * </pre> * - * <code>.policy.PolicyRuleEvent event = 4;</code> - * @return Whether the event field is set. + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return Whether the policyRuleBasic field is set. */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } + boolean hasPolicyRuleBasic(); /** * <pre> - * Event-Condition-Action model + * Basic policy rule attributes * </pre> * - * <code>.policy.PolicyRuleEvent event = 4;</code> - * @return The event. + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return The policyRuleBasic. */ - @java.lang.Override - public policy.Policy.PolicyRuleEvent getEvent() { - return event_ == null ? policy.Policy.PolicyRuleEvent.getDefaultInstance() : event_; - } + policy.Policy.PolicyRuleBasic getPolicyRuleBasic(); /** * <pre> - * Event-Condition-Action model + * Basic policy rule attributes * </pre> * - * <code>.policy.PolicyRuleEvent event = 4;</code> + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> */ - @java.lang.Override - public policy.Policy.PolicyRuleEventOrBuilder getEventOrBuilder() { - return getEvent(); - } + policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder(); - public static final int CONDITIONLIST_FIELD_NUMBER = 5; - private java.util.List<policy.PolicyCondition.PolicyRuleCondition> conditionList_; - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - @java.lang.Override - public java.util.List<policy.PolicyCondition.PolicyRuleCondition> getConditionListList() { - return conditionList_; - } /** * <pre> - * One or more conditions must be met + * Affected device(s) * </pre> * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - @java.lang.Override - public java.util.List<? extends policy.PolicyCondition.PolicyRuleConditionOrBuilder> - getConditionListOrBuilderList() { - return conditionList_; - } + java.util.List<context.ContextOuterClass.DeviceId> + getDeviceListList(); /** * <pre> - * One or more conditions must be met + * Affected device(s) * </pre> * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - @java.lang.Override - public int getConditionListCount() { - return conditionList_.size(); - } + context.ContextOuterClass.DeviceId getDeviceList(int index); /** * <pre> - * One or more conditions must be met + * Affected device(s) * </pre> * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - @java.lang.Override - public policy.PolicyCondition.PolicyRuleCondition getConditionList(int index) { - return conditionList_.get(index); - } + int getDeviceListCount(); /** * <pre> - * One or more conditions must be met + * Affected device(s) * </pre> * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - @java.lang.Override - public policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder( - int index) { - return conditionList_.get(index); - } - - public static final int BOOLEANOPERATOR_FIELD_NUMBER = 6; - private int booleanOperator_; + java.util.List<? extends context.ContextOuterClass.DeviceIdOrBuilder> + getDeviceListOrBuilderList(); /** * <pre> - * Evaluation operator to be used + * Affected device(s) * </pre> * - * <code>.policy.BooleanOperator booleanOperator = 6;</code> - * @return The enum numeric value on the wire for booleanOperator. + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - @java.lang.Override public int getBooleanOperatorValue() { - return booleanOperator_; + context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( + int index); + } + /** + * <pre> + * Device-oriented policy rule + * </pre> + * + * Protobuf type {@code policy.PolicyRuleDevice} + */ + public static final class PolicyRuleDevice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.PolicyRuleDevice) + PolicyRuleDeviceOrBuilder { + private static final long serialVersionUID = 0L; + // Use PolicyRuleDevice.newBuilder() to construct. + private PolicyRuleDevice(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); } - /** - * <pre> - * Evaluation operator to be used - * </pre> - * - * <code>.policy.BooleanOperator booleanOperator = 6;</code> - * @return The booleanOperator. - */ - @java.lang.Override public policy.PolicyCondition.BooleanOperator getBooleanOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); - return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; + private PolicyRuleDevice() { + deviceList_ = java.util.Collections.emptyList(); } - public static final int ACTIONLIST_FIELD_NUMBER = 7; - private java.util.List<policy.PolicyAction.PolicyRuleAction> actionList_; - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - @java.lang.Override - public java.util.List<policy.PolicyAction.PolicyRuleAction> getActionListList() { - return actionList_; - } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - @java.lang.Override - public java.util.List<? extends policy.PolicyAction.PolicyRuleActionOrBuilder> - getActionListOrBuilderList() { - return actionList_; - } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ @java.lang.Override - public int getActionListCount() { - return actionList_.size(); + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PolicyRuleDevice(); } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ + @java.lang.Override - public policy.PolicyAction.PolicyRuleAction getActionList(int index) { - return actionList_.get(index); + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ + private PolicyRuleDevice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + policy.Policy.PolicyRuleBasic.Builder subBuilder = null; + if (policyRuleBasic_ != null) { + subBuilder = policyRuleBasic_.toBuilder(); + } + policyRuleBasic_ = input.readMessage(policy.Policy.PolicyRuleBasic.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policyRuleBasic_); + policyRuleBasic_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(); + mutable_bitField0_ |= 0x00000001; + } + deviceList_.add( + input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deviceList_ = java.util.Collections.unmodifiableList(deviceList_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleDevice_descriptor; + } + @java.lang.Override - public policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder( - int index) { - return actionList_.get(index); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleDevice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + policy.Policy.PolicyRuleDevice.class, policy.Policy.PolicyRuleDevice.Builder.class); } - public static final int SERVICEID_FIELD_NUMBER = 8; - private context.ContextOuterClass.ServiceId serviceId_; + public static final int POLICYRULEBASIC_FIELD_NUMBER = 1; + private policy.Policy.PolicyRuleBasic policyRuleBasic_; /** * <pre> - * Affected service and devices + * Basic policy rule attributes * </pre> * - * <code>.context.ServiceId serviceId = 8;</code> - * @return Whether the serviceId field is set. + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return Whether the policyRuleBasic field is set. */ @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; + public boolean hasPolicyRuleBasic() { + return policyRuleBasic_ != null; } /** * <pre> - * Affected service and devices + * Basic policy rule attributes * </pre> * - * <code>.context.ServiceId serviceId = 8;</code> - * @return The serviceId. + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return The policyRuleBasic. */ @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; } /** * <pre> - * Affected service and devices + * Basic policy rule attributes * </pre> * - * <code>.context.ServiceId serviceId = 8;</code> + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> */ @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); + public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { + return getPolicyRuleBasic(); } - public static final int DEVICELIST_FIELD_NUMBER = 9; + public static final int DEVICELIST_FIELD_NUMBER = 2; private java.util.List<context.ContextOuterClass.DeviceId> deviceList_; /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> */ @java.lang.Override public java.util.List<context.ContextOuterClass.DeviceId> getDeviceListList() { return deviceList_; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> */ @java.lang.Override public java.util.List<? extends context.ContextOuterClass.DeviceIdOrBuilder> @@ -2985,21 +5147,33 @@ public final class Policy { return deviceList_; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> */ @java.lang.Override public int getDeviceListCount() { return deviceList_.size(); } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> */ @java.lang.Override public context.ContextOuterClass.DeviceId getDeviceList(int index) { return deviceList_.get(index); } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> */ @java.lang.Override public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( @@ -3021,32 +5195,11 @@ public final class Policy { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (policyRuleId_ != null) { - output.writeMessage(1, getPolicyRuleId()); - } - if (policyRuleType_ != policy.Policy.PolicyRuleType.POLICYTYPE_DEVICE.getNumber()) { - output.writeEnum(2, policyRuleType_); - } - if (priority_ != 0) { - output.writeUInt32(3, priority_); - } - if (event_ != null) { - output.writeMessage(4, getEvent()); - } - for (int i = 0; i < conditionList_.size(); i++) { - output.writeMessage(5, conditionList_.get(i)); - } - if (booleanOperator_ != policy.PolicyCondition.BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_UNDEFINED.getNumber()) { - output.writeEnum(6, booleanOperator_); - } - for (int i = 0; i < actionList_.size(); i++) { - output.writeMessage(7, actionList_.get(i)); - } - if (serviceId_ != null) { - output.writeMessage(8, getServiceId()); + if (policyRuleBasic_ != null) { + output.writeMessage(1, getPolicyRuleBasic()); } for (int i = 0; i < deviceList_.size(); i++) { - output.writeMessage(9, deviceList_.get(i)); + output.writeMessage(2, deviceList_.get(i)); } unknownFields.writeTo(output); } @@ -3057,41 +5210,13 @@ public final class Policy { if (size != -1) return size; size = 0; - if (policyRuleId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getPolicyRuleId()); - } - if (policyRuleType_ != policy.Policy.PolicyRuleType.POLICYTYPE_DEVICE.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, policyRuleType_); - } - if (priority_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, priority_); - } - if (event_ != null) { + if (policyRuleBasic_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getEvent()); - } - for (int i = 0; i < conditionList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, conditionList_.get(i)); - } - if (booleanOperator_ != policy.PolicyCondition.BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, booleanOperator_); - } - for (int i = 0; i < actionList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, actionList_.get(i)); - } - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getServiceId()); + .computeMessageSize(1, getPolicyRuleBasic()); } for (int i = 0; i < deviceList_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, deviceList_.get(i)); + .computeMessageSize(2, deviceList_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -3103,33 +5228,15 @@ public final class Policy { if (obj == this) { return true; } - if (!(obj instanceof policy.Policy.PolicyRule)) { + if (!(obj instanceof policy.Policy.PolicyRuleDevice)) { return super.equals(obj); } - policy.Policy.PolicyRule other = (policy.Policy.PolicyRule) obj; + policy.Policy.PolicyRuleDevice other = (policy.Policy.PolicyRuleDevice) obj; - if (hasPolicyRuleId() != other.hasPolicyRuleId()) return false; - if (hasPolicyRuleId()) { - if (!getPolicyRuleId() - .equals(other.getPolicyRuleId())) return false; - } - if (policyRuleType_ != other.policyRuleType_) return false; - if (getPriority() - != other.getPriority()) return false; - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (!getConditionListList() - .equals(other.getConditionListList())) return false; - if (booleanOperator_ != other.booleanOperator_) return false; - if (!getActionListList() - .equals(other.getActionListList())) return false; - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; + if (hasPolicyRuleBasic() != other.hasPolicyRuleBasic()) return false; + if (hasPolicyRuleBasic()) { + if (!getPolicyRuleBasic() + .equals(other.getPolicyRuleBasic())) return false; } if (!getDeviceListList() .equals(other.getDeviceListList())) return false; @@ -3144,31 +5251,9 @@ public final class Policy { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicyRuleId()) { - hash = (37 * hash) + POLICYRULEID_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleId().hashCode(); - } - hash = (37 * hash) + POLICYRULETYPE_FIELD_NUMBER; - hash = (53 * hash) + policyRuleType_; - hash = (37 * hash) + PRIORITY_FIELD_NUMBER; - hash = (53 * hash) + getPriority(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (getConditionListCount() > 0) { - hash = (37 * hash) + CONDITIONLIST_FIELD_NUMBER; - hash = (53 * hash) + getConditionListList().hashCode(); - } - hash = (37 * hash) + BOOLEANOPERATOR_FIELD_NUMBER; - hash = (53 * hash) + booleanOperator_; - if (getActionListCount() > 0) { - hash = (37 * hash) + ACTIONLIST_FIELD_NUMBER; - hash = (53 * hash) + getActionListList().hashCode(); - } - if (hasServiceId()) { - hash = (37 * hash) + SERVICEID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); + if (hasPolicyRuleBasic()) { + hash = (37 * hash) + POLICYRULEBASIC_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleBasic().hashCode(); } if (getDeviceListCount() > 0) { hash = (37 * hash) + DEVICELIST_FIELD_NUMBER; @@ -3179,69 +5264,69 @@ public final class Policy { return hash; } - public static policy.Policy.PolicyRule parseFrom( + public static policy.Policy.PolicyRuleDevice parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static policy.Policy.PolicyRule parseFrom( + public static policy.Policy.PolicyRuleDevice parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static policy.Policy.PolicyRule parseFrom( + public static policy.Policy.PolicyRuleDevice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static policy.Policy.PolicyRule parseFrom( + public static policy.Policy.PolicyRuleDevice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static policy.Policy.PolicyRule parseFrom(byte[] data) + public static policy.Policy.PolicyRuleDevice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static policy.Policy.PolicyRule parseFrom( + public static policy.Policy.PolicyRuleDevice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static policy.Policy.PolicyRule parseFrom(java.io.InputStream input) + public static policy.Policy.PolicyRuleDevice parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static policy.Policy.PolicyRule parseFrom( + public static policy.Policy.PolicyRuleDevice 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 policy.Policy.PolicyRule parseDelimitedFrom(java.io.InputStream input) + public static policy.Policy.PolicyRuleDevice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static policy.Policy.PolicyRule parseDelimitedFrom( + public static policy.Policy.PolicyRuleDevice 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 policy.Policy.PolicyRule parseFrom( + public static policy.Policy.PolicyRuleDevice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static policy.Policy.PolicyRule parseFrom( + public static policy.Policy.PolicyRuleDevice parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3254,7 +5339,7 @@ public final class Policy { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(policy.Policy.PolicyRule prototype) { + public static Builder newBuilder(policy.Policy.PolicyRuleDevice prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -3271,32 +5356,29 @@ public final class Policy { } /** * <pre> - * Policy rule partially complies with IETF’s: - * RFC 3060: https://datatracker.ietf.org/doc/html/rfc3060 - * RFC 3460: https://datatracker.ietf.org/doc/html/rfc3460 - * Enhanced with a policy rule event according to the ECA model + * Device-oriented policy rule * </pre> * - * Protobuf type {@code policy.PolicyRule} + * Protobuf type {@code policy.PolicyRuleDevice} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRule) - policy.Policy.PolicyRuleOrBuilder { + // @@protoc_insertion_point(builder_implements:policy.PolicyRuleDevice) + policy.Policy.PolicyRuleDeviceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRule_descriptor; + return policy.Policy.internal_static_policy_PolicyRuleDevice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRule_fieldAccessorTable + return policy.Policy.internal_static_policy_PolicyRuleDevice_fieldAccessorTable .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRule.class, policy.Policy.PolicyRule.Builder.class); + policy.Policy.PolicyRuleDevice.class, policy.Policy.PolicyRuleDevice.Builder.class); } - // Construct using policy.Policy.PolicyRule.newBuilder() + // Construct using policy.Policy.PolicyRuleDevice.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3309,53 +5391,21 @@ public final class Policy { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getConditionListFieldBuilder(); - getActionListFieldBuilder(); getDeviceListFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = null; - } else { - policyRuleId_ = null; - policyRuleIdBuilder_ = null; - } - policyRuleType_ = 0; - - priority_ = 0; - - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; - eventBuilder_ = null; - } - if (conditionListBuilder_ == null) { - conditionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - conditionListBuilder_.clear(); - } - booleanOperator_ = 0; - - if (actionListBuilder_ == null) { - actionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - actionListBuilder_.clear(); - } - if (serviceIdBuilder_ == null) { - serviceId_ = null; + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = null; } else { - serviceId_ = null; - serviceIdBuilder_ = null; + policyRuleBasic_ = null; + policyRuleBasicBuilder_ = null; } if (deviceListBuilder_ == null) { deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); } else { deviceListBuilder_.clear(); } @@ -3365,17 +5415,17 @@ public final class Policy { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRule_descriptor; + return policy.Policy.internal_static_policy_PolicyRuleDevice_descriptor; } @java.lang.Override - public policy.Policy.PolicyRule getDefaultInstanceForType() { - return policy.Policy.PolicyRule.getDefaultInstance(); + public policy.Policy.PolicyRuleDevice getDefaultInstanceForType() { + return policy.Policy.PolicyRuleDevice.getDefaultInstance(); } @java.lang.Override - public policy.Policy.PolicyRule build() { - policy.Policy.PolicyRule result = buildPartial(); + public policy.Policy.PolicyRuleDevice build() { + policy.Policy.PolicyRuleDevice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -3383,49 +5433,18 @@ public final class Policy { } @java.lang.Override - public policy.Policy.PolicyRule buildPartial() { - policy.Policy.PolicyRule result = new policy.Policy.PolicyRule(this); + public policy.Policy.PolicyRuleDevice buildPartial() { + policy.Policy.PolicyRuleDevice result = new policy.Policy.PolicyRuleDevice(this); int from_bitField0_ = bitField0_; - if (policyRuleIdBuilder_ == null) { - result.policyRuleId_ = policyRuleId_; - } else { - result.policyRuleId_ = policyRuleIdBuilder_.build(); - } - result.policyRuleType_ = policyRuleType_; - result.priority_ = priority_; - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (conditionListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - conditionList_ = java.util.Collections.unmodifiableList(conditionList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.conditionList_ = conditionList_; + if (policyRuleBasicBuilder_ == null) { + result.policyRuleBasic_ = policyRuleBasic_; } else { - result.conditionList_ = conditionListBuilder_.build(); - } - result.booleanOperator_ = booleanOperator_; - if (actionListBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - actionList_ = java.util.Collections.unmodifiableList(actionList_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.actionList_ = actionList_; - } else { - result.actionList_ = actionListBuilder_.build(); - } - if (serviceIdBuilder_ == null) { - result.serviceId_ = serviceId_; - } else { - result.serviceId_ = serviceIdBuilder_.build(); + result.policyRuleBasic_ = policyRuleBasicBuilder_.build(); } if (deviceListBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000001) != 0)) { deviceList_ = java.util.Collections.unmodifiableList(deviceList_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); } result.deviceList_ = deviceList_; } else { @@ -3461,99 +5480,32 @@ public final class Policy { int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRule) { - return mergeFrom((policy.Policy.PolicyRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRule other) { - if (other == policy.Policy.PolicyRule.getDefaultInstance()) return this; - if (other.hasPolicyRuleId()) { - mergePolicyRuleId(other.getPolicyRuleId()); - } - if (other.policyRuleType_ != 0) { - setPolicyRuleTypeValue(other.getPolicyRuleTypeValue()); - } - if (other.getPriority() != 0) { - setPriority(other.getPriority()); - } - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (conditionListBuilder_ == null) { - if (!other.conditionList_.isEmpty()) { - if (conditionList_.isEmpty()) { - conditionList_ = other.conditionList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConditionListIsMutable(); - conditionList_.addAll(other.conditionList_); - } - onChanged(); - } - } else { - if (!other.conditionList_.isEmpty()) { - if (conditionListBuilder_.isEmpty()) { - conditionListBuilder_.dispose(); - conditionListBuilder_ = null; - conditionList_ = other.conditionList_; - bitField0_ = (bitField0_ & ~0x00000001); - conditionListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConditionListFieldBuilder() : null; - } else { - conditionListBuilder_.addAllMessages(other.conditionList_); - } - } - } - if (other.booleanOperator_ != 0) { - setBooleanOperatorValue(other.getBooleanOperatorValue()); - } - if (actionListBuilder_ == null) { - if (!other.actionList_.isEmpty()) { - if (actionList_.isEmpty()) { - actionList_ = other.actionList_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureActionListIsMutable(); - actionList_.addAll(other.actionList_); - } - onChanged(); - } - } else { - if (!other.actionList_.isEmpty()) { - if (actionListBuilder_.isEmpty()) { - actionListBuilder_.dispose(); - actionListBuilder_ = null; - actionList_ = other.actionList_; - bitField0_ = (bitField0_ & ~0x00000002); - actionListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionListFieldBuilder() : null; - } else { - actionListBuilder_.addAllMessages(other.actionList_); - } - } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleDevice) { + return mergeFrom((policy.Policy.PolicyRuleDevice)other); + } else { + super.mergeFrom(other); + return this; } - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); + } + + public Builder mergeFrom(policy.Policy.PolicyRuleDevice other) { + if (other == policy.Policy.PolicyRuleDevice.getDefaultInstance()) return this; + if (other.hasPolicyRuleBasic()) { + mergePolicyRuleBasic(other.getPolicyRuleBasic()); } if (deviceListBuilder_ == null) { if (!other.deviceList_.isEmpty()) { if (deviceList_.isEmpty()) { deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); } else { ensureDeviceListIsMutable(); deviceList_.addAll(other.deviceList_); @@ -3566,7 +5518,7 @@ public final class Policy { deviceListBuilder_.dispose(); deviceListBuilder_ = null; deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); deviceListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceListFieldBuilder() : null; @@ -3590,11 +5542,11 @@ public final class Policy { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRule parsedMessage = null; + policy.Policy.PolicyRuleDevice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRule) e.getUnfinishedMessage(); + parsedMessage = (policy.Policy.PolicyRuleDevice) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -3605,33 +5557,33 @@ public final class Policy { } private int bitField0_; - private policy.Policy.PolicyRuleId policyRuleId_; + private policy.Policy.PolicyRuleBasic policyRuleBasic_; private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> policyRuleIdBuilder_; + policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder> policyRuleBasicBuilder_; /** * <pre> * Basic policy rule attributes * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> - * @return Whether the policyRuleId field is set. + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return Whether the policyRuleBasic field is set. */ - public boolean hasPolicyRuleId() { - return policyRuleIdBuilder_ != null || policyRuleId_ != null; + public boolean hasPolicyRuleBasic() { + return policyRuleBasicBuilder_ != null || policyRuleBasic_ != null; } /** * <pre> * Basic policy rule attributes * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> - * @return The policyRuleId. + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + * @return The policyRuleBasic. */ - public policy.Policy.PolicyRuleId getPolicyRuleId() { - if (policyRuleIdBuilder_ == null) { - return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; + public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { + if (policyRuleBasicBuilder_ == null) { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; } else { - return policyRuleIdBuilder_.getMessage(); + return policyRuleBasicBuilder_.getMessage(); } } /** @@ -3639,1458 +5591,2039 @@ public final class Policy { * Basic policy rule attributes * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> */ - public Builder setPolicyRuleId(policy.Policy.PolicyRuleId value) { - if (policyRuleIdBuilder_ == null) { + public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { + if (policyRuleBasicBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - policyRuleId_ = value; + policyRuleBasic_ = value; onChanged(); } else { - policyRuleIdBuilder_.setMessage(value); + policyRuleBasicBuilder_.setMessage(value); + } + + return this; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public Builder setPolicyRuleBasic( + policy.Policy.PolicyRuleBasic.Builder builderForValue) { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = builderForValue.build(); + onChanged(); + } else { + policyRuleBasicBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public Builder mergePolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { + if (policyRuleBasicBuilder_ == null) { + if (policyRuleBasic_ != null) { + policyRuleBasic_ = + policy.Policy.PolicyRuleBasic.newBuilder(policyRuleBasic_).mergeFrom(value).buildPartial(); + } else { + policyRuleBasic_ = value; + } + onChanged(); + } else { + policyRuleBasicBuilder_.mergeFrom(value); + } + + return this; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public Builder clearPolicyRuleBasic() { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = null; + onChanged(); + } else { + policyRuleBasic_ = null; + policyRuleBasicBuilder_ = null; + } + + return this; + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public policy.Policy.PolicyRuleBasic.Builder getPolicyRuleBasicBuilder() { + + onChanged(); + return getPolicyRuleBasicFieldBuilder().getBuilder(); + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { + if (policyRuleBasicBuilder_ != null) { + return policyRuleBasicBuilder_.getMessageOrBuilder(); + } else { + return policyRuleBasic_ == null ? + policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } + } + /** + * <pre> + * Basic policy rule attributes + * </pre> + * + * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder> + getPolicyRuleBasicFieldBuilder() { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasicBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder>( + getPolicyRuleBasic(), + getParentForChildren(), + isClean()); + policyRuleBasic_ = null; + } + return policyRuleBasicBuilder_; + } + + private java.util.List<context.ContextOuterClass.DeviceId> deviceList_ = + java.util.Collections.emptyList(); + private void ensureDeviceListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(deviceList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceListBuilder_; + + /** + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> + */ + public java.util.List<context.ContextOuterClass.DeviceId> getDeviceListList() { + if (deviceListBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceList_); + } else { + return deviceListBuilder_.getMessageList(); + } + } + /** + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> + */ + public int getDeviceListCount() { + if (deviceListBuilder_ == null) { + return deviceList_.size(); + } else { + return deviceListBuilder_.getCount(); + } + } + /** + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> + */ + public context.ContextOuterClass.DeviceId getDeviceList(int index) { + if (deviceListBuilder_ == null) { + return deviceList_.get(index); + } else { + return deviceListBuilder_.getMessage(index); + } + } + /** + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> + */ + public Builder setDeviceList( + int index, context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.set(index, value); + onChanged(); + } else { + deviceListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> + */ + public Builder setDeviceList( + int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> + */ + public Builder addDeviceList(context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.add(value); + onChanged(); + } else { + deviceListBuilder_.addMessage(value); + } + return this; + } + /** + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> + */ + public Builder addDeviceList( + int index, context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.add(index, value); + onChanged(); + } else { + deviceListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> + */ + public Builder addDeviceList( + context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> + */ + public Builder addDeviceList( + int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.addMessage(index, builderForValue.build()); } - return this; } /** * <pre> - * Basic policy rule attributes + * Affected device(s) * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - public Builder setPolicyRuleId( - policy.Policy.PolicyRuleId.Builder builderForValue) { - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = builderForValue.build(); + public Builder addAllDeviceList( + java.lang.Iterable<? extends context.ContextOuterClass.DeviceId> values) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, deviceList_); onChanged(); } else { - policyRuleIdBuilder_.setMessage(builderForValue.build()); + deviceListBuilder_.addAllMessages(values); } - return this; } /** * <pre> - * Basic policy rule attributes + * Affected device(s) * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - public Builder mergePolicyRuleId(policy.Policy.PolicyRuleId value) { - if (policyRuleIdBuilder_ == null) { - if (policyRuleId_ != null) { - policyRuleId_ = - policy.Policy.PolicyRuleId.newBuilder(policyRuleId_).mergeFrom(value).buildPartial(); - } else { - policyRuleId_ = value; - } + public Builder clearDeviceList() { + if (deviceListBuilder_ == null) { + deviceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - policyRuleIdBuilder_.mergeFrom(value); + deviceListBuilder_.clear(); } - return this; } /** * <pre> - * Basic policy rule attributes + * Affected device(s) * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - public Builder clearPolicyRuleId() { - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = null; + public Builder removeDeviceList(int index) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.remove(index); onChanged(); } else { - policyRuleId_ = null; - policyRuleIdBuilder_ = null; + deviceListBuilder_.remove(index); } - return this; } /** * <pre> - * Basic policy rule attributes + * Affected device(s) * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - public policy.Policy.PolicyRuleId.Builder getPolicyRuleIdBuilder() { - - onChanged(); - return getPolicyRuleIdFieldBuilder().getBuilder(); + public context.ContextOuterClass.DeviceId.Builder getDeviceListBuilder( + int index) { + return getDeviceListFieldBuilder().getBuilder(index); } /** * <pre> - * Basic policy rule attributes + * Affected device(s) * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder() { - if (policyRuleIdBuilder_ != null) { - return policyRuleIdBuilder_.getMessageOrBuilder(); - } else { - return policyRuleId_ == null ? - policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( + int index) { + if (deviceListBuilder_ == null) { + return deviceList_.get(index); } else { + return deviceListBuilder_.getMessageOrBuilder(index); } } /** * <pre> - * Basic policy rule attributes + * Affected device(s) * </pre> * - * <code>.policy.PolicyRuleId policyRuleId = 1;</code> + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> - getPolicyRuleIdFieldBuilder() { - if (policyRuleIdBuilder_ == null) { - policyRuleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder>( - getPolicyRuleId(), - getParentForChildren(), - isClean()); - policyRuleId_ = null; + public java.util.List<? extends context.ContextOuterClass.DeviceIdOrBuilder> + getDeviceListOrBuilderList() { + if (deviceListBuilder_ != null) { + return deviceListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceList_); } - return policyRuleIdBuilder_; } - - private int policyRuleType_ = 0; /** - * <code>.policy.PolicyRuleType policyRuleType = 2;</code> - * @return The enum numeric value on the wire for policyRuleType. + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - @java.lang.Override public int getPolicyRuleTypeValue() { - return policyRuleType_; + public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder() { + return getDeviceListFieldBuilder().addBuilder( + context.ContextOuterClass.DeviceId.getDefaultInstance()); } /** - * <code>.policy.PolicyRuleType policyRuleType = 2;</code> - * @param value The enum numeric value on the wire for policyRuleType to set. - * @return This builder for chaining. + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - public Builder setPolicyRuleTypeValue(int value) { - - policyRuleType_ = value; - onChanged(); - return this; + public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder( + int index) { + return getDeviceListFieldBuilder().addBuilder( + index, context.ContextOuterClass.DeviceId.getDefaultInstance()); } /** - * <code>.policy.PolicyRuleType policyRuleType = 2;</code> - * @return The policyRuleType. + * <pre> + * Affected device(s) + * </pre> + * + * <code>repeated .context.DeviceId deviceList = 2;</code> */ - @java.lang.Override - public policy.Policy.PolicyRuleType getPolicyRuleType() { - @SuppressWarnings("deprecation") - policy.Policy.PolicyRuleType result = policy.Policy.PolicyRuleType.valueOf(policyRuleType_); - return result == null ? policy.Policy.PolicyRuleType.UNRECOGNIZED : result; + public java.util.List<context.ContextOuterClass.DeviceId.Builder> + getDeviceListBuilderList() { + return getDeviceListFieldBuilder().getBuilderList(); } - /** - * <code>.policy.PolicyRuleType policyRuleType = 2;</code> - * @param value The policyRuleType to set. - * @return This builder for chaining. - */ - public Builder setPolicyRuleType(policy.Policy.PolicyRuleType value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.RepeatedFieldBuilderV3< + context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> + getDeviceListFieldBuilder() { + if (deviceListBuilder_ == null) { + deviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( + deviceList_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + deviceList_ = null; } - - policyRuleType_ = value.getNumber(); - onChanged(); - return this; + return deviceListBuilder_; } - /** - * <code>.policy.PolicyRuleType policyRuleType = 2;</code> - * @return This builder for chaining. - */ - public Builder clearPolicyRuleType() { - - policyRuleType_ = 0; - onChanged(); - return this; + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - private int priority_ ; - /** - * <code>uint32 priority = 3;</code> - * @return The priority. - */ @java.lang.Override - public int getPriority() { - return priority_; - } - /** - * <code>uint32 priority = 3;</code> - * @param value The priority to set. - * @return This builder for chaining. - */ - public Builder setPriority(int value) { - - priority_ = value; - onChanged(); - return this; - } - /** - * <code>uint32 priority = 3;</code> - * @return This builder for chaining. - */ - public Builder clearPriority() { - - priority_ = 0; - onChanged(); - return this; + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - private policy.Policy.PolicyRuleEvent event_; - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleEvent, policy.Policy.PolicyRuleEvent.Builder, policy.Policy.PolicyRuleEventOrBuilder> eventBuilder_; - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleDevice) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleDevice) + private static final policy.Policy.PolicyRuleDevice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleDevice(); + } + + public static policy.Policy.PolicyRuleDevice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<PolicyRuleDevice> + PARSER = new com.google.protobuf.AbstractParser<PolicyRuleDevice>() { + @java.lang.Override + public PolicyRuleDevice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PolicyRuleDevice(input, extensionRegistry); } - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - * @return The event. - */ - public policy.Policy.PolicyRuleEvent getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? policy.Policy.PolicyRuleEvent.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } + }; + + public static com.google.protobuf.Parser<PolicyRuleDevice> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<PolicyRuleDevice> getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleDevice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PolicyRuleIdListOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.PolicyRuleIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + java.util.List<policy.Policy.PolicyRuleId> + getPolicyRuleIdListList(); + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + policy.Policy.PolicyRuleId getPolicyRuleIdList(int index); + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + int getPolicyRuleIdListCount(); + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + java.util.List<? extends policy.Policy.PolicyRuleIdOrBuilder> + getPolicyRuleIdListOrBuilderList(); + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdListOrBuilder( + int index); + } + /** + * <pre> + * A list of policy rule IDs + * </pre> + * + * Protobuf type {@code policy.PolicyRuleIdList} + */ + public static final class PolicyRuleIdList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.PolicyRuleIdList) + PolicyRuleIdListOrBuilder { + private static final long serialVersionUID = 0L; + // Use PolicyRuleIdList.newBuilder() to construct. + private PolicyRuleIdList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private PolicyRuleIdList() { + policyRuleIdList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PolicyRuleIdList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PolicyRuleIdList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - */ - public Builder setEvent(policy.Policy.PolicyRuleEvent value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + policyRuleIdList_ = new java.util.ArrayList<policy.Policy.PolicyRuleId>(); + mutable_bitField0_ |= 0x00000001; + } + policyRuleIdList_.add( + input.readMessage(policy.Policy.PolicyRuleId.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); } - - return this; - } - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - */ - public Builder setEvent( - policy.Policy.PolicyRuleEvent.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + policyRuleIdList_ = java.util.Collections.unmodifiableList(policyRuleIdList_); } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleIdList_descriptor; + } - return this; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleIdList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + policy.Policy.PolicyRuleIdList.class, policy.Policy.PolicyRuleIdList.Builder.class); + } + + public static final int POLICYRULEIDLIST_FIELD_NUMBER = 1; + private java.util.List<policy.Policy.PolicyRuleId> policyRuleIdList_; + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + @java.lang.Override + public java.util.List<policy.Policy.PolicyRuleId> getPolicyRuleIdListList() { + return policyRuleIdList_; + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + @java.lang.Override + public java.util.List<? extends policy.Policy.PolicyRuleIdOrBuilder> + getPolicyRuleIdListOrBuilderList() { + return policyRuleIdList_; + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + @java.lang.Override + public int getPolicyRuleIdListCount() { + return policyRuleIdList_.size(); + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + @java.lang.Override + public policy.Policy.PolicyRuleId getPolicyRuleIdList(int index) { + return policyRuleIdList_.get(index); + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + @java.lang.Override + public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdListOrBuilder( + int index) { + return policyRuleIdList_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < policyRuleIdList_.size(); i++) { + output.writeMessage(1, policyRuleIdList_.get(i)); } - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - */ - public Builder mergeEvent(policy.Policy.PolicyRuleEvent value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - policy.Policy.PolicyRuleEvent.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } + unknownFields.writeTo(output); + } - return this; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyRuleIdList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, policyRuleIdList_.get(i)); } - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - return this; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - */ - public policy.Policy.PolicyRuleEvent.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); + if (!(obj instanceof policy.Policy.PolicyRuleIdList)) { + return super.equals(obj); } - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - */ - public policy.Policy.PolicyRuleEventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - policy.Policy.PolicyRuleEvent.getDefaultInstance() : event_; - } + policy.Policy.PolicyRuleIdList other = (policy.Policy.PolicyRuleIdList) obj; + + if (!getPolicyRuleIdListList() + .equals(other.getPolicyRuleIdListList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - /** - * <pre> - * Event-Condition-Action model - * </pre> - * - * <code>.policy.PolicyRuleEvent event = 4;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleEvent, policy.Policy.PolicyRuleEvent.Builder, policy.Policy.PolicyRuleEventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleEvent, policy.Policy.PolicyRuleEvent.Builder, policy.Policy.PolicyRuleEventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyRuleIdListCount() > 0) { + hash = (37 * hash) + POLICYRULEIDLIST_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleIdListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRuleIdList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static policy.Policy.PolicyRuleIdList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static policy.Policy.PolicyRuleIdList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static policy.Policy.PolicyRuleIdList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static policy.Policy.PolicyRuleIdList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static policy.Policy.PolicyRuleIdList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static policy.Policy.PolicyRuleIdList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static policy.Policy.PolicyRuleIdList 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 policy.Policy.PolicyRuleIdList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static policy.Policy.PolicyRuleIdList 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 policy.Policy.PolicyRuleIdList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static policy.Policy.PolicyRuleIdList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(policy.Policy.PolicyRuleIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * <pre> + * A list of policy rule IDs + * </pre> + * + * Protobuf type {@code policy.PolicyRuleIdList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:policy.PolicyRuleIdList) + policy.Policy.PolicyRuleIdListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleIdList_descriptor; } - private java.util.List<policy.PolicyCondition.PolicyRuleCondition> conditionList_ = - java.util.Collections.emptyList(); - private void ensureConditionListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - conditionList_ = new java.util.ArrayList<policy.PolicyCondition.PolicyRuleCondition>(conditionList_); - bitField0_ |= 0x00000001; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleIdList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + policy.Policy.PolicyRuleIdList.class, policy.Policy.PolicyRuleIdList.Builder.class); } - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder> conditionListBuilder_; - - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public java.util.List<policy.PolicyCondition.PolicyRuleCondition> getConditionListList() { - if (conditionListBuilder_ == null) { - return java.util.Collections.unmodifiableList(conditionList_); - } else { - return conditionListBuilder_.getMessageList(); - } - } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public int getConditionListCount() { - if (conditionListBuilder_ == null) { - return conditionList_.size(); - } else { - return conditionListBuilder_.getCount(); - } - } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public policy.PolicyCondition.PolicyRuleCondition getConditionList(int index) { - if (conditionListBuilder_ == null) { - return conditionList_.get(index); - } else { - return conditionListBuilder_.getMessage(index); - } - } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public Builder setConditionList( - int index, policy.PolicyCondition.PolicyRuleCondition value) { - if (conditionListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionListIsMutable(); - conditionList_.set(index, value); - onChanged(); - } else { - conditionListBuilder_.setMessage(index, value); - } - return this; - } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public Builder setConditionList( - int index, policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - conditionList_.set(index, builderForValue.build()); - onChanged(); - } else { - conditionListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public Builder addConditionList(policy.PolicyCondition.PolicyRuleCondition value) { - if (conditionListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionListIsMutable(); - conditionList_.add(value); - onChanged(); - } else { - conditionListBuilder_.addMessage(value); - } - return this; - } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public Builder addConditionList( - int index, policy.PolicyCondition.PolicyRuleCondition value) { - if (conditionListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionListIsMutable(); - conditionList_.add(index, value); - onChanged(); - } else { - conditionListBuilder_.addMessage(index, value); - } - return this; - } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public Builder addConditionList( - policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - conditionList_.add(builderForValue.build()); - onChanged(); - } else { - conditionListBuilder_.addMessage(builderForValue.build()); - } - return this; + // Construct using policy.Policy.PolicyRuleIdList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public Builder addConditionList( - int index, policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - conditionList_.add(index, builderForValue.build()); - onChanged(); - } else { - conditionListBuilder_.addMessage(index, builderForValue.build()); - } - return this; + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public Builder addAllConditionList( - java.lang.Iterable<? extends policy.PolicyCondition.PolicyRuleCondition> values) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, conditionList_); - onChanged(); - } else { - conditionListBuilder_.addAllMessages(values); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPolicyRuleIdListFieldBuilder(); } - return this; } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public Builder clearConditionList() { - if (conditionListBuilder_ == null) { - conditionList_ = java.util.Collections.emptyList(); + @java.lang.Override + public Builder clear() { + super.clear(); + if (policyRuleIdListBuilder_ == null) { + policyRuleIdList_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); } else { - conditionListBuilder_.clear(); + policyRuleIdListBuilder_.clear(); } return this; } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public Builder removeConditionList(int index) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - conditionList_.remove(index); - onChanged(); - } else { - conditionListBuilder_.remove(index); - } - return this; + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleIdList_descriptor; } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public policy.PolicyCondition.PolicyRuleCondition.Builder getConditionListBuilder( - int index) { - return getConditionListFieldBuilder().getBuilder(index); + + @java.lang.Override + public policy.Policy.PolicyRuleIdList getDefaultInstanceForType() { + return policy.Policy.PolicyRuleIdList.getDefaultInstance(); } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder( - int index) { - if (conditionListBuilder_ == null) { - return conditionList_.get(index); } else { - return conditionListBuilder_.getMessageOrBuilder(index); + + @java.lang.Override + public policy.Policy.PolicyRuleIdList build() { + policy.Policy.PolicyRuleIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public java.util.List<? extends policy.PolicyCondition.PolicyRuleConditionOrBuilder> - getConditionListOrBuilderList() { - if (conditionListBuilder_ != null) { - return conditionListBuilder_.getMessageOrBuilderList(); + + @java.lang.Override + public policy.Policy.PolicyRuleIdList buildPartial() { + policy.Policy.PolicyRuleIdList result = new policy.Policy.PolicyRuleIdList(this); + int from_bitField0_ = bitField0_; + if (policyRuleIdListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyRuleIdList_ = java.util.Collections.unmodifiableList(policyRuleIdList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyRuleIdList_ = policyRuleIdList_; } else { - return java.util.Collections.unmodifiableList(conditionList_); + result.policyRuleIdList_ = policyRuleIdListBuilder_.build(); } + onBuilt(); + return result; } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public policy.PolicyCondition.PolicyRuleCondition.Builder addConditionListBuilder() { - return getConditionListFieldBuilder().addBuilder( - policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()); + + @java.lang.Override + public Builder clone() { + return super.clone(); } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public policy.PolicyCondition.PolicyRuleCondition.Builder addConditionListBuilder( - int index) { - return getConditionListFieldBuilder().addBuilder( - index, policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()); + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); } - /** - * <pre> - * One or more conditions must be met - * </pre> - * - * <code>repeated .policy.PolicyRuleCondition conditionList = 5;</code> - */ - public java.util.List<policy.PolicyCondition.PolicyRuleCondition.Builder> - getConditionListBuilderList() { - return getConditionListFieldBuilder().getBuilderList(); + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder> - getConditionListFieldBuilder() { - if (conditionListBuilder_ == null) { - conditionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder>( - conditionList_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - conditionList_ = null; - } - return conditionListBuilder_; + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - - private int booleanOperator_ = 0; - /** - * <pre> - * Evaluation operator to be used - * </pre> - * - * <code>.policy.BooleanOperator booleanOperator = 6;</code> - * @return The enum numeric value on the wire for booleanOperator. - */ - @java.lang.Override public int getBooleanOperatorValue() { - return booleanOperator_; + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - /** - * <pre> - * Evaluation operator to be used - * </pre> - * - * <code>.policy.BooleanOperator booleanOperator = 6;</code> - * @param value The enum numeric value on the wire for booleanOperator to set. - * @return This builder for chaining. - */ - public Builder setBooleanOperatorValue(int value) { - - booleanOperator_ = value; - onChanged(); - return this; + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); } - /** - * <pre> - * Evaluation operator to be used - * </pre> - * - * <code>.policy.BooleanOperator booleanOperator = 6;</code> - * @return The booleanOperator. - */ @java.lang.Override - public policy.PolicyCondition.BooleanOperator getBooleanOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); - return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleIdList) { + return mergeFrom((policy.Policy.PolicyRuleIdList)other); + } else { + super.mergeFrom(other); + return this; + } } - /** - * <pre> - * Evaluation operator to be used - * </pre> - * - * <code>.policy.BooleanOperator booleanOperator = 6;</code> - * @param value The booleanOperator to set. - * @return This builder for chaining. - */ - public Builder setBooleanOperator(policy.PolicyCondition.BooleanOperator value) { - if (value == null) { - throw new NullPointerException(); + + public Builder mergeFrom(policy.Policy.PolicyRuleIdList other) { + if (other == policy.Policy.PolicyRuleIdList.getDefaultInstance()) return this; + if (policyRuleIdListBuilder_ == null) { + if (!other.policyRuleIdList_.isEmpty()) { + if (policyRuleIdList_.isEmpty()) { + policyRuleIdList_ = other.policyRuleIdList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.addAll(other.policyRuleIdList_); + } + onChanged(); + } + } else { + if (!other.policyRuleIdList_.isEmpty()) { + if (policyRuleIdListBuilder_.isEmpty()) { + policyRuleIdListBuilder_.dispose(); + policyRuleIdListBuilder_ = null; + policyRuleIdList_ = other.policyRuleIdList_; + bitField0_ = (bitField0_ & ~0x00000001); + policyRuleIdListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPolicyRuleIdListFieldBuilder() : null; + } else { + policyRuleIdListBuilder_.addAllMessages(other.policyRuleIdList_); + } + } } - - booleanOperator_ = value.getNumber(); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } - /** - * <pre> - * Evaluation operator to be used - * </pre> - * - * <code>.policy.BooleanOperator booleanOperator = 6;</code> - * @return This builder for chaining. - */ - public Builder clearBooleanOperator() { - - booleanOperator_ = 0; - onChanged(); + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + policy.Policy.PolicyRuleIdList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } + private int bitField0_; - private java.util.List<policy.PolicyAction.PolicyRuleAction> actionList_ = + private java.util.List<policy.Policy.PolicyRuleId> policyRuleIdList_ = java.util.Collections.emptyList(); - private void ensureActionListIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - actionList_ = new java.util.ArrayList<policy.PolicyAction.PolicyRuleAction>(actionList_); - bitField0_ |= 0x00000002; + private void ensurePolicyRuleIdListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyRuleIdList_ = new java.util.ArrayList<policy.Policy.PolicyRuleId>(policyRuleIdList_); + bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder> actionListBuilder_; + policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> policyRuleIdListBuilder_; /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public java.util.List<policy.PolicyAction.PolicyRuleAction> getActionListList() { - if (actionListBuilder_ == null) { - return java.util.Collections.unmodifiableList(actionList_); + public java.util.List<policy.Policy.PolicyRuleId> getPolicyRuleIdListList() { + if (policyRuleIdListBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyRuleIdList_); } else { - return actionListBuilder_.getMessageList(); + return policyRuleIdListBuilder_.getMessageList(); } } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public int getActionListCount() { - if (actionListBuilder_ == null) { - return actionList_.size(); + public int getPolicyRuleIdListCount() { + if (policyRuleIdListBuilder_ == null) { + return policyRuleIdList_.size(); } else { - return actionListBuilder_.getCount(); + return policyRuleIdListBuilder_.getCount(); } } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public policy.PolicyAction.PolicyRuleAction getActionList(int index) { - if (actionListBuilder_ == null) { - return actionList_.get(index); + public policy.Policy.PolicyRuleId getPolicyRuleIdList(int index) { + if (policyRuleIdListBuilder_ == null) { + return policyRuleIdList_.get(index); } else { - return actionListBuilder_.getMessage(index); + return policyRuleIdListBuilder_.getMessage(index); } } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public Builder setActionList( - int index, policy.PolicyAction.PolicyRuleAction value) { - if (actionListBuilder_ == null) { + public Builder setPolicyRuleIdList( + int index, policy.Policy.PolicyRuleId value) { + if (policyRuleIdListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureActionListIsMutable(); - actionList_.set(index, value); + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.set(index, value); onChanged(); } else { - actionListBuilder_.setMessage(index, value); + policyRuleIdListBuilder_.setMessage(index, value); } return this; } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public Builder setActionList( - int index, policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); - actionList_.set(index, builderForValue.build()); + public Builder setPolicyRuleIdList( + int index, policy.Policy.PolicyRuleId.Builder builderForValue) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.set(index, builderForValue.build()); onChanged(); } else { - actionListBuilder_.setMessage(index, builderForValue.build()); + policyRuleIdListBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public Builder addActionList(policy.PolicyAction.PolicyRuleAction value) { - if (actionListBuilder_ == null) { + public Builder addPolicyRuleIdList(policy.Policy.PolicyRuleId value) { + if (policyRuleIdListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureActionListIsMutable(); - actionList_.add(value); + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.add(value); onChanged(); } else { - actionListBuilder_.addMessage(value); + policyRuleIdListBuilder_.addMessage(value); } return this; } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public Builder addActionList( - int index, policy.PolicyAction.PolicyRuleAction value) { - if (actionListBuilder_ == null) { + public Builder addPolicyRuleIdList( + int index, policy.Policy.PolicyRuleId value) { + if (policyRuleIdListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureActionListIsMutable(); - actionList_.add(index, value); + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.add(index, value); onChanged(); } else { - actionListBuilder_.addMessage(index, value); + policyRuleIdListBuilder_.addMessage(index, value); } return this; } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public Builder addActionList( - policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); - actionList_.add(builderForValue.build()); + public Builder addPolicyRuleIdList( + policy.Policy.PolicyRuleId.Builder builderForValue) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.add(builderForValue.build()); onChanged(); } else { - actionListBuilder_.addMessage(builderForValue.build()); + policyRuleIdListBuilder_.addMessage(builderForValue.build()); } return this; - } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public Builder addActionList( - int index, policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); - actionList_.add(index, builderForValue.build()); + public Builder addPolicyRuleIdList( + int index, policy.Policy.PolicyRuleId.Builder builderForValue) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.add(index, builderForValue.build()); onChanged(); } else { - actionListBuilder_.addMessage(index, builderForValue.build()); + policyRuleIdListBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public Builder addAllActionList( - java.lang.Iterable<? extends policy.PolicyAction.PolicyRuleAction> values) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); + public Builder addAllPolicyRuleIdList( + java.lang.Iterable<? extends policy.Policy.PolicyRuleId> values) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actionList_); + values, policyRuleIdList_); onChanged(); } else { - actionListBuilder_.addAllMessages(values); + policyRuleIdListBuilder_.addAllMessages(values); } return this; } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public Builder clearActionList() { - if (actionListBuilder_ == null) { - actionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearPolicyRuleIdList() { + if (policyRuleIdListBuilder_ == null) { + policyRuleIdList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - actionListBuilder_.clear(); + policyRuleIdListBuilder_.clear(); } return this; } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public Builder removeActionList(int index) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); - actionList_.remove(index); + public Builder removePolicyRuleIdList(int index) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.remove(index); onChanged(); } else { - actionListBuilder_.remove(index); + policyRuleIdListBuilder_.remove(index); } return this; } /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> */ - public policy.PolicyAction.PolicyRuleAction.Builder getActionListBuilder( + public policy.Policy.PolicyRuleId.Builder getPolicyRuleIdListBuilder( int index) { - return getActionListFieldBuilder().getBuilder(index); + return getPolicyRuleIdListFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdListOrBuilder( + int index) { + if (policyRuleIdListBuilder_ == null) { + return policyRuleIdList_.get(index); } else { + return policyRuleIdListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + public java.util.List<? extends policy.Policy.PolicyRuleIdOrBuilder> + getPolicyRuleIdListOrBuilderList() { + if (policyRuleIdListBuilder_ != null) { + return policyRuleIdListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyRuleIdList_); + } + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + public policy.Policy.PolicyRuleId.Builder addPolicyRuleIdListBuilder() { + return getPolicyRuleIdListFieldBuilder().addBuilder( + policy.Policy.PolicyRuleId.getDefaultInstance()); + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + public policy.Policy.PolicyRuleId.Builder addPolicyRuleIdListBuilder( + int index) { + return getPolicyRuleIdListFieldBuilder().addBuilder( + index, policy.Policy.PolicyRuleId.getDefaultInstance()); + } + /** + * <code>repeated .policy.PolicyRuleId policyRuleIdList = 1;</code> + */ + public java.util.List<policy.Policy.PolicyRuleId.Builder> + getPolicyRuleIdListBuilderList() { + return getPolicyRuleIdListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> + getPolicyRuleIdListFieldBuilder() { + if (policyRuleIdListBuilder_ == null) { + policyRuleIdListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder>( + policyRuleIdList_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyRuleIdList_ = null; + } + return policyRuleIdListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleIdList) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleIdList) + private static final policy.Policy.PolicyRuleIdList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleIdList(); + } + + public static policy.Policy.PolicyRuleIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<PolicyRuleIdList> + PARSER = new com.google.protobuf.AbstractParser<PolicyRuleIdList>() { + @java.lang.Override + public PolicyRuleIdList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PolicyRuleIdList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<PolicyRuleIdList> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<PolicyRuleIdList> getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PolicyRuleServiceListOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.PolicyRuleServiceList) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + java.util.List<policy.Policy.PolicyRuleService> + getPolicyRuleServiceListList(); + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + policy.Policy.PolicyRuleService getPolicyRuleServiceList(int index); + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + int getPolicyRuleServiceListCount(); + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + java.util.List<? extends policy.Policy.PolicyRuleServiceOrBuilder> + getPolicyRuleServiceListOrBuilderList(); + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + policy.Policy.PolicyRuleServiceOrBuilder getPolicyRuleServiceListOrBuilder( + int index); + } + /** + * <pre> + * A list of service-oriented policy rules + * </pre> + * + * Protobuf type {@code policy.PolicyRuleServiceList} + */ + public static final class PolicyRuleServiceList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.PolicyRuleServiceList) + PolicyRuleServiceListOrBuilder { + private static final long serialVersionUID = 0L; + // Use PolicyRuleServiceList.newBuilder() to construct. + private PolicyRuleServiceList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private PolicyRuleServiceList() { + policyRuleServiceList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PolicyRuleServiceList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PolicyRuleServiceList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + policyRuleServiceList_ = new java.util.ArrayList<policy.Policy.PolicyRuleService>(); + mutable_bitField0_ |= 0x00000001; + } + policyRuleServiceList_.add( + input.readMessage(policy.Policy.PolicyRuleService.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + policyRuleServiceList_ = java.util.Collections.unmodifiableList(policyRuleServiceList_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleServiceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleServiceList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + policy.Policy.PolicyRuleServiceList.class, policy.Policy.PolicyRuleServiceList.Builder.class); + } + + public static final int POLICYRULESERVICELIST_FIELD_NUMBER = 1; + private java.util.List<policy.Policy.PolicyRuleService> policyRuleServiceList_; + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + @java.lang.Override + public java.util.List<policy.Policy.PolicyRuleService> getPolicyRuleServiceListList() { + return policyRuleServiceList_; + } + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + @java.lang.Override + public java.util.List<? extends policy.Policy.PolicyRuleServiceOrBuilder> + getPolicyRuleServiceListOrBuilderList() { + return policyRuleServiceList_; + } + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + @java.lang.Override + public int getPolicyRuleServiceListCount() { + return policyRuleServiceList_.size(); + } + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + @java.lang.Override + public policy.Policy.PolicyRuleService getPolicyRuleServiceList(int index) { + return policyRuleServiceList_.get(index); + } + /** + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> + */ + @java.lang.Override + public policy.Policy.PolicyRuleServiceOrBuilder getPolicyRuleServiceListOrBuilder( + int index) { + return policyRuleServiceList_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < policyRuleServiceList_.size(); i++) { + output.writeMessage(1, policyRuleServiceList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyRuleServiceList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, policyRuleServiceList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - public policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder( - int index) { - if (actionListBuilder_ == null) { - return actionList_.get(index); } else { - return actionListBuilder_.getMessageOrBuilder(index); - } + if (!(obj instanceof policy.Policy.PolicyRuleServiceList)) { + return super.equals(obj); } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - public java.util.List<? extends policy.PolicyAction.PolicyRuleActionOrBuilder> - getActionListOrBuilderList() { - if (actionListBuilder_ != null) { - return actionListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actionList_); - } + policy.Policy.PolicyRuleServiceList other = (policy.Policy.PolicyRuleServiceList) obj; + + if (!getPolicyRuleServiceListList() + .equals(other.getPolicyRuleServiceListList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - public policy.PolicyAction.PolicyRuleAction.Builder addActionListBuilder() { - return getActionListFieldBuilder().addBuilder( - policy.PolicyAction.PolicyRuleAction.getDefaultInstance()); + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyRuleServiceListCount() > 0) { + hash = (37 * hash) + POLICYRULESERVICELIST_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleServiceListList().hashCode(); } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - public policy.PolicyAction.PolicyRuleAction.Builder addActionListBuilder( - int index) { - return getActionListFieldBuilder().addBuilder( - index, policy.PolicyAction.PolicyRuleAction.getDefaultInstance()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRuleServiceList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static policy.Policy.PolicyRuleServiceList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static policy.Policy.PolicyRuleServiceList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static policy.Policy.PolicyRuleServiceList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static policy.Policy.PolicyRuleServiceList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static policy.Policy.PolicyRuleServiceList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static policy.Policy.PolicyRuleServiceList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static policy.Policy.PolicyRuleServiceList 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 policy.Policy.PolicyRuleServiceList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static policy.Policy.PolicyRuleServiceList 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 policy.Policy.PolicyRuleServiceList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static policy.Policy.PolicyRuleServiceList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(policy.Policy.PolicyRuleServiceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * <pre> + * A list of service-oriented policy rules + * </pre> + * + * Protobuf type {@code policy.PolicyRuleServiceList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:policy.PolicyRuleServiceList) + policy.Policy.PolicyRuleServiceListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleServiceList_descriptor; } - /** - * <pre> - * One or more actions should be applied - * </pre> - * - * <code>repeated .policy.PolicyRuleAction actionList = 7;</code> - */ - public java.util.List<policy.PolicyAction.PolicyRuleAction.Builder> - getActionListBuilderList() { - return getActionListFieldBuilder().getBuilderList(); + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleServiceList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + policy.Policy.PolicyRuleServiceList.class, policy.Policy.PolicyRuleServiceList.Builder.class); } - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder> - getActionListFieldBuilder() { - if (actionListBuilder_ == null) { - actionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder>( - actionList_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - actionList_ = null; - } - return actionListBuilder_; + + // Construct using policy.Policy.PolicyRuleServiceList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPolicyRuleServiceListFieldBuilder(); } } - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); + @java.lang.Override + public Builder clear() { + super.clear(); + if (policyRuleServiceListBuilder_ == null) { + policyRuleServiceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - serviceIdBuilder_.setMessage(value); + policyRuleServiceListBuilder_.clear(); } - return this; } - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - return this; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleServiceList_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRuleServiceList getDefaultInstanceForType() { + return policy.Policy.PolicyRuleServiceList.getDefaultInstance(); + } + + @java.lang.Override + public policy.Policy.PolicyRuleServiceList build() { + policy.Policy.PolicyRuleServiceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; + + @java.lang.Override + public policy.Policy.PolicyRuleServiceList buildPartial() { + policy.Policy.PolicyRuleServiceList result = new policy.Policy.PolicyRuleServiceList(this); + int from_bitField0_ = bitField0_; + if (policyRuleServiceListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyRuleServiceList_ = java.util.Collections.unmodifiableList(policyRuleServiceList_); + bitField0_ = (bitField0_ & ~0x00000001); } - onChanged(); + result.policyRuleServiceList_ = policyRuleServiceList_; } else { - serviceIdBuilder_.mergeFrom(value); + result.policyRuleServiceList_ = policyRuleServiceListBuilder_.build(); } + onBuilt(); + return result; + } - return this; + @java.lang.Override + public Builder clone() { + return super.clone(); } - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleServiceList) { + return mergeFrom((policy.Policy.PolicyRuleServiceList)other); } else { - serviceId_ = null; - serviceIdBuilder_ = null; + super.mergeFrom(other); + return this; } - - return this; - } - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); } - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); + + public Builder mergeFrom(policy.Policy.PolicyRuleServiceList other) { + if (other == policy.Policy.PolicyRuleServiceList.getDefaultInstance()) return this; + if (policyRuleServiceListBuilder_ == null) { + if (!other.policyRuleServiceList_.isEmpty()) { + if (policyRuleServiceList_.isEmpty()) { + policyRuleServiceList_ = other.policyRuleServiceList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.addAll(other.policyRuleServiceList_); + } + onChanged(); + } } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + if (!other.policyRuleServiceList_.isEmpty()) { + if (policyRuleServiceListBuilder_.isEmpty()) { + policyRuleServiceListBuilder_.dispose(); + policyRuleServiceListBuilder_ = null; + policyRuleServiceList_ = other.policyRuleServiceList_; + bitField0_ = (bitField0_ & ~0x00000001); + policyRuleServiceListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPolicyRuleServiceListFieldBuilder() : null; + } else { + policyRuleServiceListBuilder_.addAllMessages(other.policyRuleServiceList_); + } + } } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; } - /** - * <pre> - * Affected service and devices - * </pre> - * - * <code>.context.ServiceId serviceId = 8;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + policy.Policy.PolicyRuleServiceList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleServiceList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } } - return serviceIdBuilder_; + return this; } + private int bitField0_; - private java.util.List<context.ContextOuterClass.DeviceId> deviceList_ = + private java.util.List<policy.Policy.PolicyRuleService> policyRuleServiceList_ = java.util.Collections.emptyList(); - private void ensureDeviceListIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(deviceList_); - bitField0_ |= 0x00000004; + private void ensurePolicyRuleServiceListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyRuleServiceList_ = new java.util.ArrayList<policy.Policy.PolicyRuleService>(policyRuleServiceList_); + bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceListBuilder_; + policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder> policyRuleServiceListBuilder_; /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public java.util.List<context.ContextOuterClass.DeviceId> getDeviceListList() { - if (deviceListBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceList_); + public java.util.List<policy.Policy.PolicyRuleService> getPolicyRuleServiceListList() { + if (policyRuleServiceListBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyRuleServiceList_); } else { - return deviceListBuilder_.getMessageList(); + return policyRuleServiceListBuilder_.getMessageList(); } } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public int getDeviceListCount() { - if (deviceListBuilder_ == null) { - return deviceList_.size(); + public int getPolicyRuleServiceListCount() { + if (policyRuleServiceListBuilder_ == null) { + return policyRuleServiceList_.size(); } else { - return deviceListBuilder_.getCount(); + return policyRuleServiceListBuilder_.getCount(); } } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public context.ContextOuterClass.DeviceId getDeviceList(int index) { - if (deviceListBuilder_ == null) { - return deviceList_.get(index); + public policy.Policy.PolicyRuleService getPolicyRuleServiceList(int index) { + if (policyRuleServiceListBuilder_ == null) { + return policyRuleServiceList_.get(index); } else { - return deviceListBuilder_.getMessage(index); + return policyRuleServiceListBuilder_.getMessage(index); } } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public Builder setDeviceList( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceListBuilder_ == null) { + public Builder setPolicyRuleServiceList( + int index, policy.Policy.PolicyRuleService value) { + if (policyRuleServiceListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDeviceListIsMutable(); - deviceList_.set(index, value); + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.set(index, value); onChanged(); } else { - deviceListBuilder_.setMessage(index, value); + policyRuleServiceListBuilder_.setMessage(index, value); } return this; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public Builder setDeviceList( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.set(index, builderForValue.build()); + public Builder setPolicyRuleServiceList( + int index, policy.Policy.PolicyRuleService.Builder builderForValue) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.set(index, builderForValue.build()); onChanged(); } else { - deviceListBuilder_.setMessage(index, builderForValue.build()); + policyRuleServiceListBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public Builder addDeviceList(context.ContextOuterClass.DeviceId value) { - if (deviceListBuilder_ == null) { + public Builder addPolicyRuleServiceList(policy.Policy.PolicyRuleService value) { + if (policyRuleServiceListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDeviceListIsMutable(); - deviceList_.add(value); + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.add(value); onChanged(); } else { - deviceListBuilder_.addMessage(value); + policyRuleServiceListBuilder_.addMessage(value); } return this; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public Builder addDeviceList( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceListBuilder_ == null) { + public Builder addPolicyRuleServiceList( + int index, policy.Policy.PolicyRuleService value) { + if (policyRuleServiceListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDeviceListIsMutable(); - deviceList_.add(index, value); + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.add(index, value); onChanged(); } else { - deviceListBuilder_.addMessage(index, value); + policyRuleServiceListBuilder_.addMessage(index, value); } return this; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public Builder addDeviceList( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.add(builderForValue.build()); + public Builder addPolicyRuleServiceList( + policy.Policy.PolicyRuleService.Builder builderForValue) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.add(builderForValue.build()); onChanged(); } else { - deviceListBuilder_.addMessage(builderForValue.build()); + policyRuleServiceListBuilder_.addMessage(builderForValue.build()); } return this; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public Builder addDeviceList( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.add(index, builderForValue.build()); + public Builder addPolicyRuleServiceList( + int index, policy.Policy.PolicyRuleService.Builder builderForValue) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.add(index, builderForValue.build()); onChanged(); } else { - deviceListBuilder_.addMessage(index, builderForValue.build()); + policyRuleServiceListBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public Builder addAllDeviceList( - java.lang.Iterable<? extends context.ContextOuterClass.DeviceId> values) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); + public Builder addAllPolicyRuleServiceList( + java.lang.Iterable<? extends policy.Policy.PolicyRuleService> values) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceList_); + values, policyRuleServiceList_); onChanged(); } else { - deviceListBuilder_.addAllMessages(values); + policyRuleServiceListBuilder_.addAllMessages(values); } return this; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public Builder clearDeviceList() { - if (deviceListBuilder_ == null) { - deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder clearPolicyRuleServiceList() { + if (policyRuleServiceListBuilder_ == null) { + policyRuleServiceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - deviceListBuilder_.clear(); + policyRuleServiceListBuilder_.clear(); } return this; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public Builder removeDeviceList(int index) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.remove(index); + public Builder removePolicyRuleServiceList(int index) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.remove(index); onChanged(); } else { - deviceListBuilder_.remove(index); + policyRuleServiceListBuilder_.remove(index); } return this; } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public context.ContextOuterClass.DeviceId.Builder getDeviceListBuilder( + public policy.Policy.PolicyRuleService.Builder getPolicyRuleServiceListBuilder( int index) { - return getDeviceListFieldBuilder().getBuilder(index); + return getPolicyRuleServiceListFieldBuilder().getBuilder(index); } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( + public policy.Policy.PolicyRuleServiceOrBuilder getPolicyRuleServiceListOrBuilder( int index) { - if (deviceListBuilder_ == null) { - return deviceList_.get(index); } else { - return deviceListBuilder_.getMessageOrBuilder(index); + if (policyRuleServiceListBuilder_ == null) { + return policyRuleServiceList_.get(index); } else { + return policyRuleServiceListBuilder_.getMessageOrBuilder(index); } } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public java.util.List<? extends context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceListOrBuilderList() { - if (deviceListBuilder_ != null) { - return deviceListBuilder_.getMessageOrBuilderList(); + public java.util.List<? extends policy.Policy.PolicyRuleServiceOrBuilder> + getPolicyRuleServiceListOrBuilderList() { + if (policyRuleServiceListBuilder_ != null) { + return policyRuleServiceListBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(deviceList_); + return java.util.Collections.unmodifiableList(policyRuleServiceList_); } } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder() { - return getDeviceListFieldBuilder().addBuilder( - context.ContextOuterClass.DeviceId.getDefaultInstance()); + public policy.Policy.PolicyRuleService.Builder addPolicyRuleServiceListBuilder() { + return getPolicyRuleServiceListFieldBuilder().addBuilder( + policy.Policy.PolicyRuleService.getDefaultInstance()); } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder( + public policy.Policy.PolicyRuleService.Builder addPolicyRuleServiceListBuilder( int index) { - return getDeviceListFieldBuilder().addBuilder( - index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + return getPolicyRuleServiceListFieldBuilder().addBuilder( + index, policy.Policy.PolicyRuleService.getDefaultInstance()); } /** - * <code>repeated .context.DeviceId deviceList = 9;</code> + * <code>repeated .policy.PolicyRuleService policyRuleServiceList = 1;</code> */ - public java.util.List<context.ContextOuterClass.DeviceId.Builder> - getDeviceListBuilderList() { - return getDeviceListFieldBuilder().getBuilderList(); + public java.util.List<policy.Policy.PolicyRuleService.Builder> + getPolicyRuleServiceListBuilderList() { + return getPolicyRuleServiceListFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceListFieldBuilder() { - if (deviceListBuilder_ == null) { - deviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - deviceList_, - ((bitField0_ & 0x00000004) != 0), + policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder> + getPolicyRuleServiceListFieldBuilder() { + if (policyRuleServiceListBuilder_ == null) { + policyRuleServiceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder>( + policyRuleServiceList_, + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - deviceList_ = null; + policyRuleServiceList_ = null; } - return deviceListBuilder_; + return policyRuleServiceListBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -5105,99 +7638,99 @@ public final class Policy { } - // @@protoc_insertion_point(builder_scope:policy.PolicyRule) + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleServiceList) } - // @@protoc_insertion_point(class_scope:policy.PolicyRule) - private static final policy.Policy.PolicyRule DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:policy.PolicyRuleServiceList) + private static final policy.Policy.PolicyRuleServiceList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRule(); + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleServiceList(); } - public static policy.Policy.PolicyRule getDefaultInstance() { + public static policy.Policy.PolicyRuleServiceList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser<PolicyRule> - PARSER = new com.google.protobuf.AbstractParser<PolicyRule>() { + private static final com.google.protobuf.Parser<PolicyRuleServiceList> + PARSER = new com.google.protobuf.AbstractParser<PolicyRuleServiceList>() { @java.lang.Override - public PolicyRule parsePartialFrom( + public PolicyRuleServiceList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRule(input, extensionRegistry); + return new PolicyRuleServiceList(input, extensionRegistry); } }; - public static com.google.protobuf.Parser<PolicyRule> parser() { + public static com.google.protobuf.Parser<PolicyRuleServiceList> parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser<PolicyRule> getParserForType() { + public com.google.protobuf.Parser<PolicyRuleServiceList> getParserForType() { return PARSER; } @java.lang.Override - public policy.Policy.PolicyRule getDefaultInstanceForType() { + public policy.Policy.PolicyRuleServiceList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface PolicyRuleListOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleList) + public interface PolicyRuleDeviceListOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.PolicyRuleDeviceList) com.google.protobuf.MessageOrBuilder { /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - java.util.List<policy.Policy.PolicyRule> - getPolicyRuleListList(); + java.util.List<policy.Policy.PolicyRuleDevice> + getPolicyRuleDeviceListList(); /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - policy.Policy.PolicyRule getPolicyRuleList(int index); + policy.Policy.PolicyRuleDevice getPolicyRuleDeviceList(int index); /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - int getPolicyRuleListCount(); + int getPolicyRuleDeviceListCount(); /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - java.util.List<? extends policy.Policy.PolicyRuleOrBuilder> - getPolicyRuleListOrBuilderList(); + java.util.List<? extends policy.Policy.PolicyRuleDeviceOrBuilder> + getPolicyRuleDeviceListOrBuilderList(); /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - policy.Policy.PolicyRuleOrBuilder getPolicyRuleListOrBuilder( + policy.Policy.PolicyRuleDeviceOrBuilder getPolicyRuleDeviceListOrBuilder( int index); } /** * <pre> - * A list of policy rules + * A list of device-oriented policy rules * </pre> * - * Protobuf type {@code policy.PolicyRuleList} + * Protobuf type {@code policy.PolicyRuleDeviceList} */ - public static final class PolicyRuleList extends + public static final class PolicyRuleDeviceList extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleList) - PolicyRuleListOrBuilder { + // @@protoc_insertion_point(message_implements:policy.PolicyRuleDeviceList) + PolicyRuleDeviceListOrBuilder { private static final long serialVersionUID = 0L; - // Use PolicyRuleList.newBuilder() to construct. - private PolicyRuleList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + // Use PolicyRuleDeviceList.newBuilder() to construct. + private PolicyRuleDeviceList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } - private PolicyRuleList() { - policyRuleList_ = java.util.Collections.emptyList(); + private PolicyRuleDeviceList() { + policyRuleDeviceList_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new PolicyRuleList(); + return new PolicyRuleDeviceList(); } @java.lang.Override @@ -5205,7 +7738,7 @@ public final class Policy { getUnknownFields() { return this.unknownFields; } - private PolicyRuleList( + private PolicyRuleDeviceList( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5226,11 +7759,11 @@ public final class Policy { break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policyRuleList_ = new java.util.ArrayList<policy.Policy.PolicyRule>(); + policyRuleDeviceList_ = new java.util.ArrayList<policy.Policy.PolicyRuleDevice>(); mutable_bitField0_ |= 0x00000001; } - policyRuleList_.add( - input.readMessage(policy.Policy.PolicyRule.parser(), extensionRegistry)); + policyRuleDeviceList_.add( + input.readMessage(policy.Policy.PolicyRuleDevice.parser(), extensionRegistry)); break; } default: { @@ -5249,7 +7782,7 @@ public final class Policy { e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - policyRuleList_ = java.util.Collections.unmodifiableList(policyRuleList_); + policyRuleDeviceList_ = java.util.Collections.unmodifiableList(policyRuleDeviceList_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -5257,55 +7790,55 @@ public final class Policy { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleList_descriptor; + return policy.Policy.internal_static_policy_PolicyRuleDeviceList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleList_fieldAccessorTable + return policy.Policy.internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleList.class, policy.Policy.PolicyRuleList.Builder.class); + policy.Policy.PolicyRuleDeviceList.class, policy.Policy.PolicyRuleDeviceList.Builder.class); } - public static final int POLICYRULELIST_FIELD_NUMBER = 1; - private java.util.List<policy.Policy.PolicyRule> policyRuleList_; + public static final int POLICYRULEDEVICELIST_FIELD_NUMBER = 1; + private java.util.List<policy.Policy.PolicyRuleDevice> policyRuleDeviceList_; /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ @java.lang.Override - public java.util.List<policy.Policy.PolicyRule> getPolicyRuleListList() { - return policyRuleList_; + public java.util.List<policy.Policy.PolicyRuleDevice> getPolicyRuleDeviceListList() { + return policyRuleDeviceList_; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ @java.lang.Override - public java.util.List<? extends policy.Policy.PolicyRuleOrBuilder> - getPolicyRuleListOrBuilderList() { - return policyRuleList_; + public java.util.List<? extends policy.Policy.PolicyRuleDeviceOrBuilder> + getPolicyRuleDeviceListOrBuilderList() { + return policyRuleDeviceList_; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ @java.lang.Override - public int getPolicyRuleListCount() { - return policyRuleList_.size(); + public int getPolicyRuleDeviceListCount() { + return policyRuleDeviceList_.size(); } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ @java.lang.Override - public policy.Policy.PolicyRule getPolicyRuleList(int index) { - return policyRuleList_.get(index); + public policy.Policy.PolicyRuleDevice getPolicyRuleDeviceList(int index) { + return policyRuleDeviceList_.get(index); } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ @java.lang.Override - public policy.Policy.PolicyRuleOrBuilder getPolicyRuleListOrBuilder( + public policy.Policy.PolicyRuleDeviceOrBuilder getPolicyRuleDeviceListOrBuilder( int index) { - return policyRuleList_.get(index); + return policyRuleDeviceList_.get(index); } private byte memoizedIsInitialized = -1; @@ -5322,8 +7855,8 @@ public final class Policy { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < policyRuleList_.size(); i++) { - output.writeMessage(1, policyRuleList_.get(i)); + for (int i = 0; i < policyRuleDeviceList_.size(); i++) { + output.writeMessage(1, policyRuleDeviceList_.get(i)); } unknownFields.writeTo(output); } @@ -5334,9 +7867,9 @@ public final class Policy { if (size != -1) return size; size = 0; - for (int i = 0; i < policyRuleList_.size(); i++) { + for (int i = 0; i < policyRuleDeviceList_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, policyRuleList_.get(i)); + .computeMessageSize(1, policyRuleDeviceList_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -5348,13 +7881,13 @@ public final class Policy { if (obj == this) { return true; } - if (!(obj instanceof policy.Policy.PolicyRuleList)) { + if (!(obj instanceof policy.Policy.PolicyRuleDeviceList)) { return super.equals(obj); } - policy.Policy.PolicyRuleList other = (policy.Policy.PolicyRuleList) obj; + policy.Policy.PolicyRuleDeviceList other = (policy.Policy.PolicyRuleDeviceList) obj; - if (!getPolicyRuleListList() - .equals(other.getPolicyRuleListList())) return false; + if (!getPolicyRuleDeviceListList() + .equals(other.getPolicyRuleDeviceListList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -5366,78 +7899,78 @@ public final class Policy { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getPolicyRuleListCount() > 0) { - hash = (37 * hash) + POLICYRULELIST_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleListList().hashCode(); + if (getPolicyRuleDeviceListCount() > 0) { + hash = (37 * hash) + POLICYRULEDEVICELIST_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleDeviceListList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static policy.Policy.PolicyRuleList parseFrom( + public static policy.Policy.PolicyRuleDeviceList parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static policy.Policy.PolicyRuleList parseFrom( + public static policy.Policy.PolicyRuleDeviceList parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static policy.Policy.PolicyRuleList parseFrom( + public static policy.Policy.PolicyRuleDeviceList parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static policy.Policy.PolicyRuleList parseFrom( + public static policy.Policy.PolicyRuleDeviceList parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static policy.Policy.PolicyRuleList parseFrom(byte[] data) + public static policy.Policy.PolicyRuleDeviceList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static policy.Policy.PolicyRuleList parseFrom( + public static policy.Policy.PolicyRuleDeviceList parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static policy.Policy.PolicyRuleList parseFrom(java.io.InputStream input) + public static policy.Policy.PolicyRuleDeviceList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static policy.Policy.PolicyRuleList parseFrom( + public static policy.Policy.PolicyRuleDeviceList 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 policy.Policy.PolicyRuleList parseDelimitedFrom(java.io.InputStream input) + public static policy.Policy.PolicyRuleDeviceList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static policy.Policy.PolicyRuleList parseDelimitedFrom( + public static policy.Policy.PolicyRuleDeviceList 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 policy.Policy.PolicyRuleList parseFrom( + public static policy.Policy.PolicyRuleDeviceList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static policy.Policy.PolicyRuleList parseFrom( + public static policy.Policy.PolicyRuleDeviceList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5450,7 +7983,7 @@ public final class Policy { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(policy.Policy.PolicyRuleList prototype) { + public static Builder newBuilder(policy.Policy.PolicyRuleDeviceList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -5467,29 +8000,29 @@ public final class Policy { } /** * <pre> - * A list of policy rules + * A list of device-oriented policy rules * </pre> * - * Protobuf type {@code policy.PolicyRuleList} + * Protobuf type {@code policy.PolicyRuleDeviceList} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleList) - policy.Policy.PolicyRuleListOrBuilder { + // @@protoc_insertion_point(builder_implements:policy.PolicyRuleDeviceList) + policy.Policy.PolicyRuleDeviceListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleList_descriptor; + return policy.Policy.internal_static_policy_PolicyRuleDeviceList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleList_fieldAccessorTable + return policy.Policy.internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleList.class, policy.Policy.PolicyRuleList.Builder.class); + policy.Policy.PolicyRuleDeviceList.class, policy.Policy.PolicyRuleDeviceList.Builder.class); } - // Construct using policy.Policy.PolicyRuleList.newBuilder() + // Construct using policy.Policy.PolicyRuleDeviceList.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -5502,17 +8035,17 @@ public final class Policy { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getPolicyRuleListFieldBuilder(); + getPolicyRuleDeviceListFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (policyRuleListBuilder_ == null) { - policyRuleList_ = java.util.Collections.emptyList(); + if (policyRuleDeviceListBuilder_ == null) { + policyRuleDeviceList_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - policyRuleListBuilder_.clear(); + policyRuleDeviceListBuilder_.clear(); } return this; } @@ -5520,17 +8053,17 @@ public final class Policy { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleList_descriptor; + return policy.Policy.internal_static_policy_PolicyRuleDeviceList_descriptor; } @java.lang.Override - public policy.Policy.PolicyRuleList getDefaultInstanceForType() { - return policy.Policy.PolicyRuleList.getDefaultInstance(); + public policy.Policy.PolicyRuleDeviceList getDefaultInstanceForType() { + return policy.Policy.PolicyRuleDeviceList.getDefaultInstance(); } @java.lang.Override - public policy.Policy.PolicyRuleList build() { - policy.Policy.PolicyRuleList result = buildPartial(); + public policy.Policy.PolicyRuleDeviceList build() { + policy.Policy.PolicyRuleDeviceList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -5538,17 +8071,17 @@ public final class Policy { } @java.lang.Override - public policy.Policy.PolicyRuleList buildPartial() { - policy.Policy.PolicyRuleList result = new policy.Policy.PolicyRuleList(this); + public policy.Policy.PolicyRuleDeviceList buildPartial() { + policy.Policy.PolicyRuleDeviceList result = new policy.Policy.PolicyRuleDeviceList(this); int from_bitField0_ = bitField0_; - if (policyRuleListBuilder_ == null) { + if (policyRuleDeviceListBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - policyRuleList_ = java.util.Collections.unmodifiableList(policyRuleList_); + policyRuleDeviceList_ = java.util.Collections.unmodifiableList(policyRuleDeviceList_); bitField0_ = (bitField0_ & ~0x00000001); } - result.policyRuleList_ = policyRuleList_; + result.policyRuleDeviceList_ = policyRuleDeviceList_; } else { - result.policyRuleList_ = policyRuleListBuilder_.build(); + result.policyRuleDeviceList_ = policyRuleDeviceListBuilder_.build(); } onBuilt(); return result; @@ -5588,39 +8121,39 @@ public final class Policy { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleList) { - return mergeFrom((policy.Policy.PolicyRuleList)other); + if (other instanceof policy.Policy.PolicyRuleDeviceList) { + return mergeFrom((policy.Policy.PolicyRuleDeviceList)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(policy.Policy.PolicyRuleList other) { - if (other == policy.Policy.PolicyRuleList.getDefaultInstance()) return this; - if (policyRuleListBuilder_ == null) { - if (!other.policyRuleList_.isEmpty()) { - if (policyRuleList_.isEmpty()) { - policyRuleList_ = other.policyRuleList_; + public Builder mergeFrom(policy.Policy.PolicyRuleDeviceList other) { + if (other == policy.Policy.PolicyRuleDeviceList.getDefaultInstance()) return this; + if (policyRuleDeviceListBuilder_ == null) { + if (!other.policyRuleDeviceList_.isEmpty()) { + if (policyRuleDeviceList_.isEmpty()) { + policyRuleDeviceList_ = other.policyRuleDeviceList_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensurePolicyRuleListIsMutable(); - policyRuleList_.addAll(other.policyRuleList_); + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.addAll(other.policyRuleDeviceList_); } onChanged(); } } else { - if (!other.policyRuleList_.isEmpty()) { - if (policyRuleListBuilder_.isEmpty()) { - policyRuleListBuilder_.dispose(); - policyRuleListBuilder_ = null; - policyRuleList_ = other.policyRuleList_; + if (!other.policyRuleDeviceList_.isEmpty()) { + if (policyRuleDeviceListBuilder_.isEmpty()) { + policyRuleDeviceListBuilder_.dispose(); + policyRuleDeviceListBuilder_ = null; + policyRuleDeviceList_ = other.policyRuleDeviceList_; bitField0_ = (bitField0_ & ~0x00000001); - policyRuleListBuilder_ = + policyRuleDeviceListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPolicyRuleListFieldBuilder() : null; + getPolicyRuleDeviceListFieldBuilder() : null; } else { - policyRuleListBuilder_.addAllMessages(other.policyRuleList_); + policyRuleDeviceListBuilder_.addAllMessages(other.policyRuleDeviceList_); } } } @@ -5639,11 +8172,11 @@ public final class Policy { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleList parsedMessage = null; + policy.Policy.PolicyRuleDeviceList parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleList) e.getUnfinishedMessage(); + parsedMessage = (policy.Policy.PolicyRuleDeviceList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -5654,244 +8187,244 @@ public final class Policy { } private int bitField0_; - private java.util.List<policy.Policy.PolicyRule> policyRuleList_ = + private java.util.List<policy.Policy.PolicyRuleDevice> policyRuleDeviceList_ = java.util.Collections.emptyList(); - private void ensurePolicyRuleListIsMutable() { + private void ensurePolicyRuleDeviceListIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - policyRuleList_ = new java.util.ArrayList<policy.Policy.PolicyRule>(policyRuleList_); + policyRuleDeviceList_ = new java.util.ArrayList<policy.Policy.PolicyRuleDevice>(policyRuleDeviceList_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRule, policy.Policy.PolicyRule.Builder, policy.Policy.PolicyRuleOrBuilder> policyRuleListBuilder_; + policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleDevice.Builder, policy.Policy.PolicyRuleDeviceOrBuilder> policyRuleDeviceListBuilder_; /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public java.util.List<policy.Policy.PolicyRule> getPolicyRuleListList() { - if (policyRuleListBuilder_ == null) { - return java.util.Collections.unmodifiableList(policyRuleList_); + public java.util.List<policy.Policy.PolicyRuleDevice> getPolicyRuleDeviceListList() { + if (policyRuleDeviceListBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyRuleDeviceList_); } else { - return policyRuleListBuilder_.getMessageList(); + return policyRuleDeviceListBuilder_.getMessageList(); } } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public int getPolicyRuleListCount() { - if (policyRuleListBuilder_ == null) { - return policyRuleList_.size(); + public int getPolicyRuleDeviceListCount() { + if (policyRuleDeviceListBuilder_ == null) { + return policyRuleDeviceList_.size(); } else { - return policyRuleListBuilder_.getCount(); + return policyRuleDeviceListBuilder_.getCount(); } } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public policy.Policy.PolicyRule getPolicyRuleList(int index) { - if (policyRuleListBuilder_ == null) { - return policyRuleList_.get(index); + public policy.Policy.PolicyRuleDevice getPolicyRuleDeviceList(int index) { + if (policyRuleDeviceListBuilder_ == null) { + return policyRuleDeviceList_.get(index); } else { - return policyRuleListBuilder_.getMessage(index); + return policyRuleDeviceListBuilder_.getMessage(index); } } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public Builder setPolicyRuleList( - int index, policy.Policy.PolicyRule value) { - if (policyRuleListBuilder_ == null) { + public Builder setPolicyRuleDeviceList( + int index, policy.Policy.PolicyRuleDevice value) { + if (policyRuleDeviceListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensurePolicyRuleListIsMutable(); - policyRuleList_.set(index, value); + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.set(index, value); onChanged(); } else { - policyRuleListBuilder_.setMessage(index, value); + policyRuleDeviceListBuilder_.setMessage(index, value); } return this; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public Builder setPolicyRuleList( - int index, policy.Policy.PolicyRule.Builder builderForValue) { - if (policyRuleListBuilder_ == null) { - ensurePolicyRuleListIsMutable(); - policyRuleList_.set(index, builderForValue.build()); + public Builder setPolicyRuleDeviceList( + int index, policy.Policy.PolicyRuleDevice.Builder builderForValue) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.set(index, builderForValue.build()); onChanged(); } else { - policyRuleListBuilder_.setMessage(index, builderForValue.build()); + policyRuleDeviceListBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public Builder addPolicyRuleList(policy.Policy.PolicyRule value) { - if (policyRuleListBuilder_ == null) { + public Builder addPolicyRuleDeviceList(policy.Policy.PolicyRuleDevice value) { + if (policyRuleDeviceListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensurePolicyRuleListIsMutable(); - policyRuleList_.add(value); + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.add(value); onChanged(); } else { - policyRuleListBuilder_.addMessage(value); + policyRuleDeviceListBuilder_.addMessage(value); } return this; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public Builder addPolicyRuleList( - int index, policy.Policy.PolicyRule value) { - if (policyRuleListBuilder_ == null) { + public Builder addPolicyRuleDeviceList( + int index, policy.Policy.PolicyRuleDevice value) { + if (policyRuleDeviceListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensurePolicyRuleListIsMutable(); - policyRuleList_.add(index, value); + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.add(index, value); onChanged(); } else { - policyRuleListBuilder_.addMessage(index, value); + policyRuleDeviceListBuilder_.addMessage(index, value); } return this; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public Builder addPolicyRuleList( - policy.Policy.PolicyRule.Builder builderForValue) { - if (policyRuleListBuilder_ == null) { - ensurePolicyRuleListIsMutable(); - policyRuleList_.add(builderForValue.build()); + public Builder addPolicyRuleDeviceList( + policy.Policy.PolicyRuleDevice.Builder builderForValue) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.add(builderForValue.build()); onChanged(); } else { - policyRuleListBuilder_.addMessage(builderForValue.build()); + policyRuleDeviceListBuilder_.addMessage(builderForValue.build()); } return this; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public Builder addPolicyRuleList( - int index, policy.Policy.PolicyRule.Builder builderForValue) { - if (policyRuleListBuilder_ == null) { - ensurePolicyRuleListIsMutable(); - policyRuleList_.add(index, builderForValue.build()); + public Builder addPolicyRuleDeviceList( + int index, policy.Policy.PolicyRuleDevice.Builder builderForValue) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.add(index, builderForValue.build()); onChanged(); } else { - policyRuleListBuilder_.addMessage(index, builderForValue.build()); + policyRuleDeviceListBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public Builder addAllPolicyRuleList( - java.lang.Iterable<? extends policy.Policy.PolicyRule> values) { - if (policyRuleListBuilder_ == null) { - ensurePolicyRuleListIsMutable(); + public Builder addAllPolicyRuleDeviceList( + java.lang.Iterable<? extends policy.Policy.PolicyRuleDevice> values) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, policyRuleList_); + values, policyRuleDeviceList_); onChanged(); } else { - policyRuleListBuilder_.addAllMessages(values); + policyRuleDeviceListBuilder_.addAllMessages(values); } return this; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public Builder clearPolicyRuleList() { - if (policyRuleListBuilder_ == null) { - policyRuleList_ = java.util.Collections.emptyList(); + public Builder clearPolicyRuleDeviceList() { + if (policyRuleDeviceListBuilder_ == null) { + policyRuleDeviceList_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - policyRuleListBuilder_.clear(); + policyRuleDeviceListBuilder_.clear(); } return this; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public Builder removePolicyRuleList(int index) { - if (policyRuleListBuilder_ == null) { - ensurePolicyRuleListIsMutable(); - policyRuleList_.remove(index); + public Builder removePolicyRuleDeviceList(int index) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.remove(index); onChanged(); } else { - policyRuleListBuilder_.remove(index); + policyRuleDeviceListBuilder_.remove(index); } return this; } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public policy.Policy.PolicyRule.Builder getPolicyRuleListBuilder( + public policy.Policy.PolicyRuleDevice.Builder getPolicyRuleDeviceListBuilder( int index) { - return getPolicyRuleListFieldBuilder().getBuilder(index); + return getPolicyRuleDeviceListFieldBuilder().getBuilder(index); } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public policy.Policy.PolicyRuleOrBuilder getPolicyRuleListOrBuilder( + public policy.Policy.PolicyRuleDeviceOrBuilder getPolicyRuleDeviceListOrBuilder( int index) { - if (policyRuleListBuilder_ == null) { - return policyRuleList_.get(index); } else { - return policyRuleListBuilder_.getMessageOrBuilder(index); + if (policyRuleDeviceListBuilder_ == null) { + return policyRuleDeviceList_.get(index); } else { + return policyRuleDeviceListBuilder_.getMessageOrBuilder(index); } } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public java.util.List<? extends policy.Policy.PolicyRuleOrBuilder> - getPolicyRuleListOrBuilderList() { - if (policyRuleListBuilder_ != null) { - return policyRuleListBuilder_.getMessageOrBuilderList(); + public java.util.List<? extends policy.Policy.PolicyRuleDeviceOrBuilder> + getPolicyRuleDeviceListOrBuilderList() { + if (policyRuleDeviceListBuilder_ != null) { + return policyRuleDeviceListBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(policyRuleList_); + return java.util.Collections.unmodifiableList(policyRuleDeviceList_); } } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public policy.Policy.PolicyRule.Builder addPolicyRuleListBuilder() { - return getPolicyRuleListFieldBuilder().addBuilder( - policy.Policy.PolicyRule.getDefaultInstance()); + public policy.Policy.PolicyRuleDevice.Builder addPolicyRuleDeviceListBuilder() { + return getPolicyRuleDeviceListFieldBuilder().addBuilder( + policy.Policy.PolicyRuleDevice.getDefaultInstance()); } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public policy.Policy.PolicyRule.Builder addPolicyRuleListBuilder( + public policy.Policy.PolicyRuleDevice.Builder addPolicyRuleDeviceListBuilder( int index) { - return getPolicyRuleListFieldBuilder().addBuilder( - index, policy.Policy.PolicyRule.getDefaultInstance()); + return getPolicyRuleDeviceListFieldBuilder().addBuilder( + index, policy.Policy.PolicyRuleDevice.getDefaultInstance()); } /** - * <code>repeated .policy.PolicyRule policyRuleList = 1;</code> + * <code>repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1;</code> */ - public java.util.List<policy.Policy.PolicyRule.Builder> - getPolicyRuleListBuilderList() { - return getPolicyRuleListFieldBuilder().getBuilderList(); + public java.util.List<policy.Policy.PolicyRuleDevice.Builder> + getPolicyRuleDeviceListBuilderList() { + return getPolicyRuleDeviceListFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRule, policy.Policy.PolicyRule.Builder, policy.Policy.PolicyRuleOrBuilder> - getPolicyRuleListFieldBuilder() { - if (policyRuleListBuilder_ == null) { - policyRuleListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRule, policy.Policy.PolicyRule.Builder, policy.Policy.PolicyRuleOrBuilder>( - policyRuleList_, + policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleDevice.Builder, policy.Policy.PolicyRuleDeviceOrBuilder> + getPolicyRuleDeviceListFieldBuilder() { + if (policyRuleDeviceListBuilder_ == null) { + policyRuleDeviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleDevice.Builder, policy.Policy.PolicyRuleDeviceOrBuilder>( + policyRuleDeviceList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - policyRuleList_ = null; + policyRuleDeviceList_ = null; } - return policyRuleListBuilder_; + return policyRuleDeviceListBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -5906,41 +8439,41 @@ public final class Policy { } - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleList) + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleDeviceList) } - // @@protoc_insertion_point(class_scope:policy.PolicyRuleList) - private static final policy.Policy.PolicyRuleList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:policy.PolicyRuleDeviceList) + private static final policy.Policy.PolicyRuleDeviceList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleList(); + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleDeviceList(); } - public static policy.Policy.PolicyRuleList getDefaultInstance() { + public static policy.Policy.PolicyRuleDeviceList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser<PolicyRuleList> - PARSER = new com.google.protobuf.AbstractParser<PolicyRuleList>() { + private static final com.google.protobuf.Parser<PolicyRuleDeviceList> + PARSER = new com.google.protobuf.AbstractParser<PolicyRuleDeviceList>() { @java.lang.Override - public PolicyRuleList parsePartialFrom( + public PolicyRuleDeviceList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleList(input, extensionRegistry); + return new PolicyRuleDeviceList(input, extensionRegistry); } }; - public static com.google.protobuf.Parser<PolicyRuleList> parser() { + public static com.google.protobuf.Parser<PolicyRuleDeviceList> parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser<PolicyRuleList> getParserForType() { + public com.google.protobuf.Parser<PolicyRuleDeviceList> getParserForType() { return PARSER; } @java.lang.Override - public policy.Policy.PolicyRuleList getDefaultInstanceForType() { + public policy.Policy.PolicyRuleDeviceList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -5957,20 +8490,35 @@ public final class Policy { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleState_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleEvent_descriptor; + internal_static_policy_PolicyRuleBasic_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_PolicyRuleBasic_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_PolicyRuleService_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_PolicyRuleService_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_PolicyRuleDevice_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_PolicyRuleDevice_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_PolicyRuleIdList_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleEvent_fieldAccessorTable; + internal_static_policy_PolicyRuleIdList_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRule_descriptor; + internal_static_policy_PolicyRuleServiceList_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRule_fieldAccessorTable; + internal_static_policy_PolicyRuleServiceList_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleList_descriptor; + internal_static_policy_PolicyRuleDeviceList_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleList_fieldAccessorTable; + internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -5983,35 +8531,49 @@ public final class Policy { "\n\014policy.proto\022\006policy\032\rcontext.proto\032\026p" + "olicy-condition.proto\032\023policy-action.pro" + "to\"+\n\014PolicyRuleId\022\033\n\004uuid\030\001 \001(\0132\r.conte" + - "xt.Uuid\"b\n\017PolicyRuleState\022#\n\014policyRule" + - "Id\030\001 \001(\0132\r.context.Uuid\022*\n\017policyRuleSta" + - "te\030\002 \001(\0162\021.policy.RuleState\"0\n\017PolicyRul" + - "eEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event\"\204\003" + - "\n\nPolicyRule\022*\n\014policyRuleId\030\001 \001(\0132\024.pol" + - "icy.PolicyRuleId\022.\n\016policyRuleType\030\002 \001(\016" + - "2\026.policy.PolicyRuleType\022\020\n\010priority\030\003 \001" + - "(\r\022&\n\005event\030\004 \001(\0132\027.policy.PolicyRuleEve" + - "nt\0222\n\rconditionList\030\005 \003(\0132\033.policy.Polic" + - "yRuleCondition\0220\n\017booleanOperator\030\006 \001(\0162" + - "\027.policy.BooleanOperator\022,\n\nactionList\030\007" + - " \003(\0132\030.policy.PolicyRuleAction\022%\n\tservic" + - "eId\030\010 \001(\0132\022.context.ServiceId\022%\n\ndeviceL" + - "ist\030\t \003(\0132\021.context.DeviceId\"<\n\016PolicyRu" + - "leList\022*\n\016policyRuleList\030\001 \003(\0132\022.policy." + - "PolicyRule*G\n\tRuleState\022\023\n\017POLICY_INACTI" + - "VE\020\000\022\022\n\016POLICY_PLANNED\020\001\022\021\n\rPOLICY_ACTIV" + - "E\020\002*?\n\016PolicyRuleType\022\025\n\021POLICYTYPE_DEVI" + - "CE\020\000\022\026\n\022POLICYTYPE_NETWORK\020\0012\214\003\n\rPolicyS" + - "ervice\022:\n\tPolicyAdd\022\022.policy.PolicyRule\032" + - "\027.policy.PolicyRuleState\"\000\022=\n\014PolicyUpda" + - "te\022\022.policy.PolicyRule\032\027.policy.PolicyRu" + - "leState\"\000\022=\n\014PolicyDelete\022\022.policy.Polic" + - "yRule\032\027.policy.PolicyRuleState\"\000\0227\n\tGetP" + - "olicy\022\024.policy.PolicyRuleId\032\022.policy.Pol" + - "icyRule\"\000\022B\n\023GetPolicyByDeviceId\022\021.conte" + - "xt.DeviceId\032\026.policy.PolicyRuleList\"\000\022D\n" + - "\024GetPolicyByServiceId\022\022.context.ServiceI" + - "d\032\026.policy.PolicyRuleList\"\000b\006proto3" + "xt.Uuid\"=\n\017PolicyRuleState\022*\n\017policyRule" + + "State\030\001 \001(\0162\021.policy.RuleState\"\256\002\n\017Polic" + + "yRuleBasic\022*\n\014policyRuleId\030\001 \001(\0132\024.polic" + + "y.PolicyRuleId\0225\n\017policyRuleState\030\002 \001(\0132" + + "\027.policy.PolicyRuleStateH\000\210\001\001\022\020\n\010priorit" + + "y\030\003 \001(\r\0222\n\rconditionList\030\004 \003(\0132\033.policy." + + "PolicyRuleCondition\0220\n\017booleanOperator\030\005" + + " \001(\0162\027.policy.BooleanOperator\022,\n\nactionL" + + "ist\030\006 \003(\0132\030.policy.PolicyRuleActionB\022\n\020_" + + "policyRuleState\"\223\001\n\021PolicyRuleService\0220\n" + + "\017policyRuleBasic\030\001 \001(\0132\027.policy.PolicyRu" + + "leBasic\022%\n\tserviceId\030\002 \001(\0132\022.context.Ser" + + "viceId\022%\n\ndeviceList\030\003 \003(\0132\021.context.Dev" + + "iceId\"k\n\020PolicyRuleDevice\0220\n\017policyRuleB" + + "asic\030\001 \001(\0132\027.policy.PolicyRuleBasic\022%\n\nd" + + "eviceList\030\002 \003(\0132\021.context.DeviceId\"B\n\020Po" + + "licyRuleIdList\022.\n\020policyRuleIdList\030\001 \003(\013" + + "2\024.policy.PolicyRuleId\"Q\n\025PolicyRuleServ" + + "iceList\0228\n\025policyRuleServiceList\030\001 \003(\0132\031" + + ".policy.PolicyRuleService\"N\n\024PolicyRuleD" + + "eviceList\0226\n\024policyRuleDeviceList\030\001 \003(\0132" + + "\030.policy.PolicyRuleDevice*\365\001\n\tRuleState\022" + + "\024\n\020POLICY_UNDEFINED\020\000\022\021\n\rPOLICY_FAILED\020\001" + + "\022\023\n\017POLICY_INSERTED\020\002\022\024\n\020POLICY_VALIDATE" + + "D\020\003\022\026\n\022POLICY_PROVISIONED\020\004\022\021\n\rPOLICY_AC" + + "TIVE\020\005\022\023\n\017POLICY_ENFORCED\020\006\022\026\n\022POLICY_IN" + + "EFFECTIVE\020\007\022\024\n\020POLICY_EFFECTIVE\020\010\022\022\n\016POL" + + "ICY_UPDATED\020\t\022\022\n\016POLICY_REMOVED\020\n2\323\004\n\rPo" + + "licyService\022H\n\020PolicyAddService\022\031.policy" + + ".PolicyRuleService\032\027.policy.PolicyRuleSt" + + "ate\"\000\022F\n\017PolicyAddDevice\022\030.policy.Policy" + + "RuleDevice\032\027.policy.PolicyRuleState\"\000\022K\n" + + "\023PolicyUpdateService\022\031.policy.PolicyRule" + + "Service\032\027.policy.PolicyRuleState\"\000\022I\n\022Po" + + "licyUpdateDevice\022\030.policy.PolicyRuleDevi" + + "ce\032\027.policy.PolicyRuleState\"\000\022?\n\014PolicyD" + + "elete\022\024.policy.PolicyRuleId\032\027.policy.Pol" + + "icyRuleState\"\000\022E\n\020GetPolicyService\022\024.pol" + + "icy.PolicyRuleId\032\031.policy.PolicyRuleServ" + + "ice\"\000\022C\n\017GetPolicyDevice\022\024.policy.Policy" + + "RuleId\032\030.policy.PolicyRuleDevice\"\000\022K\n\024Ge" + + "tPolicyByServiceId\022\022.context.ServiceId\032\035" + + ".policy.PolicyRuleServiceList\"\000b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -6031,25 +8593,43 @@ public final class Policy { internal_static_policy_PolicyRuleState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_PolicyRuleState_descriptor, - new java.lang.String[] { "PolicyRuleId", "PolicyRuleState", }); - internal_static_policy_PolicyRuleEvent_descriptor = + new java.lang.String[] { "PolicyRuleState", }); + internal_static_policy_PolicyRuleBasic_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_policy_PolicyRuleEvent_fieldAccessorTable = new + internal_static_policy_PolicyRuleBasic_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleEvent_descriptor, - new java.lang.String[] { "Event", }); - internal_static_policy_PolicyRule_descriptor = + internal_static_policy_PolicyRuleBasic_descriptor, + new java.lang.String[] { "PolicyRuleId", "PolicyRuleState", "Priority", "ConditionList", "BooleanOperator", "ActionList", "PolicyRuleState", }); + internal_static_policy_PolicyRuleService_descriptor = getDescriptor().getMessageTypes().get(3); - internal_static_policy_PolicyRule_fieldAccessorTable = new + internal_static_policy_PolicyRuleService_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRule_descriptor, - new java.lang.String[] { "PolicyRuleId", "PolicyRuleType", "Priority", "Event", "ConditionList", "BooleanOperator", "ActionList", "ServiceId", "DeviceList", }); - internal_static_policy_PolicyRuleList_descriptor = + internal_static_policy_PolicyRuleService_descriptor, + new java.lang.String[] { "PolicyRuleBasic", "ServiceId", "DeviceList", }); + internal_static_policy_PolicyRuleDevice_descriptor = getDescriptor().getMessageTypes().get(4); - internal_static_policy_PolicyRuleList_fieldAccessorTable = new + internal_static_policy_PolicyRuleDevice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_PolicyRuleDevice_descriptor, + new java.lang.String[] { "PolicyRuleBasic", "DeviceList", }); + internal_static_policy_PolicyRuleIdList_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_policy_PolicyRuleIdList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_PolicyRuleIdList_descriptor, + new java.lang.String[] { "PolicyRuleIdList", }); + internal_static_policy_PolicyRuleServiceList_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_policy_PolicyRuleServiceList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_PolicyRuleServiceList_descriptor, + new java.lang.String[] { "PolicyRuleServiceList", }); + internal_static_policy_PolicyRuleDeviceList_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleList_descriptor, - new java.lang.String[] { "PolicyRuleList", }); + internal_static_policy_PolicyRuleDeviceList_descriptor, + new java.lang.String[] { "PolicyRuleDeviceList", }); context.ContextOuterClass.getDescriptor(); policy.PolicyCondition.getDescriptor(); policy.PolicyAction.getDescriptor(); diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyService.java b/src/policy/target/generated-sources/grpc/policy/PolicyService.java index 8c2e637f5dcf6b5783dd68900a03a72e58cc6206..277fbbfc5012570bf43a81fbb1da5e3e9211a49e 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyService.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyService.java @@ -8,17 +8,21 @@ comments = "Source: policy.proto") public interface PolicyService extends MutinyService { - io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAdd(policy.Policy.PolicyRule request); + io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddService(policy.Policy.PolicyRuleService request); - io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdate(policy.Policy.PolicyRule request); + io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddDevice(policy.Policy.PolicyRuleDevice request); - io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRule request); + io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateService(policy.Policy.PolicyRuleService request); - io.smallrye.mutiny.Uni<policy.Policy.PolicyRule> getPolicy(policy.Policy.PolicyRuleId request); + io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateDevice(policy.Policy.PolicyRuleDevice request); - io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByDeviceId(context.ContextOuterClass.DeviceId request); + io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRuleId request); - io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request); + io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleService> getPolicyService(policy.Policy.PolicyRuleId request); + + io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleDevice> getPolicyDevice(policy.Policy.PolicyRuleId request); + + io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleServiceList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request); diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyServiceBean.java b/src/policy/target/generated-sources/grpc/policy/PolicyServiceBean.java index 08c0e47d9fbf9b232553fd4ce1a9c7e948f42519..ada3eeaec2f779759a0b6ff7cb5724098fc9c186 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyServiceBean.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyServiceBean.java @@ -16,23 +16,39 @@ public class PolicyServiceBean extends MutinyPolicyServiceGrpc.PolicyServiceImpl } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAdd(policy.Policy.PolicyRule request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddService(policy.Policy.PolicyRuleService request) { try { - return delegate.policyAdd(request); + return delegate.policyAddService(request); } catch (UnsupportedOperationException e) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdate(policy.Policy.PolicyRule request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddDevice(policy.Policy.PolicyRuleDevice request) { try { - return delegate.policyUpdate(request); + return delegate.policyAddDevice(request); } catch (UnsupportedOperationException e) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRule request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateService(policy.Policy.PolicyRuleService request) { + try { + return delegate.policyUpdateService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + @Override + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { + try { + return delegate.policyUpdateDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + @Override + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRuleId request) { try { return delegate.policyDelete(request); } catch (UnsupportedOperationException e) { @@ -40,23 +56,23 @@ public class PolicyServiceBean extends MutinyPolicyServiceGrpc.PolicyServiceImpl } } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRule> getPolicy(policy.Policy.PolicyRuleId request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleService> getPolicyService(policy.Policy.PolicyRuleId request) { try { - return delegate.getPolicy(request); + return delegate.getPolicyService(request); } catch (UnsupportedOperationException e) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByDeviceId(context.ContextOuterClass.DeviceId request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleDevice> getPolicyDevice(policy.Policy.PolicyRuleId request) { try { - return delegate.getPolicyByDeviceId(request); + return delegate.getPolicyDevice(request); } catch (UnsupportedOperationException e) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleServiceList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { try { return delegate.getPolicyByServiceId(request); } catch (UnsupportedOperationException e) { diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyServiceClient.java b/src/policy/target/generated-sources/grpc/policy/PolicyServiceClient.java index 6d447719767146f965aa0f82c72c684d2c0a37bb..5f5af2002955123b646ebba86f013d79326f5b8b 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyServiceClient.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyServiceClient.java @@ -21,27 +21,35 @@ public class PolicyServiceClient implements PolicyService, MutinyClient<MutinyPo } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAdd(policy.Policy.PolicyRule request) { - return stub.policyAdd(request); + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddService(policy.Policy.PolicyRuleService request) { + return stub.policyAddService(request); } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdate(policy.Policy.PolicyRule request) { - return stub.policyUpdate(request); + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyAddDevice(policy.Policy.PolicyRuleDevice request) { + return stub.policyAddDevice(request); } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRule request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateService(policy.Policy.PolicyRuleService request) { + return stub.policyUpdateService(request); + } + @Override + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { + return stub.policyUpdateDevice(request); + } + @Override + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleState> policyDelete(policy.Policy.PolicyRuleId request) { return stub.policyDelete(request); } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRule> getPolicy(policy.Policy.PolicyRuleId request) { - return stub.getPolicy(request); + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleService> getPolicyService(policy.Policy.PolicyRuleId request) { + return stub.getPolicyService(request); } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByDeviceId(context.ContextOuterClass.DeviceId request) { - return stub.getPolicyByDeviceId(request); + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleDevice> getPolicyDevice(policy.Policy.PolicyRuleId request) { + return stub.getPolicyDevice(request); } @Override - public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { + public io.smallrye.mutiny.Uni<policy.Policy.PolicyRuleServiceList> getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { return stub.getPolicyByServiceId(request); } diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java b/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java index 76cba32684b0d766bfc9ed58dc6f93cd239d4431..af57ac56746c2d1943a455a53b9ce6fc02228692 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java @@ -14,89 +14,151 @@ public final class PolicyServiceGrpc { public static final String SERVICE_NAME = "policy.PolicyService"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRule, - policy.Policy.PolicyRuleState> getPolicyAddMethod; + private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRuleService, + policy.Policy.PolicyRuleState> getPolicyAddServiceMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PolicyAdd", - requestType = policy.Policy.PolicyRule.class, + fullMethodName = SERVICE_NAME + '/' + "PolicyAddService", + requestType = policy.Policy.PolicyRuleService.class, responseType = policy.Policy.PolicyRuleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor<policy.Policy.PolicyRule, - policy.Policy.PolicyRuleState> getPolicyAddMethod() { - io.grpc.MethodDescriptor<policy.Policy.PolicyRule, policy.Policy.PolicyRuleState> getPolicyAddMethod; - if ((getPolicyAddMethod = PolicyServiceGrpc.getPolicyAddMethod) == null) { + public static io.grpc.MethodDescriptor<policy.Policy.PolicyRuleService, + policy.Policy.PolicyRuleState> getPolicyAddServiceMethod() { + io.grpc.MethodDescriptor<policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState> getPolicyAddServiceMethod; + if ((getPolicyAddServiceMethod = PolicyServiceGrpc.getPolicyAddServiceMethod) == null) { synchronized (PolicyServiceGrpc.class) { - if ((getPolicyAddMethod = PolicyServiceGrpc.getPolicyAddMethod) == null) { - PolicyServiceGrpc.getPolicyAddMethod = getPolicyAddMethod = - io.grpc.MethodDescriptor.<policy.Policy.PolicyRule, policy.Policy.PolicyRuleState>newBuilder() + if ((getPolicyAddServiceMethod = PolicyServiceGrpc.getPolicyAddServiceMethod) == null) { + PolicyServiceGrpc.getPolicyAddServiceMethod = getPolicyAddServiceMethod = + io.grpc.MethodDescriptor.<policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyAdd")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyAddService")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRule.getDefaultInstance())) + policy.Policy.PolicyRuleService.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( policy.Policy.PolicyRuleState.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyAdd")) + .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyAddService")) .build(); } } } - return getPolicyAddMethod; + return getPolicyAddServiceMethod; } - private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRule, - policy.Policy.PolicyRuleState> getPolicyUpdateMethod; + private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRuleDevice, + policy.Policy.PolicyRuleState> getPolicyAddDeviceMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PolicyUpdate", - requestType = policy.Policy.PolicyRule.class, + fullMethodName = SERVICE_NAME + '/' + "PolicyAddDevice", + requestType = policy.Policy.PolicyRuleDevice.class, responseType = policy.Policy.PolicyRuleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor<policy.Policy.PolicyRule, - policy.Policy.PolicyRuleState> getPolicyUpdateMethod() { - io.grpc.MethodDescriptor<policy.Policy.PolicyRule, policy.Policy.PolicyRuleState> getPolicyUpdateMethod; - if ((getPolicyUpdateMethod = PolicyServiceGrpc.getPolicyUpdateMethod) == null) { + public static io.grpc.MethodDescriptor<policy.Policy.PolicyRuleDevice, + policy.Policy.PolicyRuleState> getPolicyAddDeviceMethod() { + io.grpc.MethodDescriptor<policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState> getPolicyAddDeviceMethod; + if ((getPolicyAddDeviceMethod = PolicyServiceGrpc.getPolicyAddDeviceMethod) == null) { synchronized (PolicyServiceGrpc.class) { - if ((getPolicyUpdateMethod = PolicyServiceGrpc.getPolicyUpdateMethod) == null) { - PolicyServiceGrpc.getPolicyUpdateMethod = getPolicyUpdateMethod = - io.grpc.MethodDescriptor.<policy.Policy.PolicyRule, policy.Policy.PolicyRuleState>newBuilder() + if ((getPolicyAddDeviceMethod = PolicyServiceGrpc.getPolicyAddDeviceMethod) == null) { + PolicyServiceGrpc.getPolicyAddDeviceMethod = getPolicyAddDeviceMethod = + io.grpc.MethodDescriptor.<policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyUpdate")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyAddDevice")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRule.getDefaultInstance())) + policy.Policy.PolicyRuleDevice.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( policy.Policy.PolicyRuleState.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyUpdate")) + .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyAddDevice")) .build(); } } } - return getPolicyUpdateMethod; + return getPolicyAddDeviceMethod; } - private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRule, + private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRuleService, + policy.Policy.PolicyRuleState> getPolicyUpdateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PolicyUpdateService", + requestType = policy.Policy.PolicyRuleService.class, + responseType = policy.Policy.PolicyRuleState.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor<policy.Policy.PolicyRuleService, + policy.Policy.PolicyRuleState> getPolicyUpdateServiceMethod() { + io.grpc.MethodDescriptor<policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState> getPolicyUpdateServiceMethod; + if ((getPolicyUpdateServiceMethod = PolicyServiceGrpc.getPolicyUpdateServiceMethod) == null) { + synchronized (PolicyServiceGrpc.class) { + if ((getPolicyUpdateServiceMethod = PolicyServiceGrpc.getPolicyUpdateServiceMethod) == null) { + PolicyServiceGrpc.getPolicyUpdateServiceMethod = getPolicyUpdateServiceMethod = + io.grpc.MethodDescriptor.<policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState>newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyUpdateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + policy.Policy.PolicyRuleService.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + policy.Policy.PolicyRuleState.getDefaultInstance())) + .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyUpdateService")) + .build(); + } + } + } + return getPolicyUpdateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRuleDevice, + policy.Policy.PolicyRuleState> getPolicyUpdateDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PolicyUpdateDevice", + requestType = policy.Policy.PolicyRuleDevice.class, + responseType = policy.Policy.PolicyRuleState.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor<policy.Policy.PolicyRuleDevice, + policy.Policy.PolicyRuleState> getPolicyUpdateDeviceMethod() { + io.grpc.MethodDescriptor<policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState> getPolicyUpdateDeviceMethod; + if ((getPolicyUpdateDeviceMethod = PolicyServiceGrpc.getPolicyUpdateDeviceMethod) == null) { + synchronized (PolicyServiceGrpc.class) { + if ((getPolicyUpdateDeviceMethod = PolicyServiceGrpc.getPolicyUpdateDeviceMethod) == null) { + PolicyServiceGrpc.getPolicyUpdateDeviceMethod = getPolicyUpdateDeviceMethod = + io.grpc.MethodDescriptor.<policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState>newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyUpdateDevice")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + policy.Policy.PolicyRuleDevice.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + policy.Policy.PolicyRuleState.getDefaultInstance())) + .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyUpdateDevice")) + .build(); + } + } + } + return getPolicyUpdateDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleState> getPolicyDeleteMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "PolicyDelete", - requestType = policy.Policy.PolicyRule.class, + requestType = policy.Policy.PolicyRuleId.class, responseType = policy.Policy.PolicyRuleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor<policy.Policy.PolicyRule, + public static io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleState> getPolicyDeleteMethod() { - io.grpc.MethodDescriptor<policy.Policy.PolicyRule, policy.Policy.PolicyRuleState> getPolicyDeleteMethod; + io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleState> getPolicyDeleteMethod; if ((getPolicyDeleteMethod = PolicyServiceGrpc.getPolicyDeleteMethod) == null) { synchronized (PolicyServiceGrpc.class) { if ((getPolicyDeleteMethod = PolicyServiceGrpc.getPolicyDeleteMethod) == null) { PolicyServiceGrpc.getPolicyDeleteMethod = getPolicyDeleteMethod = - io.grpc.MethodDescriptor.<policy.Policy.PolicyRule, policy.Policy.PolicyRuleState>newBuilder() + io.grpc.MethodDescriptor.<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleState>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyDelete")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRule.getDefaultInstance())) + policy.Policy.PolicyRuleId.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( policy.Policy.PolicyRuleState.getDefaultInstance())) .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyDelete")) @@ -108,90 +170,90 @@ public final class PolicyServiceGrpc { } private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, - policy.Policy.PolicyRule> getGetPolicyMethod; + policy.Policy.PolicyRuleService> getGetPolicyServiceMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicy", + fullMethodName = SERVICE_NAME + '/' + "GetPolicyService", requestType = policy.Policy.PolicyRuleId.class, - responseType = policy.Policy.PolicyRule.class, + responseType = policy.Policy.PolicyRuleService.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, - policy.Policy.PolicyRule> getGetPolicyMethod() { - io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, policy.Policy.PolicyRule> getGetPolicyMethod; - if ((getGetPolicyMethod = PolicyServiceGrpc.getGetPolicyMethod) == null) { + policy.Policy.PolicyRuleService> getGetPolicyServiceMethod() { + io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleService> getGetPolicyServiceMethod; + if ((getGetPolicyServiceMethod = PolicyServiceGrpc.getGetPolicyServiceMethod) == null) { synchronized (PolicyServiceGrpc.class) { - if ((getGetPolicyMethod = PolicyServiceGrpc.getGetPolicyMethod) == null) { - PolicyServiceGrpc.getGetPolicyMethod = getGetPolicyMethod = - io.grpc.MethodDescriptor.<policy.Policy.PolicyRuleId, policy.Policy.PolicyRule>newBuilder() + if ((getGetPolicyServiceMethod = PolicyServiceGrpc.getGetPolicyServiceMethod) == null) { + PolicyServiceGrpc.getGetPolicyServiceMethod = getGetPolicyServiceMethod = + io.grpc.MethodDescriptor.<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleService>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicy")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyService")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( policy.Policy.PolicyRuleId.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRule.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicy")) + policy.Policy.PolicyRuleService.getDefaultInstance())) + .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyService")) .build(); } } } - return getGetPolicyMethod; + return getGetPolicyServiceMethod; } - private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.DeviceId, - policy.Policy.PolicyRuleList> getGetPolicyByDeviceIdMethod; + private static volatile io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, + policy.Policy.PolicyRuleDevice> getGetPolicyDeviceMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicyByDeviceId", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = policy.Policy.PolicyRuleList.class, + fullMethodName = SERVICE_NAME + '/' + "GetPolicyDevice", + requestType = policy.Policy.PolicyRuleId.class, + responseType = policy.Policy.PolicyRuleDevice.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor<context.ContextOuterClass.DeviceId, - policy.Policy.PolicyRuleList> getGetPolicyByDeviceIdMethod() { - io.grpc.MethodDescriptor<context.ContextOuterClass.DeviceId, policy.Policy.PolicyRuleList> getGetPolicyByDeviceIdMethod; - if ((getGetPolicyByDeviceIdMethod = PolicyServiceGrpc.getGetPolicyByDeviceIdMethod) == null) { + public static io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, + policy.Policy.PolicyRuleDevice> getGetPolicyDeviceMethod() { + io.grpc.MethodDescriptor<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleDevice> getGetPolicyDeviceMethod; + if ((getGetPolicyDeviceMethod = PolicyServiceGrpc.getGetPolicyDeviceMethod) == null) { synchronized (PolicyServiceGrpc.class) { - if ((getGetPolicyByDeviceIdMethod = PolicyServiceGrpc.getGetPolicyByDeviceIdMethod) == null) { - PolicyServiceGrpc.getGetPolicyByDeviceIdMethod = getGetPolicyByDeviceIdMethod = - io.grpc.MethodDescriptor.<context.ContextOuterClass.DeviceId, policy.Policy.PolicyRuleList>newBuilder() + if ((getGetPolicyDeviceMethod = PolicyServiceGrpc.getGetPolicyDeviceMethod) == null) { + PolicyServiceGrpc.getGetPolicyDeviceMethod = getGetPolicyDeviceMethod = + io.grpc.MethodDescriptor.<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleDevice>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyByDeviceId")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyDevice")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) + policy.Policy.PolicyRuleId.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleList.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyByDeviceId")) + policy.Policy.PolicyRuleDevice.getDefaultInstance())) + .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyDevice")) .build(); } } } - return getGetPolicyByDeviceIdMethod; + return getGetPolicyDeviceMethod; } private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.ServiceId, - policy.Policy.PolicyRuleList> getGetPolicyByServiceIdMethod; + policy.Policy.PolicyRuleServiceList> getGetPolicyByServiceIdMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetPolicyByServiceId", requestType = context.ContextOuterClass.ServiceId.class, - responseType = policy.Policy.PolicyRuleList.class, + responseType = policy.Policy.PolicyRuleServiceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<context.ContextOuterClass.ServiceId, - policy.Policy.PolicyRuleList> getGetPolicyByServiceIdMethod() { - io.grpc.MethodDescriptor<context.ContextOuterClass.ServiceId, policy.Policy.PolicyRuleList> getGetPolicyByServiceIdMethod; + policy.Policy.PolicyRuleServiceList> getGetPolicyByServiceIdMethod() { + io.grpc.MethodDescriptor<context.ContextOuterClass.ServiceId, policy.Policy.PolicyRuleServiceList> getGetPolicyByServiceIdMethod; if ((getGetPolicyByServiceIdMethod = PolicyServiceGrpc.getGetPolicyByServiceIdMethod) == null) { synchronized (PolicyServiceGrpc.class) { if ((getGetPolicyByServiceIdMethod = PolicyServiceGrpc.getGetPolicyByServiceIdMethod) == null) { PolicyServiceGrpc.getGetPolicyByServiceIdMethod = getGetPolicyByServiceIdMethod = - io.grpc.MethodDescriptor.<context.ContextOuterClass.ServiceId, policy.Policy.PolicyRuleList>newBuilder() + io.grpc.MethodDescriptor.<context.ContextOuterClass.ServiceId, policy.Policy.PolicyRuleServiceList>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyByServiceId")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( context.ContextOuterClass.ServiceId.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleList.getDefaultInstance())) + policy.Policy.PolicyRuleServiceList.getDefaultInstance())) .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyByServiceId")) .build(); } @@ -250,89 +312,117 @@ public final class PolicyServiceGrpc { /** */ - public void policyAdd(policy.Policy.PolicyRule request, + public void policyAddService(policy.Policy.PolicyRuleService request, + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyAddServiceMethod(), responseObserver); + } + + /** + */ + public void policyAddDevice(policy.Policy.PolicyRuleDevice request, + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyAddDeviceMethod(), responseObserver); + } + + /** + */ + public void policyUpdateService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyAddMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyUpdateServiceMethod(), responseObserver); } /** */ - public void policyUpdate(policy.Policy.PolicyRule request, + public void policyUpdateDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyUpdateMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyUpdateDeviceMethod(), responseObserver); } /** */ - public void policyDelete(policy.Policy.PolicyRule request, + public void policyDelete(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyDeleteMethod(), responseObserver); } /** */ - public void getPolicy(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver<policy.Policy.PolicyRule> responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyMethod(), responseObserver); + public void getPolicyService(policy.Policy.PolicyRuleId request, + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleService> responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyServiceMethod(), responseObserver); } /** */ - public void getPolicyByDeviceId(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList> responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyByDeviceIdMethod(), responseObserver); + public void getPolicyDevice(policy.Policy.PolicyRuleId request, + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleDevice> responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyDeviceMethod(), responseObserver); } /** */ public void getPolicyByServiceId(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList> responseObserver) { + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleServiceList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyByServiceIdMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getPolicyAddMethod(), + getPolicyAddServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - policy.Policy.PolicyRule, + policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState>( - this, METHODID_POLICY_ADD))) + this, METHODID_POLICY_ADD_SERVICE))) .addMethod( - getPolicyUpdateMethod(), + getPolicyAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - policy.Policy.PolicyRule, + policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState>( - this, METHODID_POLICY_UPDATE))) + this, METHODID_POLICY_ADD_DEVICE))) + .addMethod( + getPolicyUpdateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + policy.Policy.PolicyRuleService, + policy.Policy.PolicyRuleState>( + this, METHODID_POLICY_UPDATE_SERVICE))) + .addMethod( + getPolicyUpdateDeviceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + policy.Policy.PolicyRuleDevice, + policy.Policy.PolicyRuleState>( + this, METHODID_POLICY_UPDATE_DEVICE))) .addMethod( getPolicyDeleteMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - policy.Policy.PolicyRule, + policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleState>( this, METHODID_POLICY_DELETE))) .addMethod( - getGetPolicyMethod(), + getGetPolicyServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< policy.Policy.PolicyRuleId, - policy.Policy.PolicyRule>( - this, METHODID_GET_POLICY))) + policy.Policy.PolicyRuleService>( + this, METHODID_GET_POLICY_SERVICE))) .addMethod( - getGetPolicyByDeviceIdMethod(), + getGetPolicyDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - context.ContextOuterClass.DeviceId, - policy.Policy.PolicyRuleList>( - this, METHODID_GET_POLICY_BY_DEVICE_ID))) + policy.Policy.PolicyRuleId, + policy.Policy.PolicyRuleDevice>( + this, METHODID_GET_POLICY_DEVICE))) .addMethod( getGetPolicyByServiceIdMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.ServiceId, - policy.Policy.PolicyRuleList>( + policy.Policy.PolicyRuleServiceList>( this, METHODID_GET_POLICY_BY_SERVICE_ID))) .build(); } @@ -354,23 +444,39 @@ public final class PolicyServiceGrpc { /** */ - public void policyAdd(policy.Policy.PolicyRule request, + public void policyAddService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPolicyAddMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getPolicyAddServiceMethod(), getCallOptions()), request, responseObserver); } /** */ - public void policyUpdate(policy.Policy.PolicyRule request, + public void policyAddDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPolicyUpdateMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getPolicyAddDeviceMethod(), getCallOptions()), request, responseObserver); } /** */ - public void policyDelete(policy.Policy.PolicyRule request, + public void policyUpdateService(policy.Policy.PolicyRuleService request, + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPolicyUpdateServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void policyUpdateDevice(policy.Policy.PolicyRuleDevice request, + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPolicyUpdateDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void policyDelete(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPolicyDeleteMethod(), getCallOptions()), request, responseObserver); @@ -378,24 +484,24 @@ public final class PolicyServiceGrpc { /** */ - public void getPolicy(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver<policy.Policy.PolicyRule> responseObserver) { + public void getPolicyService(policy.Policy.PolicyRuleId request, + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleService> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getGetPolicyServiceMethod(), getCallOptions()), request, responseObserver); } /** */ - public void getPolicyByDeviceId(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList> responseObserver) { + public void getPolicyDevice(policy.Policy.PolicyRuleId request, + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleDevice> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyByDeviceIdMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getGetPolicyDeviceMethod(), getCallOptions()), request, responseObserver); } /** */ public void getPolicyByServiceId(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList> responseObserver) { + io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleServiceList> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetPolicyByServiceIdMethod(), getCallOptions()), request, responseObserver); } @@ -417,42 +523,56 @@ public final class PolicyServiceGrpc { /** */ - public policy.Policy.PolicyRuleState policyAdd(policy.Policy.PolicyRule request) { + public policy.Policy.PolicyRuleState policyAddService(policy.Policy.PolicyRuleService request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPolicyAddMethod(), getCallOptions(), request); + getChannel(), getPolicyAddServiceMethod(), getCallOptions(), request); } /** */ - public policy.Policy.PolicyRuleState policyUpdate(policy.Policy.PolicyRule request) { + public policy.Policy.PolicyRuleState policyAddDevice(policy.Policy.PolicyRuleDevice request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPolicyUpdateMethod(), getCallOptions(), request); + getChannel(), getPolicyAddDeviceMethod(), getCallOptions(), request); } /** */ - public policy.Policy.PolicyRuleState policyDelete(policy.Policy.PolicyRule request) { + public policy.Policy.PolicyRuleState policyUpdateService(policy.Policy.PolicyRuleService request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPolicyUpdateServiceMethod(), getCallOptions(), request); + } + + /** + */ + public policy.Policy.PolicyRuleState policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPolicyUpdateDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public policy.Policy.PolicyRuleState policyDelete(policy.Policy.PolicyRuleId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPolicyDeleteMethod(), getCallOptions(), request); } /** */ - public policy.Policy.PolicyRule getPolicy(policy.Policy.PolicyRuleId request) { + public policy.Policy.PolicyRuleService getPolicyService(policy.Policy.PolicyRuleId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyMethod(), getCallOptions(), request); + getChannel(), getGetPolicyServiceMethod(), getCallOptions(), request); } /** */ - public policy.Policy.PolicyRuleList getPolicyByDeviceId(context.ContextOuterClass.DeviceId request) { + public policy.Policy.PolicyRuleDevice getPolicyDevice(policy.Policy.PolicyRuleId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyByDeviceIdMethod(), getCallOptions(), request); + getChannel(), getGetPolicyDeviceMethod(), getCallOptions(), request); } /** */ - public policy.Policy.PolicyRuleList getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { + public policy.Policy.PolicyRuleServiceList getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetPolicyByServiceIdMethod(), getCallOptions(), request); } @@ -474,59 +594,77 @@ public final class PolicyServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleState> policyAdd( - policy.Policy.PolicyRule request) { + public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleState> policyAddService( + policy.Policy.PolicyRuleService request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPolicyAddServiceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleState> policyAddDevice( + policy.Policy.PolicyRuleDevice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPolicyAddDeviceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleState> policyUpdateService( + policy.Policy.PolicyRuleService request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPolicyAddMethod(), getCallOptions()), request); + getChannel().newCall(getPolicyUpdateServiceMethod(), getCallOptions()), request); } /** */ - public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleState> policyUpdate( - policy.Policy.PolicyRule request) { + public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleState> policyUpdateDevice( + policy.Policy.PolicyRuleDevice request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPolicyUpdateMethod(), getCallOptions()), request); + getChannel().newCall(getPolicyUpdateDeviceMethod(), getCallOptions()), request); } /** */ public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleState> policyDelete( - policy.Policy.PolicyRule request) { + policy.Policy.PolicyRuleId request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPolicyDeleteMethod(), getCallOptions()), request); } /** */ - public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRule> getPolicy( + public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleService> getPolicyService( policy.Policy.PolicyRuleId request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request); + getChannel().newCall(getGetPolicyServiceMethod(), getCallOptions()), request); } /** */ - public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleList> getPolicyByDeviceId( - context.ContextOuterClass.DeviceId request) { + public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleDevice> getPolicyDevice( + policy.Policy.PolicyRuleId request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyByDeviceIdMethod(), getCallOptions()), request); + getChannel().newCall(getGetPolicyDeviceMethod(), getCallOptions()), request); } /** */ - public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleList> getPolicyByServiceId( + public com.google.common.util.concurrent.ListenableFuture<policy.Policy.PolicyRuleServiceList> getPolicyByServiceId( context.ContextOuterClass.ServiceId request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetPolicyByServiceIdMethod(), getCallOptions()), request); } } - private static final int METHODID_POLICY_ADD = 0; - private static final int METHODID_POLICY_UPDATE = 1; - private static final int METHODID_POLICY_DELETE = 2; - private static final int METHODID_GET_POLICY = 3; - private static final int METHODID_GET_POLICY_BY_DEVICE_ID = 4; - private static final int METHODID_GET_POLICY_BY_SERVICE_ID = 5; + private static final int METHODID_POLICY_ADD_SERVICE = 0; + private static final int METHODID_POLICY_ADD_DEVICE = 1; + private static final int METHODID_POLICY_UPDATE_SERVICE = 2; + private static final int METHODID_POLICY_UPDATE_DEVICE = 3; + private static final int METHODID_POLICY_DELETE = 4; + private static final int METHODID_GET_POLICY_SERVICE = 5; + private static final int METHODID_GET_POLICY_DEVICE = 6; + private static final int METHODID_GET_POLICY_BY_SERVICE_ID = 7; private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, @@ -545,29 +683,37 @@ public final class PolicyServiceGrpc { @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { - case METHODID_POLICY_ADD: - serviceImpl.policyAdd((policy.Policy.PolicyRule) request, + case METHODID_POLICY_ADD_SERVICE: + serviceImpl.policyAddService((policy.Policy.PolicyRuleService) request, + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver); + break; + case METHODID_POLICY_ADD_DEVICE: + serviceImpl.policyAddDevice((policy.Policy.PolicyRuleDevice) request, + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver); + break; + case METHODID_POLICY_UPDATE_SERVICE: + serviceImpl.policyUpdateService((policy.Policy.PolicyRuleService) request, (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver); break; - case METHODID_POLICY_UPDATE: - serviceImpl.policyUpdate((policy.Policy.PolicyRule) request, + case METHODID_POLICY_UPDATE_DEVICE: + serviceImpl.policyUpdateDevice((policy.Policy.PolicyRuleDevice) request, (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver); break; case METHODID_POLICY_DELETE: - serviceImpl.policyDelete((policy.Policy.PolicyRule) request, + serviceImpl.policyDelete((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState>) responseObserver); break; - case METHODID_GET_POLICY: - serviceImpl.getPolicy((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver<policy.Policy.PolicyRule>) responseObserver); + case METHODID_GET_POLICY_SERVICE: + serviceImpl.getPolicyService((policy.Policy.PolicyRuleId) request, + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleService>) responseObserver); break; - case METHODID_GET_POLICY_BY_DEVICE_ID: - serviceImpl.getPolicyByDeviceId((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList>) responseObserver); + case METHODID_GET_POLICY_DEVICE: + serviceImpl.getPolicyDevice((policy.Policy.PolicyRuleId) request, + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleDevice>) responseObserver); break; case METHODID_GET_POLICY_BY_SERVICE_ID: serviceImpl.getPolicyByServiceId((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList>) responseObserver); + (io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleServiceList>) responseObserver); break; default: throw new AssertionError(); @@ -630,11 +776,13 @@ public final class PolicyServiceGrpc { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new PolicyServiceFileDescriptorSupplier()) - .addMethod(getPolicyAddMethod()) - .addMethod(getPolicyUpdateMethod()) + .addMethod(getPolicyAddServiceMethod()) + .addMethod(getPolicyAddDeviceMethod()) + .addMethod(getPolicyUpdateServiceMethod()) + .addMethod(getPolicyUpdateDeviceMethod()) .addMethod(getPolicyDeleteMethod()) - .addMethod(getGetPolicyMethod()) - .addMethod(getGetPolicyByDeviceIdMethod()) + .addMethod(getGetPolicyServiceMethod()) + .addMethod(getGetPolicyDeviceMethod()) .addMethod(getGetPolicyByServiceIdMethod()) .build(); } diff --git a/src/policy/target/kubernetes/kubernetes.yml b/src/policy/target/kubernetes/kubernetes.yml index 462e59696da4ce667471d6979824a148b3f96b7a..f63ffbc0972cb7cac17346956488a52f4e694e08 100644 --- a/src/policy/target/kubernetes/kubernetes.yml +++ b/src/policy/target/kubernetes/kubernetes.yml @@ -3,8 +3,8 @@ apiVersion: v1 kind: Service metadata: annotations: - app.quarkus.io/commit-id: 2aa29b383ec7bf12dc985729978210239ea8a726 - app.quarkus.io/build-timestamp: 2022-07-07 - 10:19:44 +0000 + app.quarkus.io/commit-id: fa8ec6157a3cde9fcea029558241850993a6ab5a + app.quarkus.io/build-timestamp: 2022-07-11 - 13:58:36 +0000 labels: app.kubernetes.io/name: policyservice app: policyservice @@ -25,8 +25,8 @@ apiVersion: apps/v1 kind: Deployment metadata: annotations: - app.quarkus.io/commit-id: 2aa29b383ec7bf12dc985729978210239ea8a726 - app.quarkus.io/build-timestamp: 2022-07-07 - 10:19:44 +0000 + app.quarkus.io/commit-id: fa8ec6157a3cde9fcea029558241850993a6ab5a + app.quarkus.io/build-timestamp: 2022-07-11 - 13:58:36 +0000 labels: app: policyservice app.kubernetes.io/name: policyservice @@ -39,8 +39,8 @@ spec: template: metadata: annotations: - app.quarkus.io/commit-id: 2aa29b383ec7bf12dc985729978210239ea8a726 - app.quarkus.io/build-timestamp: 2022-07-07 - 10:19:44 +0000 + app.quarkus.io/commit-id: fa8ec6157a3cde9fcea029558241850993a6ab5a + app.quarkus.io/build-timestamp: 2022-07-11 - 13:58:36 +0000 labels: app: policyservice app.kubernetes.io/name: policyservice @@ -51,12 +51,12 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: MONITORING_SERVICE_HOST - value: monitoringservice - name: SERVICE_SERVICE_HOST value: serviceservice - name: CONTEXT_SERVICE_HOST value: contextservice + - name: MONITORING_SERVICE_HOST + value: monitoringservice image: registry.gitlab.com/teraflow-h2020/controller/policy:0.1.0 imagePullPolicy: Always livenessProbe: