Checkstyle formatting issues fix (Northbound API)
[neutron.git] / northbound-api / src / main / java / org / opendaylight / neutron / northbound / api / NeutronL2gatewayRequest.java
1 /*
2  * Copyright (c) 2015 Hewlett-Packard Development Company, L.P. 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.neutron.northbound.api;
10
11 import java.util.List;
12 import javax.xml.bind.annotation.XmlElement;
13 import org.opendaylight.neutron.spi.NeutronL2gateway;
14
15 public class NeutronL2gatewayRequest implements INeutronRequest<NeutronL2gateway> {
16
17     @XmlElement(name = "l2_gateway")
18     NeutronL2gateway singletonL2gateway;
19
20     @XmlElement(name = "l2_gateways")
21     List<NeutronL2gateway> bulkRequest;
22
23     NeutronL2gatewayRequest() {
24     }
25
26     NeutronL2gatewayRequest(NeutronL2gateway l2gateway) {
27         this.singletonL2gateway = l2gateway;
28     }
29
30     NeutronL2gatewayRequest(List<NeutronL2gateway> bulk) {
31         bulkRequest = bulk;
32         singletonL2gateway = null;
33     }
34
35     @Override
36     public boolean isSingleton() {
37         return (singletonL2gateway != null);
38     }
39
40     @Override
41     public NeutronL2gateway getSingleton() {
42         return singletonL2gateway;
43     }
44
45     @Override
46     public List<NeutronL2gateway> getBulk() {
47         return bulkRequest;
48     }
49
50 }