Bug 3866: Support for Restconf HTTP Patch
[netconf.git] / opendaylight / restconf / sal-rest-connector / src / main / java / org / opendaylight / netconf / sal / restconf / impl / PATCHEntity.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.netconf.sal.restconf.impl;
10
11 import com.google.common.base.Preconditions;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14
15 public class PATCHEntity {
16
17     private final String operation;
18     private final String editId;
19     private final YangInstanceIdentifier targetNode;
20     private final NormalizedNode<?,?> node;
21
22     public PATCHEntity(final String editId, final String operation, final YangInstanceIdentifier targetNode, final
23     NormalizedNode<?, ?> node) {
24         this.editId = Preconditions.checkNotNull(editId);
25         this.operation = Preconditions.checkNotNull(operation);
26         this.targetNode = Preconditions.checkNotNull(targetNode);
27         this.node = Preconditions.checkNotNull(node);
28     }
29
30     public String getOperation() {
31         return operation;
32     }
33
34     public String getEditId() {
35         return editId;
36     }
37
38     public YangInstanceIdentifier getTargetNode() {
39         return targetNode;
40     }
41
42     public NormalizedNode<?, ?> getNode() {
43         return node;
44     }
45
46 }