1fcc9a9e912b25d0912a3ed99b3253d599e615ba
[controller.git] / opendaylight / northbound / networkconfiguration / neutron / src / main / java / org / opendaylight / controller / networkconfig / neutron / northbound / NeutronRouterRequest.java
1 /*\r
2  * Copyright IBM Corporation, 2013.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 \r
9 package org.opendaylight.controller.networkconfig.neutron.northbound;\r
10 \r
11 import java.util.List;\r
12 \r
13 import javax.xml.bind.annotation.XmlAccessType;\r
14 import javax.xml.bind.annotation.XmlAccessorType;\r
15 import javax.xml.bind.annotation.XmlElement;\r
16 import javax.xml.bind.annotation.XmlRootElement;\r
17 \r
18 import org.opendaylight.controller.networkconfig.neutron.NeutronRouter;\r
19 \r
20 \r
21 @XmlRootElement\r
22 @XmlAccessorType(XmlAccessType.NONE)\r
23 \r
24 public class NeutronRouterRequest {\r
25     // See OpenStack Network API v2.0 Reference for description of\r
26     // annotated attributes\r
27 \r
28     @XmlElement(name="router")\r
29     NeutronRouter singletonRouter;\r
30 \r
31     @XmlElement(name="routers")\r
32     List<NeutronRouter> bulkRequest;\r
33 \r
34     NeutronRouterRequest() {\r
35     }\r
36 \r
37     NeutronRouterRequest(List<NeutronRouter> bulk) {\r
38         bulkRequest = bulk;\r
39         singletonRouter = null;\r
40     }\r
41 \r
42     NeutronRouterRequest(NeutronRouter router) {\r
43         singletonRouter = router;\r
44     }\r
45 \r
46     public List<NeutronRouter> getBulk() {\r
47         return bulkRequest;\r
48     }\r
49 \r
50     public NeutronRouter getSingleton() {\r
51         return singletonRouter;\r
52     }\r
53 \r
54     public boolean isSingleton() {\r
55         return (singletonRouter != null);\r
56     }\r
57 }\r