Revert "BUG-47 : unfinished PCEP migration to generated DTOs."
[bgpcep.git] / pcep / api / src / main / java / org / opendaylight / protocol / pcep / subobject / RROUnnumberedInterfaceSubobject.java
index c07ccd226dd8cfaf97684b5a37e43bc5012e50e6..9a96848a7ecf58a66bd95416516afe50d280112d 100644 (file)
@@ -9,87 +9,91 @@
 package org.opendaylight.protocol.pcep.subobject;
 
 import org.opendaylight.protocol.concepts.IPv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.UnnumberedSubobject;
+import org.opendaylight.protocol.pcep.concepts.UnnumberedInterfaceIdentifier;
 
 /**
  * Structure of unnumbered Iterface Subobject.
- * 
- * @see <a href="http://tools.ietf.org/html/rfc3477">Section 4: Signalling Unnumbered Links in EROs</a>
+ *
+ * @see <a href="http://tools.ietf.org/html/rfc3477">Section 4: Signalling
+ *      Unnumbered Links in EROs</a>
  */
 public class RROUnnumberedInterfaceSubobject extends ReportedRouteSubobject {
-       private final UnnumberedSubobject interfaceID;
-       private final IPv4Address routerID;
+    private final UnnumberedInterfaceIdentifier interfaceID;
+    private final IPv4Address routerID;
 
-       /**
-        * Constructs new Unnumbered Interface Subobject.
-        * 
-        * @param routerID IPv4Address
-        * @param interfaceID UnnumberedInterfaceIdentifier
-        */
-       public RROUnnumberedInterfaceSubobject(final IPv4Address routerID, final UnnumberedSubobject interfaceID) {
-               super();
-               this.routerID = routerID;
-               this.interfaceID = interfaceID;
-       }
+    /**
+     * Constructs new Unnumbered Interface Subobject.
+     *
+     * @param routerID
+     *            IPv4Address
+     * @param interfaceID
+     *            UnnumberedInterfaceIdentifier
+     */
+    public RROUnnumberedInterfaceSubobject(final IPv4Address routerID, final UnnumberedInterfaceIdentifier interfaceID) {
+       super();
+       this.routerID = routerID;
+       this.interfaceID = interfaceID;
+    }
 
-       /**
-        * Gets {@link IPv4Address} representation of router ID.
-        * 
-        * @return IPv4Address
-        */
-       public IPv4Address getRouterID() {
-               return this.routerID;
-       }
+    /**
+     * Gets {@link IPv4Address} representation of router ID.
+     *
+     * @return IPv4Address
+     */
+    public IPv4Address getRouterID() {
+       return this.routerID;
+    }
 
-       /**
-        * Gets {@link UnnumberedSubobject} representation of Interface ID.
-        * 
-        * @return UnnumberedSubobject
-        */
-       public UnnumberedSubobject getInterfaceID() {
-               return this.interfaceID;
-       }
+    /**
+     * Gets {@link UnnumberedInterfaceIdentifier} representation of Interface
+     * ID.
+     *
+     * @return UnnumberedInterfaceIdentifier
+     */
+    public UnnumberedInterfaceIdentifier getInterfaceID() {
+       return this.interfaceID;
+    }
 
-       @Override
-       public int hashCode() {
-               final int prime = 31;
-               int result = 1;
-               result = prime * result + ((this.interfaceID == null) ? 0 : this.interfaceID.hashCode());
-               result = prime * result + ((this.routerID == null) ? 0 : this.routerID.hashCode());
-               return result;
-       }
+    @Override
+    public int hashCode() {
+       final int prime = 31;
+       int result = 1;
+       result = prime * result + ((this.interfaceID == null) ? 0 : this.interfaceID.hashCode());
+       result = prime * result + ((this.routerID == null) ? 0 : this.routerID.hashCode());
+       return result;
+    }
 
-       @Override
-       public boolean equals(final Object obj) {
-               if (this == obj)
-                       return true;
-               if (obj == null)
-                       return false;
-               if (this.getClass() != obj.getClass())
-                       return false;
-               final RROUnnumberedInterfaceSubobject other = (RROUnnumberedInterfaceSubobject) obj;
-               if (this.interfaceID == null) {
-                       if (other.interfaceID != null)
-                               return false;
-               } else if (!this.interfaceID.equals(other.interfaceID))
-                       return false;
-               if (this.routerID == null) {
-                       if (other.routerID != null)
-                               return false;
-               } else if (!this.routerID.equals(other.routerID))
-                       return false;
-               return true;
-       }
+    @Override
+    public boolean equals(Object obj) {
+       if (this == obj)
+           return true;
+       if (obj == null)
+           return false;
+       if (this.getClass() != obj.getClass())
+           return false;
+       final RROUnnumberedInterfaceSubobject other = (RROUnnumberedInterfaceSubobject) obj;
+       if (this.interfaceID == null) {
+           if (other.interfaceID != null)
+               return false;
+       } else if (!this.interfaceID.equals(other.interfaceID))
+           return false;
+       if (this.routerID == null) {
+           if (other.routerID != null)
+               return false;
+       } else if (!this.routerID.equals(other.routerID))
+           return false;
+       return true;
+    }
 
-       @Override
-       public String toString() {
-               final StringBuilder builder = new StringBuilder();
-               builder.append("RROUnnumberedInterfaceSubobject [interfaceID=");
-               builder.append(this.interfaceID);
-               builder.append(", routerID=");
-               builder.append(this.routerID);
-               builder.append("]");
-               return builder.toString();
-       }
+    @Override
+    public String toString() {
+       final StringBuilder builder = new StringBuilder();
+       builder.append("RROUnnumberedInterfaceSubobject [interfaceID=");
+       builder.append(this.interfaceID);
+       builder.append(", routerID=");
+       builder.append(this.routerID);
+       builder.append("]");
+       return builder.toString();
+    }
 
 }