Stubpce Update
[transportpce.git] / tests / stubpce / src / main / java / org / opendaylight / transportpce / stubpce / topology / Path.java
1 /*
2  * Copyright © 2017 Orange, 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.transportpce.stubpce.topology;
10
11 import org.opendaylight.transportpce.stubpce.TpNodeTp;
12 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.Link;
13
14 /**
15  * Class to create structure
16  * TpNodeTp and link.
17  *
18  * @author <a href="mailto:martial.coulibaly@gfi.com">Martial Coulibaly</a> on
19  *         behalf of Orange
20  */
21 public class Path {
22     /** TpNodeTp. */
23     private TpNodeTp tpNodeTp;
24     /** Link at TpNodeTp. */
25     private Link link;
26
27     /**
28      *Path constructor.
29      *
30      * @param tpnodetp TpNodeTp
31      * @param link link at the end of TpNodeTp
32      */
33     public Path(TpNodeTp tpnodetp, Link link) {
34         setTpNodeTp(tpnodetp);
35         setLink(link);
36     }
37
38     public Path(TpNodeTp tpNodeTp) {
39         setTpNodeTp(tpNodeTp);
40     }
41
42     public TpNodeTp getTpNodeTp() {
43         return tpNodeTp;
44     }
45
46     public void setTpNodeTp(TpNodeTp tpNodeTp) {
47         this.tpNodeTp = tpNodeTp;
48     }
49
50     public Link getLink() {
51         return link;
52     }
53
54     public void setLink(Link link) {
55         this.link = link;
56     }
57
58     @Override
59     public String toString() {
60         java.lang.String name = "Path [";
61         java.lang.StringBuilder builder = new java.lang.StringBuilder(name);
62         if (tpNodeTp != null) {
63             builder.append("tpNodeTp= ");
64             builder.append(tpNodeTp);
65             builder.append(", ");
66         }
67         if (link != null) {
68             builder.append(link);
69         }
70         return builder.append(']').toString();
71     }
72 }