From: Basheeruddin Ahmed Date: Wed, 9 Jul 2014 19:41:38 +0000 (-0700) Subject: Changed RegisterChangeListener and RegisterChangeListenerReply X-Git-Tag: release/helium~407 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=321d959d82bf14a6826e5bf42419c1a1460a1cbc Changed RegisterChangeListener and RegisterChangeListenerReply in distributed datastore to be based on protocol buffer ListenerRegistrationMessages Change-Id: Ia1e427ca4d60336bb1cbf774c19fada4a1d0aed1 Signed-off-by: Basheeruddin Ahmed --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java index 10bcd30105..3c12fa6e86 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java @@ -79,11 +79,11 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, Au Object result = actorContext.executeShardOperation(Shard.DEFAULT_NAME, new RegisterChangeListener(path, dataChangeListenerActor.path(), - AsyncDataBroker.DataChangeScope.BASE), + AsyncDataBroker.DataChangeScope.BASE).toSerializable(), ActorContext.ASK_DURATION ); - RegisterChangeListenerReply reply = (RegisterChangeListenerReply) result; + RegisterChangeListenerReply reply = RegisterChangeListenerReply.fromSerializable(actorContext.getActorSystem(),result); return new DataChangeListenerRegistrationProxy(actorContext.actorSelection(reply.getListenerRegistrationPath()), listener, dataChangeListenerActor); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java index 5cc14e67e7..9e40a69907 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java @@ -105,8 +105,8 @@ public class Shard extends UntypedProcessor { if (message instanceof CreateTransactionChain) { createTransactionChain(); - } else if (message instanceof RegisterChangeListener) { - registerChangeListener((RegisterChangeListener) message); + } else if (message.getClass().equals(RegisterChangeListener.SERIALIZABLE_CLASS)) { + registerChangeListener(RegisterChangeListener.fromSerializable(getContext().system(), message)); } else if (message instanceof UpdateSchemaContext) { updateSchemaContext((UpdateSchemaContext) message); } else if (message instanceof ForwardedCommitTransaction) { @@ -117,6 +117,8 @@ public class Shard extends UntypedProcessor { createTransaction((CreateTransaction) message); } else if(message instanceof NonPersistent){ commit(((NonPersistent)message).payload()); + } else { + throw new Exception("Not recognized message in Shard::OnReceive"+message); } } @@ -192,7 +194,7 @@ public class Shard extends UntypedProcessor { getContext().actorOf( DataChangeListenerRegistration.props(registration)); getSender() - .tell(new RegisterChangeListenerReply(listenerRegistration.path()), + .tell(new RegisterChangeListenerReply(listenerRegistration.path()).toSerializable(), getSelf()); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/RegisterChangeListener.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/RegisterChangeListener.java index 9363a20ca6..db8a08f11a 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/RegisterChangeListener.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/RegisterChangeListener.java @@ -9,11 +9,14 @@ package org.opendaylight.controller.cluster.datastore.messages; import akka.actor.ActorPath; +import akka.actor.ActorSystem; +import org.opendaylight.controller.cluster.datastore.utils.InstanceIdentifierUtils; import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker; +import org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages; import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; public class RegisterChangeListener implements SerializableMessage { - + public static final Class SERIALIZABLE_CLASS = ListenerRegistrationMessages.RegisterChangeListener.class; private final InstanceIdentifier path; private final ActorPath dataChangeListenerPath; private final AsyncDataBroker.DataChangeScope scope; @@ -41,7 +44,20 @@ public class RegisterChangeListener implements SerializableMessage { } - @Override public Object toSerializable() { - throw new UnsupportedOperationException("foo"); + @Override + public ListenerRegistrationMessages.RegisterChangeListener toSerializable() { + return ListenerRegistrationMessages.RegisterChangeListener.newBuilder() + .setInstanceIdentifierPath(path.toString()) + .setDataChangeListenerActorPath(dataChangeListenerPath.toString()) + .setDataChangeScope(scope.ordinal()).build(); } + + public static RegisterChangeListener fromSerializable(ActorSystem actorSystem,Object serializable){ + ListenerRegistrationMessages.RegisterChangeListener o = (ListenerRegistrationMessages.RegisterChangeListener) serializable; + return new RegisterChangeListener(InstanceIdentifierUtils.from(o.getInstanceIdentifierPath()), + actorSystem.actorFor(o.getDataChangeListenerActorPath()).path(), + AsyncDataBroker.DataChangeScope.values()[o.getDataChangeScope()]); + } + + } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/RegisterChangeListenerReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/RegisterChangeListenerReply.java index ae8bbbd75a..8d980d283d 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/RegisterChangeListenerReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/RegisterChangeListenerReply.java @@ -9,8 +9,11 @@ package org.opendaylight.controller.cluster.datastore.messages; import akka.actor.ActorPath; +import akka.actor.ActorSystem; +import org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages; -public class RegisterChangeListenerReply { +public class RegisterChangeListenerReply implements SerializableMessage{ + public static final Class SERIALIZABLE_CLASS = ListenerRegistrationMessages.RegisterChangeListenerReply.class; private final ActorPath listenerRegistrationPath; public RegisterChangeListenerReply(ActorPath listenerRegistrationPath) { @@ -20,4 +23,17 @@ public class RegisterChangeListenerReply { public ActorPath getListenerRegistrationPath() { return listenerRegistrationPath; } + + @Override + public ListenerRegistrationMessages.RegisterChangeListenerReply toSerializable() { + return ListenerRegistrationMessages.RegisterChangeListenerReply.newBuilder() + .setListenerRegistrationPath(listenerRegistrationPath.toString()).build(); + } + + public static RegisterChangeListenerReply fromSerializable(ActorSystem actorSystem,Object serializable){ + ListenerRegistrationMessages.RegisterChangeListenerReply o = (ListenerRegistrationMessages.RegisterChangeListenerReply) serializable; + return new RegisterChangeListenerReply( + actorSystem.actorFor(o.getListenerRegistrationPath()).path() + ); + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreTest.java index da9fb6896e..1c9e337f75 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreTest.java @@ -53,7 +53,7 @@ public class DistributedDataStoreTest extends AbstractActorTest{ @org.junit.Test public void testRegisterChangeListener() throws Exception { - mockActorContext.setExecuteShardOperationResponse(new RegisterChangeListenerReply(doNothingActorRef.path())); + mockActorContext.setExecuteShardOperationResponse(new RegisterChangeListenerReply(doNothingActorRef.path()).toSerializable()); ListenerRegistration registration = distributedDataStore.registerChangeListener(TestModel.TEST_PATH, new AsyncDataChangeListener>() { @Override diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java index 2b1d892db0..d1eabb0eea 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java @@ -75,15 +75,15 @@ public class ShardTest extends AbstractActorTest { getRef()); subject.tell(new RegisterChangeListener(TestModel.TEST_PATH, - getRef().path(), AsyncDataBroker.DataChangeScope.BASE), + getRef().path(), AsyncDataBroker.DataChangeScope.BASE).toSerializable(), getRef()); final String out = new ExpectMsg("match hint") { // do not put code outside this method, will run afterwards protected String match(Object in) { - if (in instanceof RegisterChangeListenerReply) { + if (in.getClass().equals(RegisterChangeListenerReply.SERIALIZABLE_CLASS)) { RegisterChangeListenerReply reply = - (RegisterChangeListenerReply) in; + RegisterChangeListenerReply.fromSerializable(getSystem(),in); return reply.getListenerRegistrationPath() .toString(); } else { diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/persistent/PersistentMessages.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/persistent/PersistentMessages.java index a48e0ab6da..efe159626f 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/persistent/PersistentMessages.java +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/persistent/PersistentMessages.java @@ -4,1850 +4,1598 @@ package org.opendaylight.controller.protobuff.messages.persistent; public final class PersistentMessages { - private PersistentMessages() { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - - public interface ModificationOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string type = 1; - - /** - * required string type = 1; - */ - boolean hasType(); - - /** - * required string type = 1; - */ - java.lang.String getType(); - - /** - * required string type = 1; - */ - com.google.protobuf.ByteString + private PersistentMessages() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface ModificationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string type = 1; + /** + * required string type = 1; + */ + boolean hasType(); + /** + * required string type = 1; + */ + java.lang.String getType(); + /** + * required string type = 1; + */ + com.google.protobuf.ByteString getTypeBytes(); - // required string path = 2; - - /** - * required string path = 2; - */ - boolean hasPath(); - - /** - * required string path = 2; - */ - java.lang.String getPath(); - - /** - * required string path = 2; - */ - com.google.protobuf.ByteString + // required string path = 2; + /** + * required string path = 2; + */ + boolean hasPath(); + /** + * required string path = 2; + */ + java.lang.String getPath(); + /** + * required string path = 2; + */ + com.google.protobuf.ByteString getPathBytes(); - // optional .org.opendaylight.controller.mdsal.Node data = 3; - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - boolean hasData(); - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getData(); - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getDataOrBuilder(); - } - - + // optional .org.opendaylight.controller.mdsal.Node data = 3; /** - * Protobuf type {@code org.opendaylight.controller.mdsal.Modification} + * optional .org.opendaylight.controller.mdsal.Node data = 3; */ - public static final class Modification extends - com.google.protobuf.GeneratedMessage - implements ModificationOrBuilder { - // Use Modification.newBuilder() to construct. - private Modification( - com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private Modification(boolean noInit) { - this.unknownFields = - com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final Modification defaultInstance; - - public static Modification getDefaultInstance() { - return defaultInstance; - } + boolean hasData(); + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getData(); + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getDataOrBuilder(); + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.Modification} + */ + public static final class Modification extends + com.google.protobuf.GeneratedMessage + implements ModificationOrBuilder { + // Use Modification.newBuilder() to construct. + private Modification(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Modification(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - public Modification getDefaultInstanceForType() { - return defaultInstance; - } + private static final Modification defaultInstance; + public static Modification getDefaultInstance() { + return defaultInstance; + } - private final com.google.protobuf.UnknownFieldSet unknownFields; + public Modification getDefaultInstanceForType() { + return defaultInstance; + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Modification( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - type_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - path_ = input.readBytes(); - break; - } - case 26: { - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder - subBuilder = null; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage( - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.PARSER, - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor + return this.unknownFields; + } + private Modification( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + type_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + path_ = input.readBytes(); + break; + } + case 26: { + org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = data_.toBuilder(); + } + data_ = input.readMessage(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(data_); + data_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_descriptor; - } + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_descriptor; + } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.class, - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Modification parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Modification(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required string type = 1; - public static final int TYPE_FIELD_NUMBER = 1; - private java.lang.Object type_; - - /** - * required string type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.class, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder.class); + } - /** - * required string type = 1; - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - type_ = s; - } - return s; - } - } + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Modification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Modification(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * required string type = 1; - */ - public com.google.protobuf.ByteString + private int bitField0_; + // required string type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private java.lang.Object type_; + /** + * required string type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string type = 1; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + type_ = s; + } + return s; + } + } + /** + * required string type = 1; + */ + public com.google.protobuf.ByteString getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required string path = 2; - public static final int PATH_FIELD_NUMBER = 2; - private java.lang.Object path_; - - /** - * required string path = 2; - */ - public boolean hasPath() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * required string path = 2; - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - path_ = s; - } - return s; - } - } + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * required string path = 2; - */ - public com.google.protobuf.ByteString + // required string path = 2; + public static final int PATH_FIELD_NUMBER = 2; + private java.lang.Object path_; + /** + * required string path = 2; + */ + public boolean hasPath() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string path = 2; + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + path_ = s; + } + return s; + } + } + /** + * required string path = 2; + */ + public com.google.protobuf.ByteString getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional .org.opendaylight.controller.mdsal.Node data = 3; - public static final int DATA_FIELD_NUMBER = 3; - private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node - data_; - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public boolean hasData() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getData() { - return data_; - } - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getDataOrBuilder() { - return data_; - } - - private void initFields() { - type_ = ""; - path_ = ""; - data_ = - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node - .getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) - return isInitialized == 1; - - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasPath()) { - memoizedIsInitialized = 0; - return false; - } - if (hasData()) { - if (!getData().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTypeBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getPathBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, data_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) - return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTypeBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getPathBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, data_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( - byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( - java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseDelimitedFrom( - java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.Modification} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.class, - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDataFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - type_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - path_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - if (dataBuilder_ == null) { - data_ = - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node - .getDefaultInstance(); - } else { - dataBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_descriptor; - } - - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification - .getDefaultInstance(); - } - - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification build() { - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification buildPartial() { - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification - result = - new org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification( - this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.path_ = path_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (dataBuilder_ == null) { - result.data_ = data_; - } else { - result.data_ = dataBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification) { - return mergeFrom( - (org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification other) { - if (other - == org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification - .getDefaultInstance()) - return this; - if (other.hasType()) { - bitField0_ |= 0x00000001; - type_ = other.type_; - onChanged(); - } - if (other.hasPath()) { - bitField0_ |= 0x00000002; - path_ = other.path_; - onChanged(); - } - if (other.hasData()) { - mergeData(other.getData()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasType()) { - - return false; - } - if (!hasPath()) { - - return false; - } - if (hasData()) { - if (!getData().isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification - parsedMessage = null; - try { - parsedMessage = - PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification) e - .getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - // required string type = 1; - private java.lang.Object type_ = ""; - - /** - * required string type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * required string type = 1; - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * required string type = 1; - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * required string type = 1; - */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - - /** - * required string type = 1; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - - /** - * required string type = 1; - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - - // required string path = 2; - private java.lang.Object path_ = ""; - - /** - * required string path = 2; - */ - public boolean hasPath() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * required string path = 2; - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * required string path = 2; - */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * required string path = 2; - */ - public Builder setPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - path_ = value; - onChanged(); - return this; - } - - /** - * required string path = 2; - */ - public Builder clearPath() { - bitField0_ = (bitField0_ & ~0x00000002); - path_ = getDefaultInstance().getPath(); - onChanged(); - return this; - } - - /** - * required string path = 2; - */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - path_ = value; - onChanged(); - return this; - } - - // optional .org.opendaylight.controller.mdsal.Node data = 3; - private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node - data_ = - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node - .getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder> - dataBuilder_; - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public boolean hasData() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getData() { - if (dataBuilder_ == null) { - return data_; - } else { - return dataBuilder_.getMessage(); - } - } - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public Builder setData( - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - dataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public Builder setData( - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder builderForValue) { - if (dataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - dataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public Builder mergeData( - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) { - if (dataBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - data_ - != org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node - .getDefaultInstance()) { - data_ = - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node - .newBuilder(data_).mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - dataBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public Builder clearData() { - if (dataBuilder_ == null) { - data_ = - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node - .getDefaultInstance(); - onChanged(); - } else { - dataBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } + // optional .org.opendaylight.controller.mdsal.Node data = 3; + public static final int DATA_FIELD_NUMBER = 3; + private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node data_; + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getData() { + return data_; + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getDataOrBuilder() { + return data_; + } - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder getDataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getDataFieldBuilder().getBuilder(); - } + private void initFields() { + type_ = ""; + path_ = ""; + data_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasType()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPath()) { + memoizedIsInitialized = 0; + return false; + } + if (hasData()) { + if (!getData().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getDataOrBuilder() { - if (dataBuilder_ != null) { - return dataBuilder_.getMessageOrBuilder(); - } else { - return data_; - } - } + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTypeBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getPathBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, data_); + } + getUnknownFields().writeTo(output); + } - /** - * optional .org.opendaylight.controller.mdsal.Node data = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder> - getDataFieldBuilder() { - if (dataBuilder_ == null) { - dataBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder>( - data_, - getParentForChildren(), - isClean()); - data_ = null; - } - return dataBuilder_; - } + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTypeBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getPathBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.Modification) - } + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } - static { - defaultInstance = new Modification(true); - defaultInstance.initFields(); - } + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.Modification) + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.Modification} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.class, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder.class); + } + + // Construct using org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getDataFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + path_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (dataBuilder_ == null) { + data_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance(); + } else { + dataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_Modification_descriptor; + } + + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification getDefaultInstanceForType() { + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.getDefaultInstance(); + } + + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification build() { + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification buildPartial() { + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification result = new org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.path_ = path_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (dataBuilder_ == null) { + result.data_ = data_; + } else { + result.data_ = dataBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification) { + return mergeFrom((org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification other) { + if (other == org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.getDefaultInstance()) return this; + if (other.hasType()) { + bitField0_ |= 0x00000001; + type_ = other.type_; + onChanged(); + } + if (other.hasPath()) { + bitField0_ |= 0x00000002; + path_ = other.path_; + onChanged(); + } + if (other.hasData()) { + mergeData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasType()) { + + return false; + } + if (!hasPath()) { + + return false; + } + if (hasData()) { + if (!getData().isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string type = 1; + private java.lang.Object type_ = ""; + /** + * required string type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string type = 1; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string type = 1; + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string type = 1; + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + /** + * required string type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * required string type = 1; + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + + // required string path = 2; + private java.lang.Object path_ = ""; + /** + * required string path = 2; + */ + public boolean hasPath() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string path = 2; + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string path = 2; + */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string path = 2; + */ + public Builder setPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + path_ = value; + onChanged(); + return this; + } + /** + * required string path = 2; + */ + public Builder clearPath() { + bitField0_ = (bitField0_ & ~0x00000002); + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * required string path = 2; + */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + path_ = value; + onChanged(); + return this; + } + + // optional .org.opendaylight.controller.mdsal.Node data = 3; + private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node data_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder> dataBuilder_; + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getData() { + if (dataBuilder_ == null) { + return data_; + } else { + return dataBuilder_.getMessage(); + } + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public Builder setData(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public Builder setData( + org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public Builder mergeData(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) { + if (dataBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + data_ != org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance()) { + data_ = + org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.newBuilder(data_).mergeFrom(value).buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + dataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public Builder clearData() { + if (dataBuilder_ == null) { + data_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance(); + onChanged(); + } else { + dataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder getDataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDataFieldBuilder().getBuilder(); + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_; + } + } + /** + * optional .org.opendaylight.controller.mdsal.Node data = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder>( + data_, + getParentForChildren(), + isClean()); + data_ = null; + } + return dataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.Modification) } + static { + defaultInstance = new Modification(true); + defaultInstance.initFields(); + } - public interface CompositeModificationOrBuilder - extends com.google.protobuf.MessageOrBuilder { + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.Modification) + } - // repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + public interface CompositeModificationOrBuilder + extends com.google.protobuf.MessageOrBuilder { - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - java.util.List + // repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + java.util.List getModificationList(); - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification getModification( - int index); - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - int getModificationCount(); - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - java.util.List + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification getModification(int index); + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + int getModificationCount(); + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + java.util.List getModificationOrBuilderList(); - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder getModificationOrBuilder( - int index); - } - - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CompositeModification} + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; */ - public static final class CompositeModification extends - com.google.protobuf.GeneratedMessage - implements CompositeModificationOrBuilder { - // Use CompositeModification.newBuilder() to construct. - private CompositeModification( - com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private CompositeModification(boolean noInit) { - this.unknownFields = - com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final CompositeModification defaultInstance; - - public static CompositeModification getDefaultInstance() { - return defaultInstance; - } + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder getModificationOrBuilder( + int index); + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.CompositeModification} + */ + public static final class CompositeModification extends + com.google.protobuf.GeneratedMessage + implements CompositeModificationOrBuilder { + // Use CompositeModification.newBuilder() to construct. + private CompositeModification(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private CompositeModification(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - public CompositeModification getDefaultInstanceForType() { - return defaultInstance; - } + private static final CompositeModification defaultInstance; + public static CompositeModification getDefaultInstance() { + return defaultInstance; + } - private final com.google.protobuf.UnknownFieldSet unknownFields; + public CompositeModification getDefaultInstanceForType() { + return defaultInstance; + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CompositeModification( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) - == 0x00000001)) { - modification_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - modification_.add(input.readMessage( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.PARSER, - extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - modification_ = - java.util.Collections.unmodifiableList(modification_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor + return this.unknownFields; + } + private CompositeModification( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + modification_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + modification_.add(input.readMessage(org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + modification_ = java.util.Collections.unmodifiableList(modification_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor; - } + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor; + } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.class, - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public CompositeModification parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CompositeModification(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - // repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - public static final int MODIFICATION_FIELD_NUMBER = 1; - private java.util.List - modification_; + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.class, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.Builder.class); + } - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public java.util.List getModificationList() { - return modification_; - } + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CompositeModification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompositeModification(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public java.util.List + // repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + public static final int MODIFICATION_FIELD_NUMBER = 1; + private java.util.List modification_; + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public java.util.List getModificationList() { + return modification_; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public java.util.List getModificationOrBuilderList() { - return modification_; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public int getModificationCount() { - return modification_.size(); - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification getModification( - int index) { - return modification_.get(index); - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder getModificationOrBuilder( - int index) { - return modification_.get(index); - } - - private void initFields() { - modification_ = java.util.Collections.emptyList(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) - return isInitialized == 1; - - for (int i = 0; i < getModificationCount(); i++) { - if (!getModification(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - for (int i = 0; i < modification_.size(); i++) { - output.writeMessage(1, modification_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) - return size; - - size = 0; - for (int i = 0; i < modification_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, modification_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( - byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( - java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseDelimitedFrom( - java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CompositeModification} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModificationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.class, - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getModificationFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (modificationBuilder_ == null) { - modification_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - modificationBuilder_.clear(); - } - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor; - } - - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification - .getDefaultInstance(); - } - - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification build() { - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification buildPartial() { - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification - result = - new org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification( - this); - int from_bitField0_ = bitField0_; - if (modificationBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - modification_ = java.util.Collections - .unmodifiableList(modification_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.modification_ = modification_; - } else { - result.modification_ = modificationBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification) { - return mergeFrom( - (org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification other) { - if (other - == org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification - .getDefaultInstance()) - return this; - if (modificationBuilder_ == null) { - if (!other.modification_.isEmpty()) { - if (modification_.isEmpty()) { - modification_ = other.modification_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureModificationIsMutable(); - modification_.addAll(other.modification_); - } - onChanged(); - } - } else { - if (!other.modification_.isEmpty()) { - if (modificationBuilder_.isEmpty()) { - modificationBuilder_.dispose(); - modificationBuilder_ = null; - modification_ = other.modification_; - bitField0_ = (bitField0_ & ~0x00000001); - modificationBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getModificationFieldBuilder() : null; - } else { - modificationBuilder_ - .addAllMessages(other.modification_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - for (int i = 0; i < getModificationCount(); i++) { - if (!getModification(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification - parsedMessage = null; - try { - parsedMessage = - PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification) e - .getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - // repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - private java.util.List - modification_ = - java.util.Collections.emptyList(); - - private void ensureModificationIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - modification_ = - new java.util.ArrayList( - modification_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder> - modificationBuilder_; - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public java.util.List getModificationList() { - if (modificationBuilder_ == null) { - return java.util.Collections - .unmodifiableList(modification_); - } else { - return modificationBuilder_.getMessageList(); - } - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public int getModificationCount() { - if (modificationBuilder_ == null) { - return modification_.size(); - } else { - return modificationBuilder_.getCount(); - } - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification getModification( - int index) { - if (modificationBuilder_ == null) { - return modification_.get(index); - } else { - return modificationBuilder_.getMessage(index); - } - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public Builder setModification( - int index, - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification value) { - if (modificationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureModificationIsMutable(); - modification_.set(index, value); - onChanged(); - } else { - modificationBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public Builder setModification( - int index, - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder builderForValue) { - if (modificationBuilder_ == null) { - ensureModificationIsMutable(); - modification_.set(index, builderForValue.build()); - onChanged(); - } else { - modificationBuilder_ - .setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public Builder addModification( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification value) { - if (modificationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureModificationIsMutable(); - modification_.add(value); - onChanged(); - } else { - modificationBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public Builder addModification( - int index, - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification value) { - if (modificationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureModificationIsMutable(); - modification_.add(index, value); - onChanged(); - } else { - modificationBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public Builder addModification( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder builderForValue) { - if (modificationBuilder_ == null) { - ensureModificationIsMutable(); - modification_.add(builderForValue.build()); - onChanged(); - } else { - modificationBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public Builder addModification( - int index, - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder builderForValue) { - if (modificationBuilder_ == null) { - ensureModificationIsMutable(); - modification_.add(index, builderForValue.build()); - onChanged(); - } else { - modificationBuilder_ - .addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public Builder addAllModification( - java.lang.Iterable values) { - if (modificationBuilder_ == null) { - ensureModificationIsMutable(); - super.addAll(values, modification_); - onChanged(); - } else { - modificationBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public Builder clearModification() { - if (modificationBuilder_ == null) { - modification_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - modificationBuilder_.clear(); - } - return this; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public Builder removeModification(int index) { - if (modificationBuilder_ == null) { - ensureModificationIsMutable(); - modification_.remove(index); - onChanged(); - } else { - modificationBuilder_.remove(index); - } - return this; - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder getModificationBuilder( - int index) { - return getModificationFieldBuilder().getBuilder(index); - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder getModificationOrBuilder( - int index) { - if (modificationBuilder_ == null) { - return modification_.get(index); - } else { - return modificationBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public java.util.List - getModificationOrBuilderList() { - if (modificationBuilder_ != null) { - return modificationBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections - .unmodifiableList(modification_); - } - } + return modification_; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public int getModificationCount() { + return modification_.size(); + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification getModification(int index) { + return modification_.get(index); + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder getModificationOrBuilder( + int index) { + return modification_.get(index); + } - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder addModificationBuilder() { - return getModificationFieldBuilder().addBuilder( - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification - .getDefaultInstance()); - } + private void initFields() { + modification_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getModificationCount(); i++) { + if (!getModification(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder addModificationBuilder( - int index) { - return getModificationFieldBuilder().addBuilder( - index, - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification - .getDefaultInstance()); - } + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < modification_.size(); i++) { + output.writeMessage(1, modification_.get(i)); + } + getUnknownFields().writeTo(output); + } - /** - * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; - */ - public java.util.List - getModificationBuilderList() { - return getModificationFieldBuilder().getBuilderList(); - } + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < modification_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, modification_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } - private com.google.protobuf.RepeatedFieldBuilder< - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder> - getModificationFieldBuilder() { - if (modificationBuilder_ == null) { - modificationBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder>( - modification_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - modification_ = null; - } - return modificationBuilder_; - } + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CompositeModification) - } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } - static { - defaultInstance = new CompositeModification(true); - defaultInstance.initFields(); - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.CompositeModification} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.class, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.Builder.class); + } + + // Construct using org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getModificationFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (modificationBuilder_ == null) { + modification_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + modificationBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor; + } + + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification getDefaultInstanceForType() { + return org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.getDefaultInstance(); + } + + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification build() { + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification buildPartial() { + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification result = new org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification(this); + int from_bitField0_ = bitField0_; + if (modificationBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + modification_ = java.util.Collections.unmodifiableList(modification_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.modification_ = modification_; + } else { + result.modification_ = modificationBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification) { + return mergeFrom((org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification other) { + if (other == org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification.getDefaultInstance()) return this; + if (modificationBuilder_ == null) { + if (!other.modification_.isEmpty()) { + if (modification_.isEmpty()) { + modification_ = other.modification_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModificationIsMutable(); + modification_.addAll(other.modification_); + } + onChanged(); + } + } else { + if (!other.modification_.isEmpty()) { + if (modificationBuilder_.isEmpty()) { + modificationBuilder_.dispose(); + modificationBuilder_ = null; + modification_ = other.modification_; + bitField0_ = (bitField0_ & ~0x00000001); + modificationBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getModificationFieldBuilder() : null; + } else { + modificationBuilder_.addAllMessages(other.modification_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getModificationCount(); i++) { + if (!getModification(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.CompositeModification) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + private java.util.List modification_ = + java.util.Collections.emptyList(); + private void ensureModificationIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + modification_ = new java.util.ArrayList(modification_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder> modificationBuilder_; + + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public java.util.List getModificationList() { + if (modificationBuilder_ == null) { + return java.util.Collections.unmodifiableList(modification_); + } else { + return modificationBuilder_.getMessageList(); + } + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public int getModificationCount() { + if (modificationBuilder_ == null) { + return modification_.size(); + } else { + return modificationBuilder_.getCount(); + } + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification getModification(int index) { + if (modificationBuilder_ == null) { + return modification_.get(index); + } else { + return modificationBuilder_.getMessage(index); + } + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public Builder setModification( + int index, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification value) { + if (modificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModificationIsMutable(); + modification_.set(index, value); + onChanged(); + } else { + modificationBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public Builder setModification( + int index, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder builderForValue) { + if (modificationBuilder_ == null) { + ensureModificationIsMutable(); + modification_.set(index, builderForValue.build()); + onChanged(); + } else { + modificationBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public Builder addModification(org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification value) { + if (modificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModificationIsMutable(); + modification_.add(value); + onChanged(); + } else { + modificationBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public Builder addModification( + int index, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification value) { + if (modificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModificationIsMutable(); + modification_.add(index, value); + onChanged(); + } else { + modificationBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public Builder addModification( + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder builderForValue) { + if (modificationBuilder_ == null) { + ensureModificationIsMutable(); + modification_.add(builderForValue.build()); + onChanged(); + } else { + modificationBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public Builder addModification( + int index, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder builderForValue) { + if (modificationBuilder_ == null) { + ensureModificationIsMutable(); + modification_.add(index, builderForValue.build()); + onChanged(); + } else { + modificationBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public Builder addAllModification( + java.lang.Iterable values) { + if (modificationBuilder_ == null) { + ensureModificationIsMutable(); + super.addAll(values, modification_); + onChanged(); + } else { + modificationBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public Builder clearModification() { + if (modificationBuilder_ == null) { + modification_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modificationBuilder_.clear(); + } + return this; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public Builder removeModification(int index) { + if (modificationBuilder_ == null) { + ensureModificationIsMutable(); + modification_.remove(index); + onChanged(); + } else { + modificationBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder getModificationBuilder( + int index) { + return getModificationFieldBuilder().getBuilder(index); + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder getModificationOrBuilder( + int index) { + if (modificationBuilder_ == null) { + return modification_.get(index); } else { + return modificationBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public java.util.List + getModificationOrBuilderList() { + if (modificationBuilder_ != null) { + return modificationBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(modification_); + } + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder addModificationBuilder() { + return getModificationFieldBuilder().addBuilder( + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.getDefaultInstance()); + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder addModificationBuilder( + int index) { + return getModificationFieldBuilder().addBuilder( + index, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.getDefaultInstance()); + } + /** + * repeated .org.opendaylight.controller.mdsal.Modification modification = 1; + */ + public java.util.List + getModificationBuilderList() { + return getModificationFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder> + getModificationFieldBuilder() { + if (modificationBuilder_ == null) { + modificationBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.Modification.Builder, org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages.ModificationOrBuilder>( + modification_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + modification_ = null; + } + return modificationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CompositeModification) + } - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CompositeModification) + static { + defaultInstance = new CompositeModification(true); + defaultInstance.initFields(); } + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CompositeModification) + } - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_Modification_descriptor; - private static + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_opendaylight_controller_mdsal_Modification_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_Modification_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor; - private static + internal_static_org_opendaylight_controller_mdsal_Modification_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CompositeModification_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\020Persistent.proto\022!org.opendaylight.con" + - "troller.mdsal\032\014Common.proto\"a\n\014Modificat" + - "ion\022\014\n\004type\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\0225\n\004data\030" - + - "\003 \001(\0132\'.org.opendaylight.controller.mdsa" + - "l.Node\"^\n\025CompositeModification\022E\n\014modif" + - "ication\030\001 \003(\0132/.org.opendaylight.control" + - "ler.mdsal.ModificationBO\n9org.opendaylig" + - "ht.controller.protobuff.messages.persist" + - "entB\022PersistentMessages" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner - assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_Modification_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_Modification_fieldAccessorTable = - new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_Modification_descriptor, - new java.lang.String[] {"Type", "Path", "Data",}); - internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_opendaylight_controller_mdsal_CompositeModification_fieldAccessorTable = - new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor, - new java.lang.String[] {"Modification",}); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages - .getDescriptor(), - }, assigner - ); - } - - // @@protoc_insertion_point(outer_class_scope) + internal_static_org_opendaylight_controller_mdsal_CompositeModification_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020Persistent.proto\022!org.opendaylight.con" + + "troller.mdsal\032\014Common.proto\"a\n\014Modificat" + + "ion\022\014\n\004type\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\0225\n\004data\030" + + "\003 \001(\0132\'.org.opendaylight.controller.mdsa" + + "l.Node\"^\n\025CompositeModification\022E\n\014modif" + + "ication\030\001 \003(\0132/.org.opendaylight.control" + + "ler.mdsal.ModificationBO\n9org.opendaylig" + + "ht.controller.protobuff.messages.persist" + + "entB\022PersistentMessages" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_opendaylight_controller_mdsal_Modification_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_opendaylight_controller_mdsal_Modification_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_Modification_descriptor, + new java.lang.String[] { "Type", "Path", "Data", }); + internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_org_opendaylight_controller_mdsal_CompositeModification_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CompositeModification_descriptor, + new java.lang.String[] { "Modification", }); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.getDescriptor(), + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) } diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/registration/ListenerRegistrationMessages.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/registration/ListenerRegistrationMessages.java index 8159452b68..d07c6781b6 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/registration/ListenerRegistrationMessages.java +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/registration/ListenerRegistrationMessages.java @@ -13,6 +13,10 @@ public final class ListenerRegistrationMessages { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseDataChangeListenerRegistration} + * + *
+   ** used when a listener needs to be unregistered
+   * 
*/ public static final class CloseDataChangeListenerRegistration extends com.google.protobuf.GeneratedMessage @@ -203,6 +207,10 @@ public final class ListenerRegistrationMessages { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseDataChangeListenerRegistration} + * + *
+     ** used when a listener needs to be unregistered
+     * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder @@ -322,6 +330,10 @@ public final class ListenerRegistrationMessages { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseDataChangeListenerRegistrationReply} + * + *
+   ** reply to the CloseDataChangeListenerRegistration request
+   * 
*/ public static final class CloseDataChangeListenerRegistrationReply extends com.google.protobuf.GeneratedMessage @@ -512,6 +524,10 @@ public final class ListenerRegistrationMessages { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseDataChangeListenerRegistrationReply} + * + *
+     ** reply to the CloseDataChangeListenerRegistration request
+     * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder @@ -626,6 +642,1231 @@ public final class ListenerRegistrationMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseDataChangeListenerRegistrationReply) } + public interface RegisterChangeListenerOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string instanceIdentifierPath = 1; + /** + * required string instanceIdentifierPath = 1; + */ + boolean hasInstanceIdentifierPath(); + /** + * required string instanceIdentifierPath = 1; + */ + java.lang.String getInstanceIdentifierPath(); + /** + * required string instanceIdentifierPath = 1; + */ + com.google.protobuf.ByteString + getInstanceIdentifierPathBytes(); + + // required string dataChangeListenerActorPath = 2; + /** + * required string dataChangeListenerActorPath = 2; + */ + boolean hasDataChangeListenerActorPath(); + /** + * required string dataChangeListenerActorPath = 2; + */ + java.lang.String getDataChangeListenerActorPath(); + /** + * required string dataChangeListenerActorPath = 2; + */ + com.google.protobuf.ByteString + getDataChangeListenerActorPathBytes(); + + // required int32 dataChangeScope = 3; + /** + * required int32 dataChangeScope = 3; + */ + boolean hasDataChangeScope(); + /** + * required int32 dataChangeScope = 3; + */ + int getDataChangeScope(); + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.RegisterChangeListener} + */ + public static final class RegisterChangeListener extends + com.google.protobuf.GeneratedMessage + implements RegisterChangeListenerOrBuilder { + // Use RegisterChangeListener.newBuilder() to construct. + private RegisterChangeListener(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private RegisterChangeListener(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final RegisterChangeListener defaultInstance; + public static RegisterChangeListener getDefaultInstance() { + return defaultInstance; + } + + public RegisterChangeListener getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RegisterChangeListener( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + instanceIdentifierPath_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + dataChangeListenerActorPath_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + dataChangeScope_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener.class, org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RegisterChangeListener parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RegisterChangeListener(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string instanceIdentifierPath = 1; + public static final int INSTANCEIDENTIFIERPATH_FIELD_NUMBER = 1; + private java.lang.Object instanceIdentifierPath_; + /** + * required string instanceIdentifierPath = 1; + */ + public boolean hasInstanceIdentifierPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string instanceIdentifierPath = 1; + */ + public java.lang.String getInstanceIdentifierPath() { + java.lang.Object ref = instanceIdentifierPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + instanceIdentifierPath_ = s; + } + return s; + } + } + /** + * required string instanceIdentifierPath = 1; + */ + public com.google.protobuf.ByteString + getInstanceIdentifierPathBytes() { + java.lang.Object ref = instanceIdentifierPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceIdentifierPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string dataChangeListenerActorPath = 2; + public static final int DATACHANGELISTENERACTORPATH_FIELD_NUMBER = 2; + private java.lang.Object dataChangeListenerActorPath_; + /** + * required string dataChangeListenerActorPath = 2; + */ + public boolean hasDataChangeListenerActorPath() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string dataChangeListenerActorPath = 2; + */ + public java.lang.String getDataChangeListenerActorPath() { + java.lang.Object ref = dataChangeListenerActorPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + dataChangeListenerActorPath_ = s; + } + return s; + } + } + /** + * required string dataChangeListenerActorPath = 2; + */ + public com.google.protobuf.ByteString + getDataChangeListenerActorPathBytes() { + java.lang.Object ref = dataChangeListenerActorPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataChangeListenerActorPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required int32 dataChangeScope = 3; + public static final int DATACHANGESCOPE_FIELD_NUMBER = 3; + private int dataChangeScope_; + /** + * required int32 dataChangeScope = 3; + */ + public boolean hasDataChangeScope() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required int32 dataChangeScope = 3; + */ + public int getDataChangeScope() { + return dataChangeScope_; + } + + private void initFields() { + instanceIdentifierPath_ = ""; + dataChangeListenerActorPath_ = ""; + dataChangeScope_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasInstanceIdentifierPath()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasDataChangeListenerActorPath()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasDataChangeScope()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getInstanceIdentifierPathBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getDataChangeListenerActorPathBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, dataChangeScope_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getInstanceIdentifierPathBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getDataChangeListenerActorPathBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, dataChangeScope_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.RegisterChangeListener} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener.class, org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener.Builder.class); + } + + // Construct using org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + instanceIdentifierPath_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + dataChangeListenerActorPath_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + dataChangeScope_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_descriptor; + } + + public org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener getDefaultInstanceForType() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener.getDefaultInstance(); + } + + public org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener build() { + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener buildPartial() { + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener result = new org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.instanceIdentifierPath_ = instanceIdentifierPath_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.dataChangeListenerActorPath_ = dataChangeListenerActorPath_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.dataChangeScope_ = dataChangeScope_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener) { + return mergeFrom((org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener other) { + if (other == org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener.getDefaultInstance()) return this; + if (other.hasInstanceIdentifierPath()) { + bitField0_ |= 0x00000001; + instanceIdentifierPath_ = other.instanceIdentifierPath_; + onChanged(); + } + if (other.hasDataChangeListenerActorPath()) { + bitField0_ |= 0x00000002; + dataChangeListenerActorPath_ = other.dataChangeListenerActorPath_; + onChanged(); + } + if (other.hasDataChangeScope()) { + setDataChangeScope(other.getDataChangeScope()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasInstanceIdentifierPath()) { + + return false; + } + if (!hasDataChangeListenerActorPath()) { + + return false; + } + if (!hasDataChangeScope()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListener) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string instanceIdentifierPath = 1; + private java.lang.Object instanceIdentifierPath_ = ""; + /** + * required string instanceIdentifierPath = 1; + */ + public boolean hasInstanceIdentifierPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string instanceIdentifierPath = 1; + */ + public java.lang.String getInstanceIdentifierPath() { + java.lang.Object ref = instanceIdentifierPath_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + instanceIdentifierPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string instanceIdentifierPath = 1; + */ + public com.google.protobuf.ByteString + getInstanceIdentifierPathBytes() { + java.lang.Object ref = instanceIdentifierPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceIdentifierPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string instanceIdentifierPath = 1; + */ + public Builder setInstanceIdentifierPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + instanceIdentifierPath_ = value; + onChanged(); + return this; + } + /** + * required string instanceIdentifierPath = 1; + */ + public Builder clearInstanceIdentifierPath() { + bitField0_ = (bitField0_ & ~0x00000001); + instanceIdentifierPath_ = getDefaultInstance().getInstanceIdentifierPath(); + onChanged(); + return this; + } + /** + * required string instanceIdentifierPath = 1; + */ + public Builder setInstanceIdentifierPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + instanceIdentifierPath_ = value; + onChanged(); + return this; + } + + // required string dataChangeListenerActorPath = 2; + private java.lang.Object dataChangeListenerActorPath_ = ""; + /** + * required string dataChangeListenerActorPath = 2; + */ + public boolean hasDataChangeListenerActorPath() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string dataChangeListenerActorPath = 2; + */ + public java.lang.String getDataChangeListenerActorPath() { + java.lang.Object ref = dataChangeListenerActorPath_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + dataChangeListenerActorPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string dataChangeListenerActorPath = 2; + */ + public com.google.protobuf.ByteString + getDataChangeListenerActorPathBytes() { + java.lang.Object ref = dataChangeListenerActorPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataChangeListenerActorPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string dataChangeListenerActorPath = 2; + */ + public Builder setDataChangeListenerActorPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + dataChangeListenerActorPath_ = value; + onChanged(); + return this; + } + /** + * required string dataChangeListenerActorPath = 2; + */ + public Builder clearDataChangeListenerActorPath() { + bitField0_ = (bitField0_ & ~0x00000002); + dataChangeListenerActorPath_ = getDefaultInstance().getDataChangeListenerActorPath(); + onChanged(); + return this; + } + /** + * required string dataChangeListenerActorPath = 2; + */ + public Builder setDataChangeListenerActorPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + dataChangeListenerActorPath_ = value; + onChanged(); + return this; + } + + // required int32 dataChangeScope = 3; + private int dataChangeScope_ ; + /** + * required int32 dataChangeScope = 3; + */ + public boolean hasDataChangeScope() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required int32 dataChangeScope = 3; + */ + public int getDataChangeScope() { + return dataChangeScope_; + } + /** + * required int32 dataChangeScope = 3; + */ + public Builder setDataChangeScope(int value) { + bitField0_ |= 0x00000004; + dataChangeScope_ = value; + onChanged(); + return this; + } + /** + * required int32 dataChangeScope = 3; + */ + public Builder clearDataChangeScope() { + bitField0_ = (bitField0_ & ~0x00000004); + dataChangeScope_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.RegisterChangeListener) + } + + static { + defaultInstance = new RegisterChangeListener(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.RegisterChangeListener) + } + + public interface RegisterChangeListenerReplyOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string listenerRegistrationPath = 1; + /** + * required string listenerRegistrationPath = 1; + */ + boolean hasListenerRegistrationPath(); + /** + * required string listenerRegistrationPath = 1; + */ + java.lang.String getListenerRegistrationPath(); + /** + * required string listenerRegistrationPath = 1; + */ + com.google.protobuf.ByteString + getListenerRegistrationPathBytes(); + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.RegisterChangeListenerReply} + * + *
+   **
+   * This is the reply for the RegisterChangeListener message
+   * It contains the listenerRegistration actor path
+   * that can be used to unregister the listener
+   * 
+ */ + public static final class RegisterChangeListenerReply extends + com.google.protobuf.GeneratedMessage + implements RegisterChangeListenerReplyOrBuilder { + // Use RegisterChangeListenerReply.newBuilder() to construct. + private RegisterChangeListenerReply(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private RegisterChangeListenerReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final RegisterChangeListenerReply defaultInstance; + public static RegisterChangeListenerReply getDefaultInstance() { + return defaultInstance; + } + + public RegisterChangeListenerReply getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RegisterChangeListenerReply( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + listenerRegistrationPath_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply.class, org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RegisterChangeListenerReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RegisterChangeListenerReply(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string listenerRegistrationPath = 1; + public static final int LISTENERREGISTRATIONPATH_FIELD_NUMBER = 1; + private java.lang.Object listenerRegistrationPath_; + /** + * required string listenerRegistrationPath = 1; + */ + public boolean hasListenerRegistrationPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string listenerRegistrationPath = 1; + */ + public java.lang.String getListenerRegistrationPath() { + java.lang.Object ref = listenerRegistrationPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + listenerRegistrationPath_ = s; + } + return s; + } + } + /** + * required string listenerRegistrationPath = 1; + */ + public com.google.protobuf.ByteString + getListenerRegistrationPathBytes() { + java.lang.Object ref = listenerRegistrationPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + listenerRegistrationPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + listenerRegistrationPath_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasListenerRegistrationPath()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getListenerRegistrationPathBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getListenerRegistrationPathBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.RegisterChangeListenerReply} + * + *
+     **
+     * This is the reply for the RegisterChangeListener message
+     * It contains the listenerRegistration actor path
+     * that can be used to unregister the listener
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply.class, org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply.Builder.class); + } + + // Construct using org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + listenerRegistrationPath_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_descriptor; + } + + public org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply getDefaultInstanceForType() { + return org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply.getDefaultInstance(); + } + + public org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply build() { + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply buildPartial() { + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply result = new org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.listenerRegistrationPath_ = listenerRegistrationPath_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply) { + return mergeFrom((org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply other) { + if (other == org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply.getDefaultInstance()) return this; + if (other.hasListenerRegistrationPath()) { + bitField0_ |= 0x00000001; + listenerRegistrationPath_ = other.listenerRegistrationPath_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasListenerRegistrationPath()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages.RegisterChangeListenerReply) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string listenerRegistrationPath = 1; + private java.lang.Object listenerRegistrationPath_ = ""; + /** + * required string listenerRegistrationPath = 1; + */ + public boolean hasListenerRegistrationPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string listenerRegistrationPath = 1; + */ + public java.lang.String getListenerRegistrationPath() { + java.lang.Object ref = listenerRegistrationPath_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + listenerRegistrationPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string listenerRegistrationPath = 1; + */ + public com.google.protobuf.ByteString + getListenerRegistrationPathBytes() { + java.lang.Object ref = listenerRegistrationPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + listenerRegistrationPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string listenerRegistrationPath = 1; + */ + public Builder setListenerRegistrationPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + listenerRegistrationPath_ = value; + onChanged(); + return this; + } + /** + * required string listenerRegistrationPath = 1; + */ + public Builder clearListenerRegistrationPath() { + bitField0_ = (bitField0_ & ~0x00000001); + listenerRegistrationPath_ = getDefaultInstance().getListenerRegistrationPath(); + onChanged(); + return this; + } + /** + * required string listenerRegistrationPath = 1; + */ + public Builder setListenerRegistrationPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + listenerRegistrationPath_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.RegisterChangeListenerReply) + } + + static { + defaultInstance = new RegisterChangeListenerReply(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.RegisterChangeListenerReply) + } + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CloseDataChangeListenerRegistration_descriptor; private static @@ -636,6 +1877,16 @@ public final class ListenerRegistrationMessages { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CloseDataChangeListenerRegistrationReply_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -648,9 +1899,14 @@ public final class ListenerRegistrationMessages { "\n\032ListenerRegistration.proto\022!org.openda" + "ylight.controller.mdsal\"%\n#CloseDataChan" + "geListenerRegistration\"*\n(CloseDataChang" + - "eListenerRegistrationReplyB[\n;org.openda" + - "ylight.controller.protobuff.messages.reg" + - "istrationB\034ListenerRegistrationMessages" + "eListenerRegistrationReply\"v\n\026RegisterCh" + + "angeListener\022\036\n\026instanceIdentifierPath\030\001" + + " \002(\t\022#\n\033dataChangeListenerActorPath\030\002 \002(" + + "\t\022\027\n\017dataChangeScope\030\003 \002(\005\"?\n\033RegisterCh" + + "angeListenerReply\022 \n\030listenerRegistratio" + + "nPath\030\001 \002(\tB[\n;org.opendaylight.controll" + + "er.protobuff.messages.registrationB\034List", + "enerRegistrationMessages" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -669,6 +1925,18 @@ public final class ListenerRegistrationMessages { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_opendaylight_controller_mdsal_CloseDataChangeListenerRegistrationReply_descriptor, new java.lang.String[] { }); + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListener_descriptor, + new java.lang.String[] { "InstanceIdentifierPath", "DataChangeListenerActorPath", "DataChangeScope", }); + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_RegisterChangeListenerReply_descriptor, + new java.lang.String[] { "ListenerRegistrationPath", }); return null; } }; diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ListenerRegistration.proto b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ListenerRegistration.proto index 3efe05d31e..b3eb2ed4bd 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ListenerRegistration.proto +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ListenerRegistration.proto @@ -3,11 +3,36 @@ package org.opendaylight.controller.mdsal; option java_package = "org.opendaylight.controller.protobuff.messages.registration"; option java_outer_classname = "ListenerRegistrationMessages"; +/** used when a listener needs to be unregistered*/ message CloseDataChangeListenerRegistration { } - +/** reply to the CloseDataChangeListenerRegistration request*/ message CloseDataChangeListenerRegistrationReply{ } +/** + * When registering a listener at particular level of tree + * identified by instanceIdentifierPath. + * dataChangeListenerActorPath is path to actor that will + * receive the change event + * scope is the data change scope like BASE,ONE and SUBTREE + * defined in AsyncDataBroker.DataChangeScope + */ + +message RegisterChangeListener{ +required string instanceIdentifierPath=1; +required string dataChangeListenerActorPath=2; +required int32 dataChangeScope=3; +} +/** +* This is the reply for the RegisterChangeListener message +* It contains the listenerRegistration actor path +* that can be used to unregister the listener +*/ +message RegisterChangeListenerReply{ +required string listenerRegistrationPath=1; + +} +