<artifactId>scala-library</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-protocolbuffer-encoding</artifactId>
+ <version>1.1-SNAPSHOT</version>
+ </dependency>
+
<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChain;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChainReply;
-import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
import org.opendaylight.controller.cluster.datastore.messages.ForwardedCommitTransaction;
import org.opendaylight.controller.cluster.datastore.messages.NonPersistent;
import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListener;
import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain;
import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply;
import java.util.HashMap;
import java.util.Map;
ActorRef transactionActor = getContext().actorOf(
ShardTransaction.props(transaction, getSelf()), "shard-" + createTransaction.getTransactionId());
getSender()
- .tell(new CreateTransactionReply(transactionActor.path(), createTransaction.getTransactionId()),
+ .tell(CreateTransactionReply.newBuilder()
+ .setTransactionActorPath(transactionActor.path().toString())
+ .setTransactionId(createTransaction.getTransactionId())
+ .build(),
getSelf());
}
import org.opendaylight.controller.cluster.datastore.messages.CloseTransactionChain;
import org.opendaylight.controller.cluster.datastore.messages.CloseTransactionChainReply;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
-import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
+import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages;
import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction;
import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain;
ActorRef transactionActor = getContext().actorOf(ShardTransaction
.props(chain, transaction, getContext().parent()), "shard-" + createTransaction.getTransactionId());
getSender()
- .tell(new CreateTransactionReply(transactionActor.path(), createTransaction.getTransactionId()),
+ .tell(ShardTransactionMessages.CreateTransactionReply.newBuilder()
+ .setTransactionActorPath(transactionActor.path().toString())
+ .setTransactionId(createTransaction.getTransactionId())
+ .build(),
getSelf());
}
import com.google.common.util.concurrent.ListenableFutureTask;
import org.opendaylight.controller.cluster.datastore.messages.CloseTransaction;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
-import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
+import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply;
import org.opendaylight.controller.cluster.datastore.messages.DeleteData;
import org.opendaylight.controller.cluster.datastore.messages.MergeData;
import org.opendaylight.controller.cluster.datastore.messages.ReadData;
Object response = actorContext.executeShardOperation(Shard.DEFAULT_NAME, new CreateTransaction(identifier), ActorContext.ASK_DURATION);
if(response instanceof CreateTransactionReply){
CreateTransactionReply reply = (CreateTransactionReply) response;
- remoteTransactionPaths.put(Shard.DEFAULT_NAME, actorContext.actorSelection(reply.getTransactionPath()));
+ remoteTransactionPaths.put(Shard.DEFAULT_NAME, actorContext.actorSelection(reply.getTransactionActorPath()));
}
}
import akka.actor.ActorPath;
+/**
+ * This is being deprecated to use sal-protocolbuff-encoding ShardTransactionMessages.CreateTransactionReply
+ * This classes will be removed once complete integration of distribute datastore with
+ * sal-protocolbuff-encoding is done.
+ */
+
+@Deprecated
public class CreateTransactionReply {
private final ActorPath transactionPath;
private final String transactionId;
ODLCluster{
+actor {
+ serializers {
+ java = "akka.serialization.JavaSerializer"
+ proto = "akka.remote.serialization.ProtobufSerializer"
+ }
+
+ serialization-bindings {
+ "com.google.protobuf.Message" = proto
+
+ }
+ }
+
}
\ No newline at end of file
import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChain;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChainReply;
-import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
+import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply;
import org.opendaylight.controller.cluster.datastore.messages.PreCommitTransaction;
import org.opendaylight.controller.cluster.datastore.messages.PreCommitTransactionReply;
import org.opendaylight.controller.cluster.datastore.messages.ReadyTransaction;
new ExpectMsg<ActorSelection>("CreateTransactionReply") {
protected ActorSelection match(Object in) {
if (in instanceof CreateTransactionReply) {
- ActorPath transactionPath =
- ((CreateTransactionReply) in)
- .getTransactionPath();
return getSystem()
- .actorSelection(transactionPath);
+ .actorSelection((((CreateTransactionReply) in)
+ .getTransactionActorPath()));
} else {
throw noMatch();
}
}
@Override
- public Map<InstanceIdentifier, ? extends NormalizedNode<?, ?>> getOriginalData() {
+ public Map<InstanceIdentifier, NormalizedNode<?, ?>> getOriginalData() {
throw new UnsupportedOperationException("getOriginalData");
}
}
@Override
- public Map<InstanceIdentifier, ? extends NormalizedNode<?, ?>> getOriginalData() {
+ public Map<InstanceIdentifier, NormalizedNode<?, ?>> getOriginalData() {
throw new UnsupportedOperationException("getOriginalData");
}
import akka.actor.ActorRef;
import akka.actor.Props;
import junit.framework.Assert;
-import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
+
import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListenerReply;
import org.opendaylight.controller.cluster.datastore.utils.DoNothingActor;
import org.opendaylight.controller.cluster.datastore.utils.MockActorContext;
import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListener;
+import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply;
import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction;
import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction;
import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain;
// Make CreateTransactionReply as the default response. Will need to be
// tuned if a specific test requires some other response
mockActorContext.setExecuteShardOperationResponse(
- new CreateTransactionReply(doNothingActorRef.path(), "txn-1 "));
+ CreateTransactionReply.newBuilder()
+ .setTransactionActorPath(doNothingActorRef.path().toString())
+ .setTransactionId("txn-1 ")
+ .build());
}
@org.junit.After
import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChain;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChainReply;
-import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
+import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply;
import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListener;
import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListenerReply;
import org.opendaylight.controller.cluster.datastore.messages.UpdateSchemaContext;
if (in instanceof CreateTransactionReply) {
CreateTransactionReply reply =
(CreateTransactionReply) in;
- return reply.getTransactionPath()
+ return reply.getTransactionActorPath()
.toString();
} else {
throw noMatch();
import org.opendaylight.controller.cluster.datastore.messages.CloseTransactionChain;
import org.opendaylight.controller.cluster.datastore.messages.CloseTransactionChainReply;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
-import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
+import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply;
import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
// do not put code outside this method, will run afterwards
protected String match(Object in) {
if (in instanceof CreateTransactionReply) {
- return ((CreateTransactionReply) in).getTransactionPath().toString();
+ return ((CreateTransactionReply) in).getTransactionActorPath().toString();
} else {
throw noMatch();
}
import junit.framework.Assert;
import org.junit.Test;
import org.opendaylight.controller.cluster.datastore.messages.CloseTransaction;
-import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
import org.opendaylight.controller.cluster.datastore.messages.DeleteData;
import org.opendaylight.controller.cluster.datastore.messages.MergeData;
import org.opendaylight.controller.cluster.datastore.messages.ReadDataReply;
import org.opendaylight.controller.cluster.datastore.utils.MessageCollectorActor;
import org.opendaylight.controller.cluster.datastore.utils.MockActorContext;
import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
+import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply;
import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
}
private CreateTransactionReply createTransactionReply(ActorRef actorRef){
- return new CreateTransactionReply(actorRef.path(), "txn-1");
+ return CreateTransactionReply.newBuilder()
+ .setTransactionActorPath(actorRef.path().toString())
+ .setTransactionId("txn-1")
+ .build();
}
}
akka {
actor {
- serializers {
- java = "akka.serialization.JavaSerializer"
- }
+ serializers {
+ java = "akka.serialization.JavaSerializer"
+ proto = "akka.remote.serialization.ProtobufSerializer"
+ }
serialization-bindings {
"org.opendaylight.controller.cluster.datastore.modification.MutableCompositeModification" = java
+ "com.google.protobuf.Message" = proto
+
}
}
}
\ No newline at end of file
<packaging>bundle</packaging>
<dependencies>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.5.0</version>
</dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-binding</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-model-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-model-util</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-parser-impl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.5</version>
+ </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.FluentIterable;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node;
+import org.opendaylight.controller.cluster.datastore.node.utils.NodeIdentifierFactory;
+import org.opendaylight.yangtools.concepts.Identifiable;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.AugmentationIdentifier;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifierWithPredicates;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeWithValue;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
+import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeContainer;
+import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
+import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
+import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeAttrBuilder;
+import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeContainerBuilder;
+import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
+import org.opendaylight.yangtools.yang.model.api.AugmentationTarget;
+import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
+import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
+import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * NormalizedNodeBuilder is a builder that walks through a tree like structure and constructs a
+ * NormalizedNode from it.
+ *
+ * A large part of this code has been copied over from a similar class in sal-common-impl which was
+ * originally supposed to convert a CompositeNode to NormalizedNode
+ *
+ * @param <T>
+ */
+public abstract class NodeToNormalizedNodeBuilder<T extends PathArgument>
+ implements Identifiable<T> {
+
+ private final T identifier;
+
+ protected static final Logger logger = LoggerFactory
+ .getLogger(NodeToNormalizedNodeBuilder.class);
+
+ @Override
+ public T getIdentifier() {
+ return identifier;
+ };
+
+ protected NodeToNormalizedNodeBuilder(final T identifier) {
+ super();
+ this.identifier = identifier;
+
+ }
+
+ /**
+ *
+ * @return Should return true if the node that this operation corresponds to is a mixin
+ */
+ public boolean isMixin() {
+ return false;
+ }
+
+
+ /**
+ *
+ * @return Should return true if the node that this operation corresponds to has a 'key'
+ * associated with it. This is typically true for a list-item or leaf-list entry in yang
+ */
+ public boolean isKeyedEntry() {
+ return false;
+ }
+
+ protected Set<QName> getQNameIdentifiers() {
+ return Collections.singleton(identifier.getNodeType());
+ }
+
+ public abstract NodeToNormalizedNodeBuilder<?> getChild(
+ final PathArgument child);
+
+ public abstract NodeToNormalizedNodeBuilder<?> getChild(QName child);
+
+ public abstract NormalizedNode<?, ?> normalize(QName nodeType, Node node);
+
+
+
+ private static abstract class SimpleTypeNormalization<T extends PathArgument>
+ extends NodeToNormalizedNodeBuilder<T> {
+
+ protected SimpleTypeNormalization(final T identifier) {
+ super(identifier);
+ }
+
+ @Override
+ public NormalizedNode<?, ?> normalize(final QName nodeType, final Node node) {
+ checkArgument(node != null);
+ return normalizeImpl(nodeType, node);
+ }
+
+ protected abstract NormalizedNode<?, ?> normalizeImpl(QName nodeType,
+ Node node);
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final PathArgument child) {
+ return null;
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final QName child) {
+ return null;
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+
+ private static final class LeafNormalization extends
+ SimpleTypeNormalization<NodeIdentifier> {
+
+ protected LeafNormalization(final NodeIdentifier identifier) {
+ super(identifier);
+ }
+
+ @Override
+ protected NormalizedNode<?, ?> normalizeImpl(final QName nodeType,
+ final Node node) {
+ return ImmutableNodes.leafNode(nodeType, node.getValue());
+
+ }
+
+ }
+
+ private static final class LeafListEntryNormalization extends
+ SimpleTypeNormalization<NodeWithValue> {
+
+ public LeafListEntryNormalization(final LeafListSchemaNode potential) {
+ super(new NodeWithValue(potential.getQName(), null));
+ }
+
+ @Override
+ protected NormalizedNode<?, ?> normalizeImpl(final QName nodeType,
+ final Node node) {
+ final Object data = node.getValue();
+ if (data == null) {
+ Preconditions.checkArgument(false,
+ "No data available in leaf list entry for " + nodeType);
+ }
+ NodeWithValue nodeId = new NodeWithValue(nodeType, data);
+ return Builders.leafSetEntryBuilder().withNodeIdentifier(nodeId)
+ .withValue(data).build();
+ }
+
+
+ @Override
+ public boolean isKeyedEntry() {
+ return true;
+ }
+ }
+
+ private static abstract class NodeToNormalizationNodeOperation<T extends PathArgument>
+ extends NodeToNormalizedNodeBuilder<T> {
+
+ protected NodeToNormalizationNodeOperation(final T identifier) {
+ super(identifier);
+ }
+
+ @SuppressWarnings({"rawtypes", "unchecked"})
+ @Override
+ public final NormalizedNodeContainer<?, ?, ?> normalize(
+ final QName nodeType, final Node node) {
+ checkArgument(node != null);
+ if (!node.getType().equals(AugmentationNode.class.getSimpleName())) {
+ checkArgument(nodeType != null);
+ }
+
+ NormalizedNodeContainerBuilder builder = createBuilder(node);
+
+ Set<NodeToNormalizedNodeBuilder<?>> usedMixins = new HashSet<>();
+
+ logNode(node);
+
+ if (node.getChildCount() == 0) {
+ PathArgument childPathArgument =
+ NodeIdentifierFactory.getArgument(node.getPath());
+ NormalizedNode child = null;
+ if (childPathArgument instanceof NodeWithValue) {
+ final NodeWithValue nodeWithValue =
+ new NodeWithValue(childPathArgument.getNodeType(),
+ node.getValue());
+ child =
+ Builders.leafSetEntryBuilder().withNodeIdentifier(nodeWithValue)
+ .withValue(node.getValue()).build();
+ } else {
+ child =
+ ImmutableNodes.leafNode(childPathArgument.getNodeType(),
+ node.getValue());
+ }
+ builder.addChild(child);
+ }
+
+ final List<Node> children = node.getChildList();
+ for (Node nodeChild : children) {
+
+ PathArgument childPathArgument =
+ NodeIdentifierFactory.getArgument(nodeChild.getPath());
+
+ QName childNodeType = null;
+ NodeToNormalizedNodeBuilder childOp = null;
+
+
+ if (childPathArgument instanceof AugmentationIdentifier) {
+ childOp = getChild(childPathArgument);
+ } else {
+ childNodeType = childPathArgument.getNodeType();
+ childOp = getChild(childNodeType);
+ }
+ // We skip unknown nodes if this node is mixin since
+ // it's nodes and parent nodes are interleaved
+ if (childOp == null && isMixin()) {
+ continue;
+ } else if (childOp == null) {
+ logger.error(
+ "childOp is null and this operation is not a mixin : this = {}",
+ this.toString());
+ }
+
+ checkArgument(childOp != null, "Node %s is not allowed inside %s",
+ childNodeType, getIdentifier());
+ if (childOp.isMixin()) {
+ if (usedMixins.contains(childOp)) {
+ // We already run / processed that mixin, so to avoid
+ // duplicate we are
+ // skiping next nodes.
+ continue;
+ }
+ // builder.addChild(childOp.normalize(nodeType, treeCacheNode));
+ final NormalizedNode childNode =
+ childOp.normalize(childNodeType, nodeChild);
+ if (childNode != null)
+ builder.addChild(childNode);
+ usedMixins.add(childOp);
+ } else {
+ final NormalizedNode childNode =
+ childOp.normalize(childNodeType, nodeChild);
+ if (childNode != null)
+ builder.addChild(childNode);
+ }
+ }
+
+
+ try {
+ return (NormalizedNodeContainer<?, ?, ?>) builder.build();
+ } catch (Exception e) {
+ return null;
+ }
+
+ }
+
+ private void logNode(Node node) {
+ //let us find out the type of the node
+ logger.debug("We got a {} , with identifier {} with {} children", node.getType(),node.getPath(),
+ node.getChildList());
+ }
+
+ @SuppressWarnings("rawtypes")
+ protected abstract NormalizedNodeContainerBuilder createBuilder(
+ final Node node);
+
+ }
+
+ private static abstract class DataContainerNormalizationOperation<T extends PathArgument>
+ extends NodeToNormalizationNodeOperation<T> {
+
+ private final DataNodeContainer schema;
+ private final Map<QName, NodeToNormalizedNodeBuilder<?>> byQName;
+ private final Map<PathArgument, NodeToNormalizedNodeBuilder<?>> byArg;
+
+ protected DataContainerNormalizationOperation(final T identifier,
+ final DataNodeContainer schema) {
+ super(identifier);
+ this.schema = schema;
+ this.byArg = new ConcurrentHashMap<>();
+ this.byQName = new ConcurrentHashMap<>();
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final PathArgument child) {
+ NodeToNormalizedNodeBuilder<?> potential = byArg.get(child);
+ if (potential != null) {
+ return potential;
+ }
+ potential = fromSchema(schema, child);
+ return register(potential);
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final QName child) {
+ if (child == null) {
+ return null;
+ }
+
+ NodeToNormalizedNodeBuilder<?> potential = byQName.get(child);
+ if (potential != null) {
+ return potential;
+ }
+ potential = fromSchemaAndPathArgument(schema, child);
+ return register(potential);
+ }
+
+ private NodeToNormalizedNodeBuilder<?> register(
+ final NodeToNormalizedNodeBuilder<?> potential) {
+ if (potential != null) {
+ byArg.put(potential.getIdentifier(), potential);
+ for (QName qName : potential.getQNameIdentifiers()) {
+ byQName.put(qName, potential);
+ }
+ }
+ return potential;
+ }
+
+ }
+
+ private static final class ListItemNormalization extends
+ DataContainerNormalizationOperation<NodeIdentifierWithPredicates> {
+
+ private final List<QName> keyDefinition;
+ private final ListSchemaNode schemaNode;
+
+ protected ListItemNormalization(
+ final NodeIdentifierWithPredicates identifier,
+ final ListSchemaNode schema) {
+ super(identifier, schema);
+ this.schemaNode = schema;
+ keyDefinition = schema.getKeyDefinition();
+ }
+
+ @Override
+ protected NormalizedNodeContainerBuilder createBuilder(final Node node) {
+ return Builders.mapEntryBuilder().withNodeIdentifier(
+ (NodeIdentifierWithPredicates) NodeIdentifierFactory.getArgument(node
+ .getPath()));
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ DataContainerNodeAttrBuilder<NodeIdentifierWithPredicates, MapEntryNode> builder =
+ Builders.mapEntryBuilder().withNodeIdentifier(
+ (NodeIdentifierWithPredicates) currentArg);
+ for (Entry<QName, Object> keyValue : ((NodeIdentifierWithPredicates) currentArg)
+ .getKeyValues().entrySet()) {
+ if (keyValue.getValue() == null) {
+ throw new NullPointerException("Null value found for path : "
+ + currentArg);
+ }
+ builder.addChild(Builders.leafBuilder()
+ //
+ .withNodeIdentifier(new NodeIdentifier(keyValue.getKey()))
+ .withValue(keyValue.getValue()).build());
+ }
+ return builder.build();
+ }
+
+
+ @Override
+ public boolean isKeyedEntry() {
+ return true;
+ }
+ }
+
+ private static final class ContainerNormalization extends
+ DataContainerNormalizationOperation<NodeIdentifier> {
+
+ protected ContainerNormalization(final ContainerSchemaNode schema) {
+ super(new NodeIdentifier(schema.getQName()), schema);
+ }
+
+ @Override
+ protected NormalizedNodeContainerBuilder createBuilder(final Node node) {
+ return Builders.containerBuilder().withNodeIdentifier(getIdentifier());
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ return Builders.containerBuilder()
+ .withNodeIdentifier((NodeIdentifier) currentArg).build();
+ }
+
+ }
+
+ private static abstract class MixinNormalizationOp<T extends PathArgument>
+ extends NodeToNormalizationNodeOperation<T> {
+
+ protected MixinNormalizationOp(final T identifier) {
+ super(identifier);
+ }
+
+ @Override
+ public final boolean isMixin() {
+ return true;
+ }
+
+ }
+
+ private static final class LeafListMixinNormalization extends
+ MixinNormalizationOp<NodeIdentifier> {
+
+ private final NodeToNormalizedNodeBuilder<?> innerOp;
+
+ public LeafListMixinNormalization(final LeafListSchemaNode potential) {
+ super(new NodeIdentifier(potential.getQName()));
+ innerOp = new LeafListEntryNormalization(potential);
+ }
+
+ @Override
+ protected NormalizedNodeContainerBuilder createBuilder(
+ final Node node) {
+ return Builders.leafSetBuilder().withNodeIdentifier(getIdentifier());
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ return Builders.leafSetBuilder().withNodeIdentifier(getIdentifier())
+ .build();
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final PathArgument child) {
+ if (child instanceof NodeWithValue) {
+ return innerOp;
+ }
+ return null;
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final QName child) {
+ if (getIdentifier().getNodeType().equals(child)) {
+ return innerOp;
+ }
+ return null;
+ }
+
+ }
+
+ private static final class AugmentationNormalization extends
+ MixinNormalizationOp<AugmentationIdentifier> {
+
+ private final Map<QName, NodeToNormalizedNodeBuilder<?>> byQName;
+ private final Map<PathArgument, NodeToNormalizedNodeBuilder<?>> byArg;
+
+ public AugmentationNormalization(final AugmentationSchema augmentation,
+ final DataNodeContainer schema) {
+ super(augmentationIdentifierFrom(augmentation));
+
+ ImmutableMap.Builder<QName, NodeToNormalizedNodeBuilder<?>> byQNameBuilder =
+ ImmutableMap.builder();
+ ImmutableMap.Builder<PathArgument, NodeToNormalizedNodeBuilder<?>> byArgBuilder =
+ ImmutableMap.builder();
+
+ for (DataSchemaNode augNode : augmentation.getChildNodes()) {
+ DataSchemaNode resolvedNode =
+ schema.getDataChildByName(augNode.getQName());
+ NodeToNormalizedNodeBuilder<?> resolvedOp =
+ fromDataSchemaNode(resolvedNode);
+ byArgBuilder.put(resolvedOp.getIdentifier(), resolvedOp);
+ for (QName resQName : resolvedOp.getQNameIdentifiers()) {
+ byQNameBuilder.put(resQName, resolvedOp);
+ }
+ }
+ byQName = byQNameBuilder.build();
+ byArg = byArgBuilder.build();
+
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final PathArgument child) {
+ return byArg.get(child);
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final QName child) {
+ return byQName.get(child);
+ }
+
+ @Override
+ protected Set<QName> getQNameIdentifiers() {
+ return getIdentifier().getPossibleChildNames();
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ protected NormalizedNodeContainerBuilder createBuilder(final Node node) {
+ return Builders.augmentationBuilder().withNodeIdentifier(getIdentifier());
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ return Builders.augmentationBuilder().withNodeIdentifier(getIdentifier())
+ .build();
+ }
+
+ }
+
+ private static final class ListMixinNormalization extends
+ MixinNormalizationOp<NodeIdentifier> {
+
+ private final ListItemNormalization innerNode;
+
+ public ListMixinNormalization(final ListSchemaNode list) {
+ super(new NodeIdentifier(list.getQName()));
+ this.innerNode =
+ new ListItemNormalization(new NodeIdentifierWithPredicates(
+ list.getQName(), Collections.<QName, Object>emptyMap()), list);
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ protected NormalizedNodeContainerBuilder createBuilder(
+ final Node node) {
+ return Builders.mapBuilder().withNodeIdentifier(getIdentifier());
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ return Builders.mapBuilder().withNodeIdentifier(getIdentifier()).build();
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final PathArgument child) {
+ if (child.getNodeType().equals(getIdentifier().getNodeType())) {
+ return innerNode;
+ }
+ return null;
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final QName child) {
+ if (getIdentifier().getNodeType().equals(child)) {
+ return innerNode;
+ }
+ return null;
+ }
+
+ }
+
+ private static class ChoiceNodeNormalization extends
+ MixinNormalizationOp<NodeIdentifier> {
+
+ private final ImmutableMap<QName, NodeToNormalizedNodeBuilder<?>> byQName;
+ private final ImmutableMap<PathArgument, NodeToNormalizedNodeBuilder<?>> byArg;
+
+ protected ChoiceNodeNormalization(
+ final org.opendaylight.yangtools.yang.model.api.ChoiceNode schema) {
+ super(new NodeIdentifier(schema.getQName()));
+ ImmutableMap.Builder<QName, NodeToNormalizedNodeBuilder<?>> byQNameBuilder =
+ ImmutableMap.builder();
+ ImmutableMap.Builder<PathArgument, NodeToNormalizedNodeBuilder<?>> byArgBuilder =
+ ImmutableMap.builder();
+
+ for (ChoiceCaseNode caze : schema.getCases()) {
+ for (DataSchemaNode cazeChild : caze.getChildNodes()) {
+ NodeToNormalizedNodeBuilder<?> childOp =
+ fromDataSchemaNode(cazeChild);
+ byArgBuilder.put(childOp.getIdentifier(), childOp);
+ for (QName qname : childOp.getQNameIdentifiers()) {
+ byQNameBuilder.put(qname, childOp);
+ }
+ }
+ }
+ byQName = byQNameBuilder.build();
+ byArg = byArgBuilder.build();
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final PathArgument child) {
+ return byArg.get(child);
+ }
+
+ @Override
+ public NodeToNormalizedNodeBuilder<?> getChild(final QName child) {
+ return byQName.get(child);
+ }
+
+ @Override
+ protected NormalizedNodeContainerBuilder createBuilder(final Node node) {
+ return Builders.choiceBuilder().withNodeIdentifier(getIdentifier());
+ }
+
+ @Override
+ public NormalizedNode<?, ?> createDefault(final PathArgument currentArg) {
+ return Builders.choiceBuilder().withNodeIdentifier(getIdentifier())
+ .build();
+ }
+ }
+
+ public static NodeToNormalizedNodeBuilder<?> fromSchemaAndPathArgument(
+ final DataNodeContainer schema, final QName child) {
+ DataSchemaNode potential = schema.getDataChildByName(child);
+ if (potential == null) {
+ Iterable<org.opendaylight.yangtools.yang.model.api.ChoiceNode> choices =
+ FluentIterable.from(schema.getChildNodes()).filter(
+ org.opendaylight.yangtools.yang.model.api.ChoiceNode.class);
+ potential = findChoice(choices, child);
+ }
+ if (potential == null) {
+ if (logger.isTraceEnabled()) {
+ logger.trace("BAD CHILD = {}", child.toString());
+ }
+ }
+
+ checkArgument(potential != null,
+ "Supplied QName %s is not valid according to schema %s", child, schema);
+ if ((schema instanceof DataSchemaNode)
+ && !((DataSchemaNode) schema).isAugmenting()
+ && potential.isAugmenting()) {
+ return fromAugmentation(schema, (AugmentationTarget) schema, potential);
+ }
+ return fromDataSchemaNode(potential);
+ }
+
+ /**
+ * Given a bunch of choice nodes and a the name of child find a choice node for that child which
+ * has a non-null value
+ *
+ * @param choices
+ * @param child
+ * @return
+ */
+ private static org.opendaylight.yangtools.yang.model.api.ChoiceNode findChoice(
+ final Iterable<org.opendaylight.yangtools.yang.model.api.ChoiceNode> choices,
+ final QName child) {
+ org.opendaylight.yangtools.yang.model.api.ChoiceNode foundChoice = null;
+ choiceLoop: for (org.opendaylight.yangtools.yang.model.api.ChoiceNode choice : choices) {
+ for (ChoiceCaseNode caze : choice.getCases()) {
+ if (caze.getDataChildByName(child) != null) {
+ foundChoice = choice;
+ break choiceLoop;
+ }
+ }
+ }
+ return foundChoice;
+ }
+
+
+ /**
+ * Create an AugmentationIdentifier based on the AugmentationSchema
+ *
+ * @param augmentation
+ * @return
+ */
+ public static AugmentationIdentifier augmentationIdentifierFrom(
+ final AugmentationSchema augmentation) {
+ ImmutableSet.Builder<QName> potentialChildren = ImmutableSet.builder();
+ for (DataSchemaNode child : augmentation.getChildNodes()) {
+ potentialChildren.add(child.getQName());
+ }
+ return new AugmentationIdentifier(null, potentialChildren.build());
+ }
+
+ /**
+ * Create an AugmentationNormalization based on the schema of the DataContainer, the
+ * AugmentationTarget and the potential schema node
+ *
+ * @param schema
+ * @param augments
+ * @param potential
+ * @return
+ */
+ private static AugmentationNormalization fromAugmentation(
+ final DataNodeContainer schema, final AugmentationTarget augments,
+ final DataSchemaNode potential) {
+ AugmentationSchema augmentation = null;
+ for (AugmentationSchema aug : augments.getAvailableAugmentations()) {
+ DataSchemaNode child = aug.getDataChildByName(potential.getQName());
+ if (child != null) {
+ augmentation = aug;
+ break;
+ }
+
+ }
+ if (augmentation != null) {
+ return new AugmentationNormalization(augmentation, schema);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ *
+ * @param schema
+ * @param child
+ * @return
+ */
+ private static NodeToNormalizedNodeBuilder<?> fromSchema(
+ final DataNodeContainer schema, final PathArgument child) {
+ if (child instanceof AugmentationIdentifier) {
+ return fromSchemaAndPathArgument(schema, ((AugmentationIdentifier) child)
+ .getPossibleChildNames().iterator().next());
+ }
+ return fromSchemaAndPathArgument(schema, child.getNodeType());
+ }
+
+ public static NodeToNormalizedNodeBuilder<?> fromDataSchemaNode(
+ final DataSchemaNode potential) {
+ if (potential instanceof ContainerSchemaNode) {
+ return new ContainerNormalization((ContainerSchemaNode) potential);
+ } else if (potential instanceof ListSchemaNode) {
+ return new ListMixinNormalization((ListSchemaNode) potential);
+ } else if (potential instanceof LeafSchemaNode) {
+ return new LeafNormalization(new NodeIdentifier(potential.getQName()));
+ } else if (potential instanceof org.opendaylight.yangtools.yang.model.api.ChoiceNode) {
+ return new ChoiceNodeNormalization(
+ (org.opendaylight.yangtools.yang.model.api.ChoiceNode) potential);
+ } else if (potential instanceof LeafListSchemaNode) {
+ return new LeafListMixinNormalization((LeafListSchemaNode) potential);
+ }
+ return null;
+ }
+
+ public static NodeToNormalizedNodeBuilder<?> from(final SchemaContext ctx) {
+ return new ContainerNormalization(ctx);
+ }
+
+ public abstract NormalizedNode<?, ?> createDefault(PathArgument currentArg);
+
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node;
+
+import org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages;
+import org.opendaylight.controller.cluster.datastore.node.utils.PathUtils;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NormalizedNodeToNodeCodec {
+ private final SchemaContext ctx;
+ private static final Logger logger = LoggerFactory.getLogger(NormalizedNodeToNodeCodec.class);
+
+ public NormalizedNodeToNodeCodec(final SchemaContext ctx){
+ this.ctx = ctx;
+
+ }
+
+ public NormalizedNodeMessages.Container encode(InstanceIdentifier id, NormalizedNode node){
+ String parentPath = "";
+
+ if(id != null){
+ parentPath = PathUtils.getParentPath(id.toString());
+ }
+
+
+ NormalizedNodeToProtocolBufferNode encoder = new NormalizedNodeToProtocolBufferNode();
+ encoder.encode(parentPath, node);
+
+ return encoder.getContainer();
+
+
+ }
+
+ public NormalizedNode<?,?> decode(InstanceIdentifier id, NormalizedNodeMessages.Node node){
+ NodeToNormalizedNodeBuilder currentOp = NodeToNormalizedNodeBuilder.from(ctx);
+
+ for(InstanceIdentifier.PathArgument pathArgument : id.getPath()){
+ currentOp = currentOp.getChild(pathArgument);
+ }
+
+ QName nodeType = null;
+
+ if(id.getPath().size() < 1){
+ nodeType = null;
+ } else {
+ final InstanceIdentifier.PathArgument pathArgument = id.getPath().get(id.getPath().size() - 1);
+ if(pathArgument instanceof InstanceIdentifier.AugmentationIdentifier){
+ nodeType = null;
+ } else {
+ nodeType = pathArgument.getNodeType();
+ }
+ }
+ try {
+ return currentOp.normalize(nodeType , node);
+ } catch(RuntimeException e){
+ throw e;
+ }
+ }
+
+
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node;
+import com.google.common.base.Preconditions;
+import org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages;
+import org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
+import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
+import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
+import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
+import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
+import org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MixinNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeContainer;
+import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListEntryNode;
+
+import java.util.Map;
+
+/**
+ * NormalizedNodeToProtocolBufferNode walks the NormalizedNode tree converting it to the
+ * NormalizedMessage.Node
+ *
+ * {@link org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode } is a tree like structure that provides a generic structure for a yang data
+ * model
+ *
+ *
+ */
+public class NormalizedNodeToProtocolBufferNode {
+
+
+ private final Node.Builder builderRoot;
+ private NormalizedNodeMessages.Container container;
+
+ public NormalizedNodeToProtocolBufferNode() {
+
+ builderRoot = Node.newBuilder();
+ }
+
+ public void encode(String parentPath, NormalizedNode<?, ?> normalizedNode) {
+ if (parentPath == null) {
+ parentPath = "";
+ }
+
+ Preconditions.checkArgument(normalizedNode!=null);
+
+ navigateNormalizedNode(0, parentPath,normalizedNode, builderRoot);
+ // here we need to put back the Node Tree in Container
+ NormalizedNodeMessages.Container.Builder containerBuilder =
+ NormalizedNodeMessages.Container.newBuilder();
+ containerBuilder.setParentPath(parentPath).setNormalizedNode(
+ builderRoot.build());
+ container = containerBuilder.build();
+
+ }
+
+
+ private void navigateDataContainerNode(int level,final String parentPath,
+ final DataContainerNode<?> dataContainerNode, Node.Builder builderParent) {
+
+ String newParentPath = parentPath + "/" + dataContainerNode.getIdentifier().toString();
+ String type = getDataContainerType(dataContainerNode).getSimpleName();
+ builderParent.setPath(dataContainerNode.getIdentifier().toString())
+ .setType(type);
+
+ final Iterable<DataContainerChild<? extends InstanceIdentifier.PathArgument, ?>> value =
+ dataContainerNode.getValue();
+ for (NormalizedNode<?, ?> node : value) {
+ Node.Builder builderChild = Node.newBuilder();
+ if (node instanceof MixinNode && node instanceof NormalizedNodeContainer) {
+
+ navigateNormalizedNodeContainerMixin(level, newParentPath,
+ (NormalizedNodeContainer<?, ?, ?>) node, builderChild);
+ } else {
+ navigateNormalizedNode(level, newParentPath,node, builderChild);
+ }
+ builderParent.addChild(builderChild);
+ }
+
+ }
+
+ private Class getDataContainerType(
+ NormalizedNodeContainer<?, ?, ?> dataContainerNode) {
+ if (dataContainerNode instanceof ChoiceNode) {
+ return ChoiceNode.class;
+ } else if (dataContainerNode instanceof AugmentationNode) {
+ return AugmentationNode.class;
+ } else if (dataContainerNode instanceof ContainerNode) {
+ return ContainerNode.class;
+ } else if (dataContainerNode instanceof MapEntryNode) {
+ return MapEntryNode.class;
+ } else if (dataContainerNode instanceof UnkeyedListEntryNode) {
+ return UnkeyedListEntryNode.class;
+ } else if (dataContainerNode instanceof MapNode) {
+ return MapNode.class;
+ } else if (dataContainerNode instanceof LeafSetNode){
+ return LeafSetNode.class;
+ }
+ throw new IllegalArgumentException(
+ "could not find the data container node type "
+ + dataContainerNode.toString());
+ }
+
+ private void navigateNormalizedNodeContainerMixin(int level, final String parentPath,
+ NormalizedNodeContainer<?, ?, ?> node, Node.Builder builderParent) {
+ String newParentPath = parentPath + "/" + node.getIdentifier().toString();
+
+ builderParent.setPath(node.getIdentifier().toString()).setType(
+ this.getDataContainerType(node).getSimpleName());
+ final Iterable<? extends NormalizedNode<?, ?>> value = node.getValue();
+ for (NormalizedNode normalizedNode : value) {
+ // child node builder
+ Node.Builder builderChild = Node.newBuilder();
+ if (normalizedNode instanceof MixinNode
+ && normalizedNode instanceof NormalizedNodeContainer) {
+ navigateNormalizedNodeContainerMixin(level + 1,newParentPath,
+ (NormalizedNodeContainer) normalizedNode, builderChild);
+ } else {
+ navigateNormalizedNode(level,newParentPath, normalizedNode, builderChild);
+ }
+ builderParent.addChild(builderChild);
+
+ }
+
+
+
+ }
+
+
+ private void navigateNormalizedNode(int level,
+ String parentPath,NormalizedNode<?, ?> normalizedNode, Node.Builder builderParent) {
+
+ if (normalizedNode instanceof DataContainerNode) {
+
+ final DataContainerNode<?> dataContainerNode =
+ (DataContainerNode) normalizedNode;
+
+ navigateDataContainerNode(level + 1, parentPath,dataContainerNode, builderParent);
+ } else {
+
+ if (normalizedNode instanceof LeafNode) {
+ buildLeafNode(parentPath,normalizedNode, builderParent);
+ } else if (normalizedNode instanceof LeafSetEntryNode) {
+ buildLeafSetEntryNode(parentPath,normalizedNode,builderParent);
+ }
+
+ }
+
+ }
+
+ private void buildLeafSetEntryNode(String parentPath,NormalizedNode<?, ?> normalizedNode,
+ Node.Builder builderParent) {
+ String path = parentPath + "/" + normalizedNode.getIdentifier().toString();
+ LeafSetEntryNode leafSetEntryNode = (LeafSetEntryNode) normalizedNode;
+ Map<QName, String> attributes = leafSetEntryNode.getAttributes();
+ if (!attributes.isEmpty()) {
+ NormalizedNodeMessages.Attribute.Builder builder = null;
+ for (Map.Entry<QName, String> attribute : attributes.entrySet()) {
+ builder = NormalizedNodeMessages.Attribute.newBuilder();
+ builder.setName(attribute.getKey().toString()).setValue(
+ normalizedNode.getValue().toString());
+ builderParent.addAttributes(builder.build());
+ }
+ }
+ builderParent.setPath(normalizedNode.getIdentifier().toString()).setType(
+ LeafSetEntryNode.class.getSimpleName()).setValue(normalizedNode.getValue().toString());
+ }
+
+ private void buildLeafNode(String parentPath,NormalizedNode<?, ?> normalizedNode,
+ Node.Builder builderParent) {
+ String path = parentPath + "/" + normalizedNode.getIdentifier().toString();
+ LeafNode leafNode = (LeafNode) normalizedNode;
+ Map<QName, String> attributes = leafNode.getAttributes();
+ if (!attributes.isEmpty()) {
+ NormalizedNodeMessages.Attribute.Builder builder = null;
+ for (Map.Entry<QName, String> attribute : attributes.entrySet()) {
+ builder = NormalizedNodeMessages.Attribute.newBuilder();
+ builder.setName(attribute.getKey().toString()).setValue(
+ normalizedNode.getValue().toString());
+ builderParent.addAttributes(builder.build());
+ }
+ }
+ builderParent.setPath(normalizedNode.getIdentifier().toString()).setType(
+ LeafNode.class.getSimpleName()).setValue(normalizedNode.getValue().toString());
+ }
+
+ public NormalizedNodeMessages.Container getContainer() {
+ return container;
+ }
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class AugmentationIdentifierGenerator {
+ private final String id;
+ private static final Pattern pattern = Pattern.compile("AugmentationIdentifier\\Q{\\EchildNames=\\Q[\\E(.*)\\Q]}\\E");
+ private final Matcher matcher;
+ private final boolean doesMatch;
+
+ public AugmentationIdentifierGenerator(String id){
+ this.id = id;
+ matcher = pattern.matcher(this.id);
+ doesMatch = matcher.matches();
+ }
+
+ public boolean matches(){
+ return doesMatch;
+ }
+
+ public InstanceIdentifier.AugmentationIdentifier getPathArgument(){
+ Set<QName> childNames = new HashSet<QName>();
+ final String childQNames = matcher.group(1);
+
+ final String[] splitChildQNames = childQNames.split(",");
+
+ for(String name : splitChildQNames){
+ childNames.add(
+ org.opendaylight.controller.cluster.datastore.node.utils.QNameFactory
+ .create(name.trim()));
+ }
+
+ return new InstanceIdentifier.AugmentationIdentifier(null, childNames);
+ }
+
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class NodeIdentifierFactory {
+ private static final Map<String, InstanceIdentifier.PathArgument> cache = new HashMap<>();
+ public static InstanceIdentifier.PathArgument getArgument(String id){
+ InstanceIdentifier.PathArgument value = cache.get(id);
+ if(value == null){
+ synchronized (cache){
+ value = cache.get(id);
+ if(value == null) {
+ value = createPathArgument(id);
+ cache.put(id, value);
+ }
+ }
+ }
+ return value;
+ }
+
+ private static InstanceIdentifier.PathArgument createPathArgument(String id){
+ final NodeIdentifierWithPredicatesGenerator
+ nodeIdentifierWithPredicatesGenerator = new NodeIdentifierWithPredicatesGenerator(id);
+ if(nodeIdentifierWithPredicatesGenerator.matches()){
+ return nodeIdentifierWithPredicatesGenerator.getPathArgument();
+ }
+
+ final NodeIdentifierWithValueGenerator
+ nodeWithValueGenerator = new NodeIdentifierWithValueGenerator(id);
+ if(nodeWithValueGenerator.matches()){
+ return nodeWithValueGenerator.getPathArgument();
+ }
+
+ final AugmentationIdentifierGenerator augmentationIdentifierGenerator = new AugmentationIdentifierGenerator(id);
+ if(augmentationIdentifierGenerator.matches()){
+ return augmentationIdentifierGenerator.getPathArgument();
+ }
+
+ return new NodeIdentifierGenerator(id).getArgument();
+ }
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+
+public class NodeIdentifierGenerator {
+ private final String id;
+ private final QName qName;
+
+ public NodeIdentifierGenerator(String id){
+ this.id = id;
+ this.qName = QNameFactory.create(id);
+ }
+
+ public InstanceIdentifier.PathArgument getArgument(){
+ return new InstanceIdentifier.NodeIdentifier(qName);
+ }
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.impl.codec.TypeDefinitionAwareCodec;
+import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class NodeIdentifierWithPredicatesGenerator{
+ private final String id;
+ private static final Pattern pattern = Pattern.compile("(.*)\\Q[{\\E(.*)\\Q}]\\E");
+ private final Matcher matcher;
+ private final boolean doesMatch;
+ private final ListSchemaNode listSchemaNode;
+
+ public NodeIdentifierWithPredicatesGenerator(String id){
+ this(id, null);
+ }
+
+ public NodeIdentifierWithPredicatesGenerator(String id, ListSchemaNode schemaNode){
+ this.id = id;
+ matcher = pattern.matcher(this.id);
+ doesMatch = matcher.matches();
+ this.listSchemaNode = schemaNode;
+ }
+
+
+ public boolean matches(){
+ return doesMatch;
+ }
+
+ public InstanceIdentifier.NodeIdentifierWithPredicates getPathArgument(){
+ final String group = matcher.group(2);
+ final String[] keyValues = group.split(",");
+ Map<QName, Object> nameValues = new HashMap<>();
+
+ for(String keyValue : keyValues){
+ int eqIndex = keyValue.lastIndexOf('=');
+ try {
+ final QName key = QNameFactory
+ .create(keyValue.substring(0, eqIndex));
+ nameValues.put(key, getValue(key, keyValue.substring(eqIndex + 1)));
+ } catch(IllegalArgumentException e){
+ System.out.println("Error processing identifier : " + id);
+ throw e;
+ }
+ }
+
+ return new InstanceIdentifier.NodeIdentifierWithPredicates(QNameFactory.create(matcher.group(1)), nameValues);
+ }
+
+
+ private Object getValue(QName key, String value){
+ if(listSchemaNode != null){
+ for(DataSchemaNode node : listSchemaNode.getChildNodes()){
+ if(node instanceof LeafSchemaNode && node.getQName().equals(key)){
+ return TypeDefinitionAwareCodec.from(LeafSchemaNode.class.cast(node).getType()).deserialize(value);
+ }
+ }
+ }
+ return value;
+ }
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class NodeIdentifierWithValueGenerator{
+ private final String id;
+ private static final Pattern pattern = Pattern.compile("(.*)\\Q[\\E(.*)\\Q]\\E");
+ private final Matcher matcher;
+ private final boolean doesMatch;
+
+ public NodeIdentifierWithValueGenerator(String id){
+ this.id = id;
+ matcher = pattern.matcher(this.id);
+ doesMatch = matcher.matches();
+ }
+
+ public boolean matches(){
+ return doesMatch;
+ }
+
+ public InstanceIdentifier.PathArgument getPathArgument(){
+ final String name = matcher.group(1);
+ final String value = matcher.group(2);
+
+ return new InstanceIdentifier.NodeWithValue(
+ QNameFactory.create(name), value);
+ }
+ }
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import com.google.common.base.Preconditions;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+public class NormalizedNodeGetter implements
+ NormalizedNodeVisitor {
+ private final String path;
+ NormalizedNode output;
+
+ public NormalizedNodeGetter(String path){
+ Preconditions.checkNotNull(path);
+ this.path = path;
+ }
+
+ @Override
+ public void visitNode(int level, String parentPath, NormalizedNode normalizedNode) {
+ String nodePath = parentPath + "/"+ normalizedNode.getIdentifier().toString();
+
+ if(nodePath.toString().equals(path)){
+ output = normalizedNode;
+ }
+ }
+
+ public NormalizedNode getOutput(){
+ return output;
+ }
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import com.google.common.base.Preconditions;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
+import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MixinNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeContainer;
+
+/**
+ * NormalizedNodeNavigator walks a {@link NormalizedNodeVisitor} through the NormalizedNode
+ *
+ * {@link NormalizedNode } is a tree like structure that provides a generic structure for a yang data model
+ *
+ * For examples of visitors
+ * @see NormalizedNodePrinter
+ *
+ *
+ */
+public class NormalizedNodeNavigator {
+
+ private final org.opendaylight.controller.cluster.datastore.node.utils.NormalizedNodeVisitor
+ visitor;
+
+ public NormalizedNodeNavigator(
+ org.opendaylight.controller.cluster.datastore.node.utils.NormalizedNodeVisitor visitor){
+ Preconditions.checkNotNull(visitor, "visitor should not be null");
+ this.visitor = visitor;
+ }
+ public void navigate(String parentPath, NormalizedNode<?,?> normalizedNode){
+ if(parentPath == null){
+ parentPath = "";
+ }
+ navigateNormalizedNode(0, parentPath, normalizedNode);
+ }
+
+ private void navigateDataContainerNode(int level, final String parentPath, final DataContainerNode<?> dataContainerNode){
+ visitor.visitNode(level, parentPath ,dataContainerNode);
+
+ String newParentPath = parentPath + "/" + dataContainerNode.getIdentifier().toString();
+
+ final Iterable<DataContainerChild<? extends InstanceIdentifier.PathArgument,?>> value = dataContainerNode.getValue();
+ for(NormalizedNode<?,?> node : value){
+ if(node instanceof MixinNode && node instanceof NormalizedNodeContainer){
+ navigateNormalizedNodeContainerMixin(level, newParentPath, (NormalizedNodeContainer<?, ?, ?>) node);
+ } else {
+ navigateNormalizedNode(level, newParentPath, node);
+ }
+ }
+
+ }
+
+ private void navigateNormalizedNodeContainerMixin(int level, final String parentPath, NormalizedNodeContainer<?, ?, ?> node) {
+ visitor.visitNode(level, parentPath, node);
+
+ String newParentPath = parentPath + "/" + node.getIdentifier().toString();
+
+ final Iterable<? extends NormalizedNode<?, ?>> value = node.getValue();
+ for(NormalizedNode normalizedNode : value){
+ if(normalizedNode instanceof MixinNode && normalizedNode instanceof NormalizedNodeContainer){
+ navigateNormalizedNodeContainerMixin(level + 1, newParentPath, (NormalizedNodeContainer) normalizedNode);
+ } else {
+ navigateNormalizedNode(level, newParentPath, normalizedNode);
+ }
+ }
+
+ }
+
+
+ private void navigateNormalizedNode(int level, String parentPath, NormalizedNode<?,?> normalizedNode){
+ if(normalizedNode instanceof DataContainerNode){
+
+ final DataContainerNode<?> dataContainerNode = (DataContainerNode) normalizedNode;
+
+ navigateDataContainerNode(level + 1, parentPath, dataContainerNode);
+ } else {
+ visitor.visitNode(level+1, parentPath, normalizedNode);
+ }
+ }
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
+import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+public class NormalizedNodePrinter implements NormalizedNodeVisitor {
+
+ private String spaces(int n){
+ StringBuilder builder = new StringBuilder();
+ for(int i=0;i<n;i++){
+ builder.append(' ');
+ }
+ return builder.toString();
+ }
+
+ @Override
+ public void visitNode(int level, String parentPath, NormalizedNode normalizedNode) {
+ System.out.println(spaces((level) * 4) + normalizedNode.getClass().toString() + ":" + normalizedNode.getIdentifier());
+ if(normalizedNode instanceof LeafNode || normalizedNode instanceof LeafSetEntryNode){
+ System.out.println(spaces((level) * 4) + " parentPath = " + parentPath);
+ System.out.println(spaces((level) * 4) + " key = " + normalizedNode.getClass().toString() + ":" + normalizedNode.getIdentifier());
+ System.out.println(spaces((level) * 4) + " value = " + normalizedNode.getValue());
+ }
+ }
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+public interface NormalizedNodeVisitor {
+ public void visitNode(int level, String parentPath, NormalizedNode normalizedNode);
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+public class PathUtils {
+ public static String getParentPath(String currentElementPath){
+ String parentPath = "";
+
+ if(currentElementPath != null){
+ String[] parentPaths = currentElementPath.split("/");
+ if(parentPaths.length > 2){
+ for(int i=0;i<parentPaths.length-1;i++){
+ if(parentPaths[i].length() > 0){
+ parentPath += "/" + parentPaths[i];
+ }
+ }
+ }
+ }
+ return parentPath;
+ }
+}
--- /dev/null
+package org.opendaylight.controller.cluster.datastore.node.utils;
+
+import org.opendaylight.yangtools.yang.common.QName;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class QNameFactory {
+ private static final Map<String, QName> cache = new HashMap<>();
+
+ public static QName create(String name){
+ QName value = cache.get(name);
+ if(value == null){
+ synchronized (cache){
+ value = cache.get(name);
+ if(value == null) {
+ value = QName.create(name);
+ cache.put(name, value);
+ }
+ }
+ }
+ return value;
+ }
+}
import com.google.common.collect.Lists;
import org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
+import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
+import org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils;
import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.DomUtils;
import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.parser.DomToNormalizedNodeParserFactory;
import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.serializer.DomFromNormalizedNodeSerializerFactory;
+import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
import org.opendaylight.yangtools.yang.model.api.ChoiceNode;
import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.w3c.dom.Document;
import javax.xml.transform.stream.StreamResult;
import java.io.ByteArrayInputStream;
import java.io.StringWriter;
+import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
/*
* @author: syedbahm
*/
public class EncoderDecoderUtil {
- static DocumentBuilderFactory factory;
- static {
- factory = DocumentBuilderFactory.newInstance();
- factory.setNamespaceAware(true);
- factory.setCoalescing(true);
- factory.setIgnoringElementContentWhitespace(true);
- factory.setIgnoringComments(true);
- }
+ static DocumentBuilderFactory factory;
- private static DataSchemaNode findChildNode(Iterable<DataSchemaNode> children,
- String name) {
- List<DataNodeContainer> containers = Lists.newArrayList();
-
- for (DataSchemaNode dataSchemaNode : children) {
- if (dataSchemaNode.getQName().getLocalName().equals(name))
- return dataSchemaNode;
- if (dataSchemaNode instanceof DataNodeContainer) {
- containers.add((DataNodeContainer) dataSchemaNode);
- } else if (dataSchemaNode instanceof ChoiceNode) {
- containers.addAll(((ChoiceNode) dataSchemaNode).getCases());
- }
+ private static DomFromNormalizedNodeSerializerFactory serializerFactory =
+ DomFromNormalizedNodeSerializerFactory
+ .getInstance(XmlDocumentUtils.getDocument(),
+ DomUtils.defaultValueCodecProvider());
+
+ private static DomToNormalizedNodeParserFactory parserFactory =
+ DomToNormalizedNodeParserFactory
+ .getInstance(DomUtils.defaultValueCodecProvider());
+
+ static {
+ factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ factory.setCoalescing(true);
+ factory.setIgnoringElementContentWhitespace(true);
+ factory.setIgnoringComments(true);
}
- for (DataNodeContainer container : containers) {
- DataSchemaNode retVal = findChildNode(container.getChildNodes(), name);
- if (retVal != null) {
- return retVal;
- }
+ private static DataSchemaNode findChildNode(Collection<DataSchemaNode> children,
+ String name) {
+ List<DataNodeContainer> containers = Lists.newArrayList();
+
+ for (DataSchemaNode dataSchemaNode : children) {
+ if (dataSchemaNode.getQName().getLocalName().equals(name))
+ return dataSchemaNode;
+ if (dataSchemaNode instanceof DataNodeContainer) {
+ containers.add((DataNodeContainer) dataSchemaNode);
+ } else if (dataSchemaNode instanceof ChoiceNode) {
+ containers.addAll(((ChoiceNode) dataSchemaNode).getCases());
+ }
+ }
+
+ for (DataNodeContainer container : containers) {
+ DataSchemaNode retVal =
+ findChildNode(container.getChildNodes(), name);
+ if (retVal != null) {
+ return retVal;
+ }
+ }
+
+ return null;
}
- return null;
- }
+ private static DataSchemaNode getSchemaNode(SchemaContext context,
+ QName qname) {
- private static DataSchemaNode getSchemaNode(SchemaContext context, QName qname) {
+ for (Module module : context
+ .findModuleByNamespace(qname.getNamespace())) {
+ // we will take the first child as the start of the
+ if (module.getChildNodes() != null || !module.getChildNodes()
+ .isEmpty()) {
- for (Module module : context.findModuleByNamespace(qname.getNamespace())) {
- // we will take the first child as the start of the
- if (module.getChildNodes() != null || !module.getChildNodes().isEmpty()) {
+ DataSchemaNode found =
+ findChildNode(module.getChildNodes(), qname.getLocalName());
+ return found;
+ }
+ }
+ return null;
+ }
- DataSchemaNode found =
- findChildNode(module.getChildNodes(), qname.getLocalName());
- return found;
- }
+ private static String toString(Element xml) {
+ try {
+ Transformer transformer =
+ TransformerFactory.newInstance().newTransformer();
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+
+ StreamResult result = new StreamResult(new StringWriter());
+ DOMSource source = new DOMSource(xml);
+ transformer.transform(source, result);
+
+ return result.getWriter().toString();
+ } catch (IllegalArgumentException | TransformerFactoryConfigurationError
+ | TransformerException e) {
+ throw new RuntimeException("Unable to serialize xml element " + xml,
+ e);
+ }
}
- return null;
- }
- private static String toString(Element xml) {
+ private static String toString(Iterable<Element> xmlIterable) {
try {
Transformer transformer =
TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
StreamResult result = new StreamResult(new StringWriter());
- DOMSource source = new DOMSource(xml);
- transformer.transform(source, result);
+ Iterator iterator = xmlIterable.iterator();
+ DOMSource source;
+ if(iterator.hasNext()) {
+ source = new DOMSource((org.w3c.dom.Node) iterator.next());
+ transformer.transform(source, result);
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ }
+ while(iterator.hasNext()) {
+ source = new DOMSource((org.w3c.dom.Node) iterator.next());
+ transformer.transform(source, result);
+ }
+ System.out.println(result.getWriter().toString());
return result.getWriter().toString();
} catch (IllegalArgumentException | TransformerFactoryConfigurationError
| TransformerException e) {
- throw new RuntimeException("Unable to serialize xml element " + xml, e);
+ throw new RuntimeException("Unable to serialize xml element(s) " + xmlIterable.toString(),
+ e);
}
}
- /**
- * Helps in generation of NormalizedNodeXml message for the supplied NormalizedNode
- *
- * @param sc --SchemaContext
- * @param normalizedNode -- Normalized Node to be encoded
- * @return SimpleNormalizedNodeMessage.NormalizedNodeXml
- */
- public static SimpleNormalizedNodeMessage.NormalizedNodeXml encode(
- SchemaContext sc, NormalizedNode<?, ?> normalizedNode) {
- Preconditions.checkArgument(sc != null, "Schema context found null");
- Preconditions.checkArgument(normalizedNode != null,
- "normalized node found null");
- ContainerSchemaNode containerNode =
- (ContainerSchemaNode) getSchemaNode(sc, normalizedNode.getIdentifier()
- .getNodeType());
- Preconditions.checkState(containerNode != null,
- "Couldn't find schema node for " + normalizedNode.getIdentifier());
- Iterable<Element> els =
- DomFromNormalizedNodeSerializerFactory
- .getInstance(XmlDocumentUtils.getDocument(),
- DomUtils.defaultValueCodecProvider())
- .getContainerNodeSerializer()
- .serialize(containerNode, (ContainerNode) normalizedNode);
- String xmlString = toString(els.iterator().next());
- SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder builder =
- SimpleNormalizedNodeMessage.NormalizedNodeXml.newBuilder();
- builder.setXmlString(xmlString);
- builder.setNodeIdentifier(((ContainerNode) normalizedNode).getIdentifier()
- .getNodeType().toString());
- return builder.build();
+ private static Iterable<Element> serialize(DataSchemaNode schemaNode, NormalizedNode normalizedNode){
+ if(schemaNode instanceof ContainerSchemaNode){ //1
+ return serializerFactory
+ .getContainerNodeSerializer()
+ .serialize((ContainerSchemaNode) schemaNode,
+ (ContainerNode) normalizedNode);
+ } else if(schemaNode instanceof ChoiceNode){ //2
+ return serializerFactory
+ .getChoiceNodeSerializer()
+ .serialize((ChoiceNode) schemaNode,
+ (org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode) normalizedNode);
+ } else if(schemaNode instanceof LeafSchemaNode){ //3
+ return serializerFactory
+ .getLeafNodeSerializer()
+ .serialize((LeafSchemaNode) schemaNode, (LeafNode) normalizedNode);
+ } else if(schemaNode instanceof ListSchemaNode){ //4
+ return serializerFactory
+ .getMapNodeSerializer()
+ .serialize((ListSchemaNode) schemaNode, (MapNode) normalizedNode);
+ } else if(schemaNode instanceof LeafListSchemaNode){ //5
+ return serializerFactory
+ .getLeafSetNodeSerializer()
+ .serialize((LeafListSchemaNode) schemaNode, (LeafSetNode) normalizedNode);
+ } else if(schemaNode instanceof AugmentationSchema){//6
+ return serializerFactory
+ .getAugmentationNodeSerializer()
+ .serialize((AugmentationSchema) schemaNode, (AugmentationNode) normalizedNode);
+ } else if(schemaNode instanceof ListSchemaNode && normalizedNode instanceof LeafSetEntryNode){ //7
+ return serializerFactory
+ .getLeafSetEntryNodeSerializer()
+ .serialize((LeafListSchemaNode) schemaNode, (LeafSetEntryNode) normalizedNode);
+ } else if(schemaNode instanceof ListSchemaNode){ //8
+ return serializerFactory
+ .getMapEntryNodeSerializer()
+ .serialize((ListSchemaNode) schemaNode, (MapEntryNode) normalizedNode);
+ }
- }
- /**
- * Utilizes the SimpleNormalizedNodeMessage.NormalizedNodeXml to convert into NormalizedNode
- *
- * @param sc -- schema context
- * @param normalizedNodeXml -- containing the normalized Node XML
- * @return NormalizedNode return
- * @throws Exception
- */
-
- public static NormalizedNode decode(SchemaContext sc,
- SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml)
- throws Exception {
- Preconditions.checkArgument(sc != null, "schema context seems to be null");
- Preconditions.checkArgument(normalizedNodeXml != null,
- "SimpleNormalizedNodeMessage.NormalizedNodeXml found to be null");
- QName qname = QName.create(normalizedNodeXml.getNodeIdentifier());
-
- // here we will try to get back the NormalizedNode
- ContainerSchemaNode containerSchemaNode =
- (ContainerSchemaNode) getSchemaNode(sc, qname);
-
- // now we need to read the XML
-
- Document doc =
- factory.newDocumentBuilder().parse(
- new ByteArrayInputStream(normalizedNodeXml.getXmlString().getBytes(
- "utf-8")));
- doc.getDocumentElement().normalize();
-
- ContainerNode result =
- DomToNormalizedNodeParserFactory
- .getInstance(DomUtils.defaultValueCodecProvider())
- .getContainerNodeParser()
- .parse(Collections.singletonList(doc.getDocumentElement()),
- containerSchemaNode);
- return (NormalizedNode) result;
+ throw new UnsupportedOperationException(schemaNode.getClass().toString());
+ }
- }
+ private static NormalizedNode parse(Document doc, DataSchemaNode schemaNode){
+ if(schemaNode instanceof ContainerSchemaNode){
+ return parserFactory
+ .getContainerNodeParser()
+ .parse(Collections.singletonList(doc.getDocumentElement()),
+ (ContainerSchemaNode) schemaNode);
+
+ } else if(schemaNode instanceof ChoiceNode){
+ return parserFactory
+ .getChoiceNodeParser()
+ .parse(Collections.singletonList(doc.getDocumentElement()),
+ (ChoiceNode) schemaNode);
+ } else if(schemaNode instanceof LeafNode){
+ return parserFactory
+ .getLeafNodeParser()
+ .parse(Collections.singletonList(doc.getDocumentElement()),
+ (LeafSchemaNode) schemaNode);
+ } else if(schemaNode instanceof ListSchemaNode){
+ return parserFactory
+ .getMapNodeParser()
+ .parse(Collections.singletonList(doc.getDocumentElement()),
+ (ListSchemaNode) schemaNode);
+ } else if(schemaNode instanceof LeafListSchemaNode){
+ return parserFactory
+ .getLeafSetNodeParser()
+ .parse(Collections.singletonList(doc.getDocumentElement()),
+ (LeafListSchemaNode) schemaNode);
+ } else if(schemaNode instanceof AugmentationSchema){
+ return parserFactory
+ .getAugmentationNodeParser()
+ .parse(Collections.singletonList(doc.getDocumentElement()),
+ (AugmentationSchema) schemaNode);
+ } else if(schemaNode instanceof ListSchemaNode){
+ return parserFactory
+ .getMapEntryNodeParser()
+ .parse(Collections.singletonList(doc.getDocumentElement()),
+ (ListSchemaNode) schemaNode);
+
+ }
+
+ throw new UnsupportedOperationException(schemaNode.getClass().toString());
+ }
+
+
+ /**
+ * Helps in generation of NormalizedNodeXml message for the supplied NormalizedNode
+ *
+ * @param sc --SchemaContext
+ * @param normalizedNode -- Normalized Node to be encoded
+ * @return SimpleNormalizedNodeMessage.NormalizedNodeXml
+ */
+ public static SimpleNormalizedNodeMessage.NormalizedNodeXml encode(
+ SchemaContext sc, NormalizedNode<?, ?> normalizedNode) {
+
+ Preconditions.checkArgument(sc != null, "Schema context found null");
+
+ Preconditions.checkArgument(normalizedNode != null,
+ "normalized node found null");
+
+ DataSchemaNode schemaNode = getSchemaNode(sc,
+ normalizedNode.getIdentifier()
+ .getNodeType()
+ );
+
+ Preconditions.checkState(schemaNode != null,
+ "Couldn't find schema node for " + normalizedNode.getIdentifier());
+
+ Iterable<Element> els = serialize(schemaNode, normalizedNode);
+
+ String xmlString = toString(els.iterator().next());
+ SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder builder =
+ SimpleNormalizedNodeMessage.NormalizedNodeXml.newBuilder();
+ builder.setXmlString(xmlString);
+ builder
+ .setNodeIdentifier(normalizedNode.getIdentifier()
+ .getNodeType().toString());
+ return builder.build();
+
+ }
+
+ /**
+ * Utilizes the SimpleNormalizedNodeMessage.NormalizedNodeXml to convert into NormalizedNode
+ *
+ * @param sc -- schema context
+ * @param normalizedNodeXml -- containing the normalized Node XML
+ * @return NormalizedNode return
+ * @throws Exception
+ */
+
+ public static NormalizedNode decode(SchemaContext sc,
+ SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml)
+ throws Exception {
+
+ Preconditions
+ .checkArgument(sc != null, "schema context seems to be null");
+
+ Preconditions.checkArgument(normalizedNodeXml != null,
+ "SimpleNormalizedNodeMessage.NormalizedNodeXml found to be null");
+ QName qname = QName.create(normalizedNodeXml.getNodeIdentifier());
+
+ // here we will try to get back the NormalizedNode
+ DataSchemaNode schemaNode = getSchemaNode(sc, qname);
+
+ // now we need to read the XML
+ Document doc =
+ factory.newDocumentBuilder().parse(
+ new ByteArrayInputStream(
+ normalizedNodeXml.getXmlString().getBytes(
+ "utf-8"))
+ );
+
+ doc.getDocumentElement().normalize();
+
+
+ return parse(doc, schemaNode);
+ }
--- /dev/null
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Cohort.proto
+
+package org.opendaylight.controller.protobuff.messages.cohort3pc;
+
+public final class ThreePhaseCommitCohortMessages {
+ private ThreePhaseCommitCohortMessages() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ }
+ public interface CanCommitTransactionOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.CanCommitTransaction}
+ */
+ public static final class CanCommitTransaction extends
+ com.google.protobuf.GeneratedMessage
+ implements CanCommitTransactionOrBuilder {
+ // Use CanCommitTransaction.newBuilder() to construct.
+ private CanCommitTransaction(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private CanCommitTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final CanCommitTransaction defaultInstance;
+ public static CanCommitTransaction getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public CanCommitTransaction getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private CanCommitTransaction(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ 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;
+ }
+ }
+ }
+ } 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.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<CanCommitTransaction> PARSER =
+ new com.google.protobuf.AbstractParser<CanCommitTransaction>() {
+ public CanCommitTransaction parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new CanCommitTransaction(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<CanCommitTransaction> getParserForType() {
+ return PARSER;
+ }
+
+ private void initFields() {
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction 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.CanCommitTransaction}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.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();
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction build() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction buildPartial() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction(this);
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction other) {
+ if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CanCommitTransaction)
+ }
+
+ static {
+ defaultInstance = new CanCommitTransaction(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CanCommitTransaction)
+ }
+
+ public interface CanCommitTransactionReplyOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // required bool canCommit = 1;
+ /**
+ * <code>required bool canCommit = 1;</code>
+ */
+ boolean hasCanCommit();
+ /**
+ * <code>required bool canCommit = 1;</code>
+ */
+ boolean getCanCommit();
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.CanCommitTransactionReply}
+ */
+ public static final class CanCommitTransactionReply extends
+ com.google.protobuf.GeneratedMessage
+ implements CanCommitTransactionReplyOrBuilder {
+ // Use CanCommitTransactionReply.newBuilder() to construct.
+ private CanCommitTransactionReply(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private CanCommitTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final CanCommitTransactionReply defaultInstance;
+ public static CanCommitTransactionReply getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public CanCommitTransactionReply getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private CanCommitTransactionReply(
+ 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 8: {
+ bitField0_ |= 0x00000001;
+ canCommit_ = input.readBool();
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<CanCommitTransactionReply> PARSER =
+ new com.google.protobuf.AbstractParser<CanCommitTransactionReply>() {
+ public CanCommitTransactionReply parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new CanCommitTransactionReply(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<CanCommitTransactionReply> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // required bool canCommit = 1;
+ public static final int CANCOMMIT_FIELD_NUMBER = 1;
+ private boolean canCommit_;
+ /**
+ * <code>required bool canCommit = 1;</code>
+ */
+ public boolean hasCanCommit() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>required bool canCommit = 1;</code>
+ */
+ public boolean getCanCommit() {
+ return canCommit_;
+ }
+
+ private void initFields() {
+ canCommit_ = false;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ if (!hasCanCommit()) {
+ 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.writeBool(1, canCommit_);
+ }
+ 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
+ .computeBoolSize(1, canCommit_);
+ }
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply 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.CanCommitTransactionReply}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReplyOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.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();
+ canCommit_ = false;
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply build() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply buildPartial() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.canCommit_ = canCommit_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply other) {
+ if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.getDefaultInstance()) return this;
+ if (other.hasCanCommit()) {
+ setCanCommit(other.getCanCommit());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasCanCommit()) {
+
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // required bool canCommit = 1;
+ private boolean canCommit_ ;
+ /**
+ * <code>required bool canCommit = 1;</code>
+ */
+ public boolean hasCanCommit() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>required bool canCommit = 1;</code>
+ */
+ public boolean getCanCommit() {
+ return canCommit_;
+ }
+ /**
+ * <code>required bool canCommit = 1;</code>
+ */
+ public Builder setCanCommit(boolean value) {
+ bitField0_ |= 0x00000001;
+ canCommit_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required bool canCommit = 1;</code>
+ */
+ public Builder clearCanCommit() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ canCommit_ = false;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CanCommitTransactionReply)
+ }
+
+ static {
+ defaultInstance = new CanCommitTransactionReply(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CanCommitTransactionReply)
+ }
+
+ public interface AbortTransactionOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.AbortTransaction}
+ */
+ public static final class AbortTransaction extends
+ com.google.protobuf.GeneratedMessage
+ implements AbortTransactionOrBuilder {
+ // Use AbortTransaction.newBuilder() to construct.
+ private AbortTransaction(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private AbortTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final AbortTransaction defaultInstance;
+ public static AbortTransaction getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public AbortTransaction getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private AbortTransaction(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ 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;
+ }
+ }
+ }
+ } 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.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<AbortTransaction> PARSER =
+ new com.google.protobuf.AbstractParser<AbortTransaction>() {
+ public AbortTransaction parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new AbortTransaction(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<AbortTransaction> getParserForType() {
+ return PARSER;
+ }
+
+ private void initFields() {
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction 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.AbortTransaction}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.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();
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction build() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction buildPartial() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction(this);
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction other) {
+ if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.AbortTransaction)
+ }
+
+ static {
+ defaultInstance = new AbortTransaction(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.AbortTransaction)
+ }
+
+ public interface AbortTransactionReplyOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.AbortTransactionReply}
+ */
+ public static final class AbortTransactionReply extends
+ com.google.protobuf.GeneratedMessage
+ implements AbortTransactionReplyOrBuilder {
+ // Use AbortTransactionReply.newBuilder() to construct.
+ private AbortTransactionReply(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private AbortTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final AbortTransactionReply defaultInstance;
+ public static AbortTransactionReply getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public AbortTransactionReply getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private AbortTransactionReply(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ 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;
+ }
+ }
+ }
+ } 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.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<AbortTransactionReply> PARSER =
+ new com.google.protobuf.AbstractParser<AbortTransactionReply>() {
+ public AbortTransactionReply parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new AbortTransactionReply(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<AbortTransactionReply> getParserForType() {
+ return PARSER;
+ }
+
+ private void initFields() {
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply 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.AbortTransactionReply}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReplyOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.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();
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply build() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply buildPartial() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply(this);
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply other) {
+ if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.AbortTransactionReply)
+ }
+
+ static {
+ defaultInstance = new AbortTransactionReply(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.AbortTransactionReply)
+ }
+
+ public interface CommitTransactionOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.CommitTransaction}
+ */
+ public static final class CommitTransaction extends
+ com.google.protobuf.GeneratedMessage
+ implements CommitTransactionOrBuilder {
+ // Use CommitTransaction.newBuilder() to construct.
+ private CommitTransaction(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private CommitTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final CommitTransaction defaultInstance;
+ public static CommitTransaction getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public CommitTransaction getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private CommitTransaction(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ 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;
+ }
+ }
+ }
+ } 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.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<CommitTransaction> PARSER =
+ new com.google.protobuf.AbstractParser<CommitTransaction>() {
+ public CommitTransaction parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new CommitTransaction(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<CommitTransaction> getParserForType() {
+ return PARSER;
+ }
+
+ private void initFields() {
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction 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.CommitTransaction}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.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();
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction build() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction buildPartial() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction(this);
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction other) {
+ if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CommitTransaction)
+ }
+
+ static {
+ defaultInstance = new CommitTransaction(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CommitTransaction)
+ }
+
+ public interface CommitTransactionReplyOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.CommitTransactionReply}
+ */
+ public static final class CommitTransactionReply extends
+ com.google.protobuf.GeneratedMessage
+ implements CommitTransactionReplyOrBuilder {
+ // Use CommitTransactionReply.newBuilder() to construct.
+ private CommitTransactionReply(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private CommitTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final CommitTransactionReply defaultInstance;
+ public static CommitTransactionReply getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public CommitTransactionReply getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private CommitTransactionReply(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ 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;
+ }
+ }
+ }
+ } 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.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<CommitTransactionReply> PARSER =
+ new com.google.protobuf.AbstractParser<CommitTransactionReply>() {
+ public CommitTransactionReply parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new CommitTransactionReply(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<CommitTransactionReply> getParserForType() {
+ return PARSER;
+ }
+
+ private void initFields() {
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply 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.CommitTransactionReply}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReplyOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.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();
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply build() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply buildPartial() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply(this);
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply other) {
+ if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CommitTransactionReply)
+ }
+
+ static {
+ defaultInstance = new CommitTransactionReply(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CommitTransactionReply)
+ }
+
+ public interface PreCommitTransactionOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.PreCommitTransaction}
+ */
+ public static final class PreCommitTransaction extends
+ com.google.protobuf.GeneratedMessage
+ implements PreCommitTransactionOrBuilder {
+ // Use PreCommitTransaction.newBuilder() to construct.
+ private PreCommitTransaction(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private PreCommitTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final PreCommitTransaction defaultInstance;
+ public static PreCommitTransaction getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public PreCommitTransaction getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private PreCommitTransaction(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ 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;
+ }
+ }
+ }
+ } 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.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<PreCommitTransaction> PARSER =
+ new com.google.protobuf.AbstractParser<PreCommitTransaction>() {
+ public PreCommitTransaction parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new PreCommitTransaction(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<PreCommitTransaction> getParserForType() {
+ return PARSER;
+ }
+
+ private void initFields() {
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction 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.PreCommitTransaction}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.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();
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction build() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction buildPartial() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction(this);
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction other) {
+ if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.PreCommitTransaction)
+ }
+
+ static {
+ defaultInstance = new PreCommitTransaction(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.PreCommitTransaction)
+ }
+
+ public interface PreCommitTransactionReplyOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.PreCommitTransactionReply}
+ */
+ public static final class PreCommitTransactionReply extends
+ com.google.protobuf.GeneratedMessage
+ implements PreCommitTransactionReplyOrBuilder {
+ // Use PreCommitTransactionReply.newBuilder() to construct.
+ private PreCommitTransactionReply(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private PreCommitTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final PreCommitTransactionReply defaultInstance;
+ public static PreCommitTransactionReply getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public PreCommitTransactionReply getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private PreCommitTransactionReply(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ 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;
+ }
+ }
+ }
+ } 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.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<PreCommitTransactionReply> PARSER =
+ new com.google.protobuf.AbstractParser<PreCommitTransactionReply>() {
+ public PreCommitTransactionReply parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new PreCommitTransactionReply(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<PreCommitTransactionReply> getParserForType() {
+ return PARSER;
+ }
+
+ private void initFields() {
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply 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.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply 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.PreCommitTransactionReply}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReplyOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.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();
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply build() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply buildPartial() {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply(this);
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply other) {
+ if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.PreCommitTransactionReply)
+ }
+
+ static {
+ defaultInstance = new PreCommitTransactionReply(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.PreCommitTransactionReply)
+ }
+
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_AbortTransaction_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_CommitTransaction_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_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\014Cohort.proto\022!org.opendaylight.control" +
+ "ler.mdsal\"\026\n\024CanCommitTransaction\".\n\031Can" +
+ "CommitTransactionReply\022\021\n\tcanCommit\030\001 \002(" +
+ "\010\"\022\n\020AbortTransaction\"\027\n\025AbortTransactio" +
+ "nReply\"\023\n\021CommitTransaction\"\030\n\026CommitTra" +
+ "nsactionReply\"\026\n\024PreCommitTransaction\"\033\n" +
+ "\031PreCommitTransactionReplyBZ\n8org.openda" +
+ "ylight.controller.protobuff.messages.coh" +
+ "ort3pcB\036ThreePhaseCommitCohortMessages"
+ };
+ 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_CanCommitTransaction_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor,
+ new java.lang.String[] { });
+ internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor,
+ new java.lang.String[] { "CanCommit", });
+ internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_org_opendaylight_controller_mdsal_AbortTransaction_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor,
+ new java.lang.String[] { });
+ internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor,
+ new java.lang.String[] { });
+ internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_org_opendaylight_controller_mdsal_CommitTransaction_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor,
+ new java.lang.String[] { });
+ internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor =
+ getDescriptor().getMessageTypes().get(5);
+ internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor,
+ new java.lang.String[] { });
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor =
+ getDescriptor().getMessageTypes().get(6);
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor,
+ new java.lang.String[] { });
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor =
+ getDescriptor().getMessageTypes().get(7);
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor,
+ new java.lang.String[] { });
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
--- /dev/null
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Common.proto
+
+package org.opendaylight.controller.protobuff.messages.common;
+
+public final class NormalizedNodeMessages {
+ private NormalizedNodeMessages() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ }
+ public interface AttributeOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // required string name = 1;
+ /**
+ * <code>required string name = 1;</code>
+ */
+ boolean hasName();
+ /**
+ * <code>required string name = 1;</code>
+ */
+ java.lang.String getName();
+ /**
+ * <code>required string name = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ // optional string value = 2;
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ boolean hasValue();
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ java.lang.String getValue();
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getValueBytes();
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.Attribute}
+ */
+ public static final class Attribute extends
+ com.google.protobuf.GeneratedMessage
+ implements AttributeOrBuilder {
+ // Use Attribute.newBuilder() to construct.
+ private Attribute(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private Attribute(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final Attribute defaultInstance;
+ public static Attribute getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public Attribute getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Attribute(
+ 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;
+ name_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ value_ = 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.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Attribute_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Attribute_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.class, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<Attribute> PARSER =
+ new com.google.protobuf.AbstractParser<Attribute>() {
+ public Attribute parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Attribute(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Attribute> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // required string name = 1;
+ public static final int NAME_FIELD_NUMBER = 1;
+ private java.lang.Object name_;
+ /**
+ * <code>required string name = 1;</code>
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>required string name = 1;</code>
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ 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()) {
+ name_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>required string name = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // optional string value = 2;
+ public static final int VALUE_FIELD_NUMBER = 2;
+ private java.lang.Object value_;
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ public boolean hasValue() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ 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()) {
+ value_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private void initFields() {
+ name_ = "";
+ value_ = "";
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ if (!hasName()) {
+ 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, getNameBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getValueBytes());
+ }
+ 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, getNameBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getValueBytes());
+ }
+ 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.common.NormalizedNodeMessages.Attribute parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute 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.common.NormalizedNodeMessages.Attribute parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute 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.common.NormalizedNodeMessages.Attribute parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute 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.common.NormalizedNodeMessages.Attribute parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute 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.common.NormalizedNodeMessages.Attribute parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute 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.common.NormalizedNodeMessages.Attribute 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.Attribute}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Attribute_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Attribute_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.class, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.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();
+ name_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ value_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Attribute_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute build() {
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute buildPartial() {
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute result = new org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.name_ = name_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.value_ = value_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute other) {
+ if (other == org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.getDefaultInstance()) return this;
+ if (other.hasName()) {
+ bitField0_ |= 0x00000001;
+ name_ = other.name_;
+ onChanged();
+ }
+ if (other.hasValue()) {
+ bitField0_ |= 0x00000002;
+ value_ = other.value_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasName()) {
+
+ 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.common.NormalizedNodeMessages.Attribute parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // required string name = 1;
+ private java.lang.Object name_ = "";
+ /**
+ * <code>required string name = 1;</code>
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>required string name = 1;</code>
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>required string name = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>required string name = 1;</code>
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required string name = 1;</code>
+ */
+ public Builder clearName() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required string name = 1;</code>
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ // optional string value = 2;
+ private java.lang.Object value_ = "";
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ public boolean hasValue() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ value_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ public Builder setValue(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ value_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ public Builder clearValue() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ value_ = getDefaultInstance().getValue();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string value = 2;</code>
+ */
+ public Builder setValueBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ value_ = value;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.Attribute)
+ }
+
+ static {
+ defaultInstance = new Attribute(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.Attribute)
+ }
+
+ public interface NodeOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // required string path = 1;
+ /**
+ * <code>required string path = 1;</code>
+ */
+ boolean hasPath();
+ /**
+ * <code>required string path = 1;</code>
+ */
+ java.lang.String getPath();
+ /**
+ * <code>required string path = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getPathBytes();
+
+ // optional string type = 2;
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ boolean hasType();
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ java.lang.String getType();
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getTypeBytes();
+
+ // repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute>
+ getAttributesList();
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute getAttributes(int index);
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ int getAttributesCount();
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ java.util.List<? extends org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder>
+ getAttributesOrBuilderList();
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder getAttributesOrBuilder(
+ int index);
+
+ // repeated .org.opendaylight.controller.mdsal.Node child = 4;
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node>
+ getChildList();
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getChild(int index);
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ int getChildCount();
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ java.util.List<? extends org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder>
+ getChildOrBuilderList();
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getChildOrBuilder(
+ int index);
+
+ // optional string value = 5;
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ boolean hasValue();
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ java.lang.String getValue();
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ com.google.protobuf.ByteString
+ getValueBytes();
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.Node}
+ */
+ public static final class Node extends
+ com.google.protobuf.GeneratedMessage
+ implements NodeOrBuilder {
+ // Use Node.newBuilder() to construct.
+ private Node(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private Node(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final Node defaultInstance;
+ public static Node getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public Node getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Node(
+ 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;
+ path_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ type_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ attributes_ = new java.util.ArrayList<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute>();
+ mutable_bitField0_ |= 0x00000004;
+ }
+ attributes_.add(input.readMessage(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.PARSER, extensionRegistry));
+ break;
+ }
+ case 34: {
+ if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+ child_ = new java.util.ArrayList<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node>();
+ mutable_bitField0_ |= 0x00000008;
+ }
+ child_.add(input.readMessage(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.PARSER, extensionRegistry));
+ break;
+ }
+ case 42: {
+ bitField0_ |= 0x00000004;
+ value_ = 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 {
+ if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ attributes_ = java.util.Collections.unmodifiableList(attributes_);
+ }
+ if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+ child_ = java.util.Collections.unmodifiableList(child_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Node_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Node_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.class, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<Node> PARSER =
+ new com.google.protobuf.AbstractParser<Node>() {
+ public Node parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Node(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Node> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // required string path = 1;
+ public static final int PATH_FIELD_NUMBER = 1;
+ private java.lang.Object path_;
+ /**
+ * <code>required string path = 1;</code>
+ */
+ public boolean hasPath() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>required string path = 1;</code>
+ */
+ 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;
+ }
+ }
+ /**
+ * <code>required string path = 1;</code>
+ */
+ 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 string type = 2;
+ public static final int TYPE_FIELD_NUMBER = 2;
+ private java.lang.Object type_;
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ 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;
+ }
+ }
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ 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;
+ }
+ }
+
+ // repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;
+ public static final int ATTRIBUTES_FIELD_NUMBER = 3;
+ private java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute> attributes_;
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute> getAttributesList() {
+ return attributes_;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public java.util.List<? extends org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder>
+ getAttributesOrBuilderList() {
+ return attributes_;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public int getAttributesCount() {
+ return attributes_.size();
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute getAttributes(int index) {
+ return attributes_.get(index);
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder getAttributesOrBuilder(
+ int index) {
+ return attributes_.get(index);
+ }
+
+ // repeated .org.opendaylight.controller.mdsal.Node child = 4;
+ public static final int CHILD_FIELD_NUMBER = 4;
+ private java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node> child_;
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node> getChildList() {
+ return child_;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public java.util.List<? extends org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder>
+ getChildOrBuilderList() {
+ return child_;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public int getChildCount() {
+ return child_.size();
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getChild(int index) {
+ return child_.get(index);
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getChildOrBuilder(
+ int index) {
+ return child_.get(index);
+ }
+
+ // optional string value = 5;
+ public static final int VALUE_FIELD_NUMBER = 5;
+ private java.lang.Object value_;
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ public boolean hasValue() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ 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()) {
+ value_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private void initFields() {
+ path_ = "";
+ type_ = "";
+ attributes_ = java.util.Collections.emptyList();
+ child_ = java.util.Collections.emptyList();
+ value_ = "";
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ if (!hasPath()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ for (int i = 0; i < getAttributesCount(); i++) {
+ if (!getAttributes(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ for (int i = 0; i < getChildCount(); i++) {
+ if (!getChild(i).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, getPathBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getTypeBytes());
+ }
+ for (int i = 0; i < attributes_.size(); i++) {
+ output.writeMessage(3, attributes_.get(i));
+ }
+ for (int i = 0; i < child_.size(); i++) {
+ output.writeMessage(4, child_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(5, getValueBytes());
+ }
+ 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, getPathBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getTypeBytes());
+ }
+ for (int i = 0; i < attributes_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, attributes_.get(i));
+ }
+ for (int i = 0; i < child_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, child_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(5, getValueBytes());
+ }
+ 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.common.NormalizedNodeMessages.Node parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node 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.common.NormalizedNodeMessages.Node parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node 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.common.NormalizedNodeMessages.Node parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node 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.common.NormalizedNodeMessages.Node parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node 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.common.NormalizedNodeMessages.Node parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node 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.common.NormalizedNodeMessages.Node 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.Node}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Node_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Node_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.class, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getAttributesFieldBuilder();
+ getChildFieldBuilder();
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ path_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ type_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ if (attributesBuilder_ == null) {
+ attributes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ attributesBuilder_.clear();
+ }
+ if (childBuilder_ == null) {
+ child_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ } else {
+ childBuilder_.clear();
+ }
+ value_ = "";
+ bitField0_ = (bitField0_ & ~0x00000010);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Node_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node build() {
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node buildPartial() {
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node result = new org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.path_ = path_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.type_ = type_;
+ if (attributesBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ attributes_ = java.util.Collections.unmodifiableList(attributes_);
+ bitField0_ = (bitField0_ & ~0x00000004);
+ }
+ result.attributes_ = attributes_;
+ } else {
+ result.attributes_ = attributesBuilder_.build();
+ }
+ if (childBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ child_ = java.util.Collections.unmodifiableList(child_);
+ bitField0_ = (bitField0_ & ~0x00000008);
+ }
+ result.child_ = child_;
+ } else {
+ result.child_ = childBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.value_ = value_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node other) {
+ if (other == org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance()) return this;
+ if (other.hasPath()) {
+ bitField0_ |= 0x00000001;
+ path_ = other.path_;
+ onChanged();
+ }
+ if (other.hasType()) {
+ bitField0_ |= 0x00000002;
+ type_ = other.type_;
+ onChanged();
+ }
+ if (attributesBuilder_ == null) {
+ if (!other.attributes_.isEmpty()) {
+ if (attributes_.isEmpty()) {
+ attributes_ = other.attributes_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ ensureAttributesIsMutable();
+ attributes_.addAll(other.attributes_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.attributes_.isEmpty()) {
+ if (attributesBuilder_.isEmpty()) {
+ attributesBuilder_.dispose();
+ attributesBuilder_ = null;
+ attributes_ = other.attributes_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ attributesBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ getAttributesFieldBuilder() : null;
+ } else {
+ attributesBuilder_.addAllMessages(other.attributes_);
+ }
+ }
+ }
+ if (childBuilder_ == null) {
+ if (!other.child_.isEmpty()) {
+ if (child_.isEmpty()) {
+ child_ = other.child_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ } else {
+ ensureChildIsMutable();
+ child_.addAll(other.child_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.child_.isEmpty()) {
+ if (childBuilder_.isEmpty()) {
+ childBuilder_.dispose();
+ childBuilder_ = null;
+ child_ = other.child_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ childBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ getChildFieldBuilder() : null;
+ } else {
+ childBuilder_.addAllMessages(other.child_);
+ }
+ }
+ }
+ if (other.hasValue()) {
+ bitField0_ |= 0x00000010;
+ value_ = other.value_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasPath()) {
+
+ return false;
+ }
+ for (int i = 0; i < getAttributesCount(); i++) {
+ if (!getAttributes(i).isInitialized()) {
+
+ return false;
+ }
+ }
+ for (int i = 0; i < getChildCount(); i++) {
+ if (!getChild(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.common.NormalizedNodeMessages.Node parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // required string path = 1;
+ private java.lang.Object path_ = "";
+ /**
+ * <code>required string path = 1;</code>
+ */
+ public boolean hasPath() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>required string path = 1;</code>
+ */
+ 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;
+ }
+ }
+ /**
+ * <code>required string path = 1;</code>
+ */
+ 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;
+ }
+ }
+ /**
+ * <code>required string path = 1;</code>
+ */
+ public Builder setPath(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ path_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required string path = 1;</code>
+ */
+ public Builder clearPath() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ path_ = getDefaultInstance().getPath();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required string path = 1;</code>
+ */
+ public Builder setPathBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ path_ = value;
+ onChanged();
+ return this;
+ }
+
+ // optional string type = 2;
+ private java.lang.Object type_ = "";
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ 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;
+ }
+ }
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ 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;
+ }
+ }
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ public Builder setType(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ type_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ public Builder clearType() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ type_ = getDefaultInstance().getType();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string type = 2;</code>
+ */
+ public Builder setTypeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ type_ = value;
+ onChanged();
+ return this;
+ }
+
+ // repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;
+ private java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute> attributes_ =
+ java.util.Collections.emptyList();
+ private void ensureAttributesIsMutable() {
+ if (!((bitField0_ & 0x00000004) == 0x00000004)) {
+ attributes_ = new java.util.ArrayList<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute>(attributes_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder> attributesBuilder_;
+
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute> getAttributesList() {
+ if (attributesBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(attributes_);
+ } else {
+ return attributesBuilder_.getMessageList();
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public int getAttributesCount() {
+ if (attributesBuilder_ == null) {
+ return attributes_.size();
+ } else {
+ return attributesBuilder_.getCount();
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute getAttributes(int index) {
+ if (attributesBuilder_ == null) {
+ return attributes_.get(index);
+ } else {
+ return attributesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public Builder setAttributes(
+ int index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute value) {
+ if (attributesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAttributesIsMutable();
+ attributes_.set(index, value);
+ onChanged();
+ } else {
+ attributesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public Builder setAttributes(
+ int index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder builderForValue) {
+ if (attributesBuilder_ == null) {
+ ensureAttributesIsMutable();
+ attributes_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ attributesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public Builder addAttributes(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute value) {
+ if (attributesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAttributesIsMutable();
+ attributes_.add(value);
+ onChanged();
+ } else {
+ attributesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public Builder addAttributes(
+ int index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute value) {
+ if (attributesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAttributesIsMutable();
+ attributes_.add(index, value);
+ onChanged();
+ } else {
+ attributesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public Builder addAttributes(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder builderForValue) {
+ if (attributesBuilder_ == null) {
+ ensureAttributesIsMutable();
+ attributes_.add(builderForValue.build());
+ onChanged();
+ } else {
+ attributesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public Builder addAttributes(
+ int index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder builderForValue) {
+ if (attributesBuilder_ == null) {
+ ensureAttributesIsMutable();
+ attributes_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ attributesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public Builder addAllAttributes(
+ java.lang.Iterable<? extends org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute> values) {
+ if (attributesBuilder_ == null) {
+ ensureAttributesIsMutable();
+ super.addAll(values, attributes_);
+ onChanged();
+ } else {
+ attributesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public Builder clearAttributes() {
+ if (attributesBuilder_ == null) {
+ attributes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ attributesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public Builder removeAttributes(int index) {
+ if (attributesBuilder_ == null) {
+ ensureAttributesIsMutable();
+ attributes_.remove(index);
+ onChanged();
+ } else {
+ attributesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder getAttributesBuilder(
+ int index) {
+ return getAttributesFieldBuilder().getBuilder(index);
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder getAttributesOrBuilder(
+ int index) {
+ if (attributesBuilder_ == null) {
+ return attributes_.get(index); } else {
+ return attributesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public java.util.List<? extends org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder>
+ getAttributesOrBuilderList() {
+ if (attributesBuilder_ != null) {
+ return attributesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(attributes_);
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder addAttributesBuilder() {
+ return getAttributesFieldBuilder().addBuilder(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder addAttributesBuilder(
+ int index) {
+ return getAttributesFieldBuilder().addBuilder(
+ index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Attribute attributes = 3;</code>
+ */
+ public java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder>
+ getAttributesBuilderList() {
+ return getAttributesFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder>
+ getAttributesFieldBuilder() {
+ if (attributesBuilder_ == null) {
+ attributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Attribute.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.AttributeOrBuilder>(
+ attributes_,
+ ((bitField0_ & 0x00000004) == 0x00000004),
+ getParentForChildren(),
+ isClean());
+ attributes_ = null;
+ }
+ return attributesBuilder_;
+ }
+
+ // repeated .org.opendaylight.controller.mdsal.Node child = 4;
+ private java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node> child_ =
+ java.util.Collections.emptyList();
+ private void ensureChildIsMutable() {
+ if (!((bitField0_ & 0x00000008) == 0x00000008)) {
+ child_ = new java.util.ArrayList<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node>(child_);
+ bitField0_ |= 0x00000008;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ 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> childBuilder_;
+
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node> getChildList() {
+ if (childBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(child_);
+ } else {
+ return childBuilder_.getMessageList();
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public int getChildCount() {
+ if (childBuilder_ == null) {
+ return child_.size();
+ } else {
+ return childBuilder_.getCount();
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getChild(int index) {
+ if (childBuilder_ == null) {
+ return child_.get(index);
+ } else {
+ return childBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public Builder setChild(
+ int index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) {
+ if (childBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureChildIsMutable();
+ child_.set(index, value);
+ onChanged();
+ } else {
+ childBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public Builder setChild(
+ int index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder builderForValue) {
+ if (childBuilder_ == null) {
+ ensureChildIsMutable();
+ child_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ childBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public Builder addChild(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) {
+ if (childBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureChildIsMutable();
+ child_.add(value);
+ onChanged();
+ } else {
+ childBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public Builder addChild(
+ int index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) {
+ if (childBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureChildIsMutable();
+ child_.add(index, value);
+ onChanged();
+ } else {
+ childBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public Builder addChild(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder builderForValue) {
+ if (childBuilder_ == null) {
+ ensureChildIsMutable();
+ child_.add(builderForValue.build());
+ onChanged();
+ } else {
+ childBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public Builder addChild(
+ int index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder builderForValue) {
+ if (childBuilder_ == null) {
+ ensureChildIsMutable();
+ child_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ childBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public Builder addAllChild(
+ java.lang.Iterable<? extends org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node> values) {
+ if (childBuilder_ == null) {
+ ensureChildIsMutable();
+ super.addAll(values, child_);
+ onChanged();
+ } else {
+ childBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public Builder clearChild() {
+ if (childBuilder_ == null) {
+ child_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ childBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public Builder removeChild(int index) {
+ if (childBuilder_ == null) {
+ ensureChildIsMutable();
+ child_.remove(index);
+ onChanged();
+ } else {
+ childBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder getChildBuilder(
+ int index) {
+ return getChildFieldBuilder().getBuilder(index);
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getChildOrBuilder(
+ int index) {
+ if (childBuilder_ == null) {
+ return child_.get(index); } else {
+ return childBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public java.util.List<? extends org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder>
+ getChildOrBuilderList() {
+ if (childBuilder_ != null) {
+ return childBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(child_);
+ }
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder addChildBuilder() {
+ return getChildFieldBuilder().addBuilder(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder addChildBuilder(
+ int index) {
+ return getChildFieldBuilder().addBuilder(
+ index, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .org.opendaylight.controller.mdsal.Node child = 4;</code>
+ */
+ public java.util.List<org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder>
+ getChildBuilderList() {
+ return getChildFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ 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>
+ getChildFieldBuilder() {
+ if (childBuilder_ == null) {
+ childBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ 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>(
+ child_,
+ ((bitField0_ & 0x00000008) == 0x00000008),
+ getParentForChildren(),
+ isClean());
+ child_ = null;
+ }
+ return childBuilder_;
+ }
+
+ // optional string value = 5;
+ private java.lang.Object value_ = "";
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ public boolean hasValue() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ value_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ public com.google.protobuf.ByteString
+ getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ public Builder setValue(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000010;
+ value_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ public Builder clearValue() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ value_ = getDefaultInstance().getValue();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string value = 5;</code>
+ */
+ public Builder setValueBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000010;
+ value_ = value;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.Node)
+ }
+
+ static {
+ defaultInstance = new Node(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.Node)
+ }
+
+ public interface ContainerOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // required string parentPath = 1;
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ boolean hasParentPath();
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ java.lang.String getParentPath();
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getParentPathBytes();
+
+ // required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ boolean hasNormalizedNode();
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getNormalizedNode();
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getNormalizedNodeOrBuilder();
+ }
+ /**
+ * Protobuf type {@code org.opendaylight.controller.mdsal.Container}
+ */
+ public static final class Container extends
+ com.google.protobuf.GeneratedMessage
+ implements ContainerOrBuilder {
+ // Use Container.newBuilder() to construct.
+ private Container(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private Container(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final Container defaultInstance;
+ public static Container getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public Container getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Container(
+ 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;
+ parentPath_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ subBuilder = normalizedNode_.toBuilder();
+ }
+ normalizedNode_ = input.readMessage(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(normalizedNode_);
+ normalizedNode_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000002;
+ 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.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Container_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Container_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container.class, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<Container> PARSER =
+ new com.google.protobuf.AbstractParser<Container>() {
+ public Container parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Container(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Container> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // required string parentPath = 1;
+ public static final int PARENTPATH_FIELD_NUMBER = 1;
+ private java.lang.Object parentPath_;
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ public boolean hasParentPath() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ public java.lang.String getParentPath() {
+ java.lang.Object ref = parentPath_;
+ 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()) {
+ parentPath_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getParentPathBytes() {
+ java.lang.Object ref = parentPath_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ parentPath_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;
+ public static final int NORMALIZEDNODE_FIELD_NUMBER = 2;
+ private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node normalizedNode_;
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public boolean hasNormalizedNode() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getNormalizedNode() {
+ return normalizedNode_;
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getNormalizedNodeOrBuilder() {
+ return normalizedNode_;
+ }
+
+ private void initFields() {
+ parentPath_ = "";
+ normalizedNode_ = 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 (!hasParentPath()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasNormalizedNode()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getNormalizedNode().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, getParentPathBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeMessage(2, normalizedNode_);
+ }
+ 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, getParentPathBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, normalizedNode_);
+ }
+ 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.common.NormalizedNodeMessages.Container parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container 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.common.NormalizedNodeMessages.Container parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container 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.common.NormalizedNodeMessages.Container parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container 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.common.NormalizedNodeMessages.Container parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container 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.common.NormalizedNodeMessages.Container parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container 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.common.NormalizedNodeMessages.Container 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.Container}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.ContainerOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Container_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Container_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container.class, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container.Builder.class);
+ }
+
+ // Construct using org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getNormalizedNodeFieldBuilder();
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ parentPath_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ if (normalizedNodeBuilder_ == null) {
+ normalizedNode_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance();
+ } else {
+ normalizedNodeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.internal_static_org_opendaylight_controller_mdsal_Container_descriptor;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container getDefaultInstanceForType() {
+ return org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container.getDefaultInstance();
+ }
+
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container build() {
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container buildPartial() {
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container result = new org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.parentPath_ = parentPath_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ if (normalizedNodeBuilder_ == null) {
+ result.normalizedNode_ = normalizedNode_;
+ } else {
+ result.normalizedNode_ = normalizedNodeBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container) {
+ return mergeFrom((org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container other) {
+ if (other == org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container.getDefaultInstance()) return this;
+ if (other.hasParentPath()) {
+ bitField0_ |= 0x00000001;
+ parentPath_ = other.parentPath_;
+ onChanged();
+ }
+ if (other.hasNormalizedNode()) {
+ mergeNormalizedNode(other.getNormalizedNode());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasParentPath()) {
+
+ return false;
+ }
+ if (!hasNormalizedNode()) {
+
+ return false;
+ }
+ if (!getNormalizedNode().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.common.NormalizedNodeMessages.Container parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Container) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // required string parentPath = 1;
+ private java.lang.Object parentPath_ = "";
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ public boolean hasParentPath() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ public java.lang.String getParentPath() {
+ java.lang.Object ref = parentPath_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ parentPath_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getParentPathBytes() {
+ java.lang.Object ref = parentPath_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ parentPath_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ public Builder setParentPath(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ parentPath_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ public Builder clearParentPath() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ parentPath_ = getDefaultInstance().getParentPath();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required string parentPath = 1;</code>
+ */
+ public Builder setParentPathBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ parentPath_ = value;
+ onChanged();
+ return this;
+ }
+
+ // required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;
+ private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node normalizedNode_ = 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> normalizedNodeBuilder_;
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public boolean hasNormalizedNode() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getNormalizedNode() {
+ if (normalizedNodeBuilder_ == null) {
+ return normalizedNode_;
+ } else {
+ return normalizedNodeBuilder_.getMessage();
+ }
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public Builder setNormalizedNode(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) {
+ if (normalizedNodeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ normalizedNode_ = value;
+ onChanged();
+ } else {
+ normalizedNodeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public Builder setNormalizedNode(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder builderForValue) {
+ if (normalizedNodeBuilder_ == null) {
+ normalizedNode_ = builderForValue.build();
+ onChanged();
+ } else {
+ normalizedNodeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public Builder mergeNormalizedNode(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) {
+ if (normalizedNodeBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) == 0x00000002) &&
+ normalizedNode_ != org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance()) {
+ normalizedNode_ =
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.newBuilder(normalizedNode_).mergeFrom(value).buildPartial();
+ } else {
+ normalizedNode_ = value;
+ }
+ onChanged();
+ } else {
+ normalizedNodeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public Builder clearNormalizedNode() {
+ if (normalizedNodeBuilder_ == null) {
+ normalizedNode_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance();
+ onChanged();
+ } else {
+ normalizedNodeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder getNormalizedNodeBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getNormalizedNodeFieldBuilder().getBuilder();
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getNormalizedNodeOrBuilder() {
+ if (normalizedNodeBuilder_ != null) {
+ return normalizedNodeBuilder_.getMessageOrBuilder();
+ } else {
+ return normalizedNode_;
+ }
+ }
+ /**
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
+ */
+ 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>
+ getNormalizedNodeFieldBuilder() {
+ if (normalizedNodeBuilder_ == null) {
+ normalizedNodeBuilder_ = 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>(
+ normalizedNode_,
+ getParentForChildren(),
+ isClean());
+ normalizedNode_ = null;
+ }
+ return normalizedNodeBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.Container)
+ }
+
+ static {
+ defaultInstance = new Container(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.Container)
+ }
+
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_Attribute_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_Attribute_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_Node_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_Node_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_opendaylight_controller_mdsal_Container_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_opendaylight_controller_mdsal_Container_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\014Common.proto\022!org.opendaylight.control" +
+ "ler.mdsal\"(\n\tAttribute\022\014\n\004name\030\001 \002(\t\022\r\n\005" +
+ "value\030\002 \001(\t\"\253\001\n\004Node\022\014\n\004path\030\001 \002(\t\022\014\n\004ty" +
+ "pe\030\002 \001(\t\022@\n\nattributes\030\003 \003(\0132,.org.opend" +
+ "aylight.controller.mdsal.Attribute\0226\n\005ch" +
+ "ild\030\004 \003(\0132\'.org.opendaylight.controller." +
+ "mdsal.Node\022\r\n\005value\030\005 \001(\t\"`\n\tContainer\022\022" +
+ "\n\nparentPath\030\001 \002(\t\022?\n\016normalizedNode\030\002 \002" +
+ "(\0132\'.org.opendaylight.controller.mdsal.N" +
+ "odeBO\n5org.opendaylight.controller.proto",
+ "buff.messages.commonB\026NormalizedNodeMess" +
+ "ages"
+ };
+ 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_Attribute_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_org_opendaylight_controller_mdsal_Attribute_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_Attribute_descriptor,
+ new java.lang.String[] { "Name", "Value", });
+ internal_static_org_opendaylight_controller_mdsal_Node_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_org_opendaylight_controller_mdsal_Node_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_Node_descriptor,
+ new java.lang.String[] { "Path", "Type", "Attributes", "Child", "Value", });
+ internal_static_org_opendaylight_controller_mdsal_Container_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_org_opendaylight_controller_mdsal_Container_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_opendaylight_controller_mdsal_Container_descriptor,
+ new java.lang.String[] { "ParentPath", "NormalizedNode", });
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
com.google.protobuf.ByteString
getInstanceIdentifierPathArgumentsBytes(int index);
- // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;
+ // required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- boolean hasNormalizedNodeXml();
+ boolean hasNormalizedNode();
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml();
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getNormalizedNode();
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder();
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getNormalizedNodeOrBuilder();
}
/**
* Protobuf type {@code org.opendaylight.controller.mdsal.DataChanged}
break;
}
case 18: {
- org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder subBuilder = null;
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
- subBuilder = normalizedNodeXml_.toBuilder();
+ subBuilder = normalizedNode_.toBuilder();
}
- normalizedNodeXml_ = input.readMessage(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.PARSER, extensionRegistry);
+ normalizedNode_ = input.readMessage(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.PARSER, extensionRegistry);
if (subBuilder != null) {
- subBuilder.mergeFrom(normalizedNodeXml_);
- normalizedNodeXml_ = subBuilder.buildPartial();
+ subBuilder.mergeFrom(normalizedNode_);
+ normalizedNode_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
return instanceIdentifierPathArguments_.getByteString(index);
}
- // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;
- public static final int NORMALIZEDNODEXML_FIELD_NUMBER = 2;
- private org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml_;
+ // required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;
+ public static final int NORMALIZEDNODE_FIELD_NUMBER = 2;
+ private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node normalizedNode_;
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- public boolean hasNormalizedNodeXml() {
+ public boolean hasNormalizedNode() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml() {
- return normalizedNodeXml_;
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getNormalizedNode() {
+ return normalizedNode_;
}
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder() {
- return normalizedNodeXml_;
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.NodeOrBuilder getNormalizedNodeOrBuilder() {
+ return normalizedNode_;
}
private void initFields() {
instanceIdentifierPathArguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- normalizedNodeXml_ = org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance();
+ normalizedNode_ = 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 (!hasNormalizedNodeXml()) {
+ if (!hasNormalizedNode()) {
memoizedIsInitialized = 0;
return false;
}
- if (!getNormalizedNodeXml().isInitialized()) {
+ if (!getNormalizedNode().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
output.writeBytes(1, instanceIdentifierPathArguments_.getByteString(i));
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeMessage(2, normalizedNodeXml_);
+ output.writeMessage(2, normalizedNode_);
}
getUnknownFields().writeTo(output);
}
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, normalizedNodeXml_);
+ .computeMessageSize(2, normalizedNode_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- getNormalizedNodeXmlFieldBuilder();
+ getNormalizedNodeFieldBuilder();
}
}
private static Builder create() {
super.clear();
instanceIdentifierPathArguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
- if (normalizedNodeXmlBuilder_ == null) {
- normalizedNodeXml_ = org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance();
+ if (normalizedNodeBuilder_ == null) {
+ normalizedNode_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance();
} else {
- normalizedNodeXmlBuilder_.clear();
+ normalizedNodeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000001;
}
- if (normalizedNodeXmlBuilder_ == null) {
- result.normalizedNodeXml_ = normalizedNodeXml_;
+ if (normalizedNodeBuilder_ == null) {
+ result.normalizedNode_ = normalizedNode_;
} else {
- result.normalizedNodeXml_ = normalizedNodeXmlBuilder_.build();
+ result.normalizedNode_ = normalizedNodeBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
}
onChanged();
}
- if (other.hasNormalizedNodeXml()) {
- mergeNormalizedNodeXml(other.getNormalizedNodeXml());
+ if (other.hasNormalizedNode()) {
+ mergeNormalizedNode(other.getNormalizedNode());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
- if (!hasNormalizedNodeXml()) {
+ if (!hasNormalizedNode()) {
return false;
}
- if (!getNormalizedNodeXml().isInitialized()) {
+ if (!getNormalizedNode().isInitialized()) {
return false;
}
return this;
}
- // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;
- private org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml_ = org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance();
+ // required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;
+ private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node normalizedNode_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
- org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder> normalizedNodeXmlBuilder_;
+ 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> normalizedNodeBuilder_;
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- public boolean hasNormalizedNodeXml() {
+ public boolean hasNormalizedNode() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml() {
- if (normalizedNodeXmlBuilder_ == null) {
- return normalizedNodeXml_;
+ public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node getNormalizedNode() {
+ if (normalizedNodeBuilder_ == null) {
+ return normalizedNode_;
} else {
- return normalizedNodeXmlBuilder_.getMessage();
+ return normalizedNodeBuilder_.getMessage();
}
}
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- public Builder setNormalizedNodeXml(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) {
- if (normalizedNodeXmlBuilder_ == null) {
+ public Builder setNormalizedNode(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) {
+ if (normalizedNodeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
- normalizedNodeXml_ = value;
+ normalizedNode_ = value;
onChanged();
} else {
- normalizedNodeXmlBuilder_.setMessage(value);
+ normalizedNodeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- public Builder setNormalizedNodeXml(
- org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder builderForValue) {
- if (normalizedNodeXmlBuilder_ == null) {
- normalizedNodeXml_ = builderForValue.build();
+ public Builder setNormalizedNode(
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.Builder builderForValue) {
+ if (normalizedNodeBuilder_ == null) {
+ normalizedNode_ = builderForValue.build();
onChanged();
} else {
- normalizedNodeXmlBuilder_.setMessage(builderForValue.build());
+ normalizedNodeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>
*/
- public Builder mergeNormalizedNodeXml(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) {
- if (normalizedNodeXmlBuilder_ == null) {
+ public Builder mergeNormalizedNode(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node value) {
+ if (normalizedNodeBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
- normalizedNodeXml_ != org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance()) {
- normalizedNodeXml_ =
- org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.newBuilder(normalizedNodeXml_).mergeFrom(value).buildPartial();
+ normalizedNode_ != org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.getDefaultInstance()) {
+ normalizedNode_ =
+ org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.Node.newBuilder(normalizedNode_).mergeFrom(value).buildPartial();
} else {
- normalizedNodeXml_ = value;
+ normalizedNode_ = value;
}
onChanged();
} else {
- normalizedNodeXmlBuilder_.mergeFrom(value);
+ normalizedNodeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
- * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
+ * <code>required .org.opendaylight.controller.mdsal.Node normalizedNode = 2;</code>