package org.opendaylight.neutron.northbound.api;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.List;
-
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-
import org.opendaylight.neutron.spi.NeutronRouter;
-
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-
-public class NeutronRouterRequest
- implements INeutronRequest<NeutronRouter> {
+@SuppressFBWarnings("URF_UNREAD_FIELD")
+public final class NeutronRouterRequest extends NeutronRequest<NeutronRouter> {
// See OpenStack Network API v2.0 Reference for description of
// annotated attributes
- @XmlElement(name="router")
- NeutronRouter singletonRouter;
+ @XmlElement(name = "router")
+ NeutronRouter singleton;
- @XmlElement(name="routers")
+ @XmlElement(name = "routers")
List<NeutronRouter> bulkRequest;
NeutronRouterRequest() {
NeutronRouterRequest(List<NeutronRouter> bulk) {
bulkRequest = bulk;
- singletonRouter = null;
}
NeutronRouterRequest(NeutronRouter router) {
- singletonRouter = router;
- }
-
- @Override
- public List<NeutronRouter> getBulk() {
- return bulkRequest;
- }
-
- @Override
- public NeutronRouter getSingleton() {
- return singletonRouter;
- }
-
- @Override
- public boolean isSingleton() {
- return (singletonRouter != null);
+ singleton = router;
}
}