Checkstyle Import issues fix (SPI tests,Northbound API)
[neutron.git] / northbound-api / src / main / java / org / opendaylight / neutron / northbound / api / NeutronSFCPortPairRequest.java
1 /*
2  * Copyright (c) 2016 Brocade Communications Systems, 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 package org.opendaylight.neutron.northbound.api;
9
10 import java.util.List;
11 import javax.xml.bind.annotation.XmlAccessType;
12 import javax.xml.bind.annotation.XmlAccessorType;
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlRootElement;
15 import org.opendaylight.neutron.spi.NeutronSFCPortPair;
16
17 @XmlRootElement
18 @XmlAccessorType(XmlAccessType.NONE)
19
20 public class NeutronSFCPortPairRequest  implements INeutronRequest<NeutronSFCPortPair> {
21     // See OpenStack Networking SFC (networking-sfc) Port Pair API v1.0 Reference
22     // for description of annotated attributes
23
24     @XmlElement(name="portpair")
25     NeutronSFCPortPair singletonPortPair;
26
27     @XmlElement(name="portpairs")
28     List<NeutronSFCPortPair> bulkRequest;
29
30     NeutronSFCPortPairRequest() {
31     }
32
33     NeutronSFCPortPairRequest(List<NeutronSFCPortPair> bulkRequest) {
34         this.bulkRequest = bulkRequest;
35         this.singletonPortPair = null;
36     }
37
38     NeutronSFCPortPairRequest(NeutronSFCPortPair sfcPortPair) {
39         this.singletonPortPair = sfcPortPair;
40     }
41
42     @Override
43     public NeutronSFCPortPair getSingleton() {
44         return this.singletonPortPair;
45     }
46
47     @Override
48     public boolean isSingleton() {
49         return singletonPortPair != null;
50     }
51
52     @Override
53     public List<NeutronSFCPortPair> getBulk() {
54         return this.bulkRequest;
55     }
56 }