2 * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.neutron.northbound.api;
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;
18 @XmlAccessorType(XmlAccessType.NONE)
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
24 @XmlElement(name="portpair")
25 NeutronSFCPortPair singletonPortPair;
27 @XmlElement(name="portpairs")
28 List<NeutronSFCPortPair> bulkRequest;
30 NeutronSFCPortPairRequest() {
33 NeutronSFCPortPairRequest(List<NeutronSFCPortPair> bulkRequest) {
34 this.bulkRequest = bulkRequest;
35 this.singletonPortPair = null;
38 NeutronSFCPortPairRequest(NeutronSFCPortPair sfcPortPair) {
39 this.singletonPortPair = sfcPortPair;
43 public NeutronSFCPortPair getSingleton() {
44 return this.singletonPortPair;
48 public boolean isSingleton() {
49 return singletonPortPair != null;
53 public List<NeutronSFCPortPair> getBulk() {
54 return this.bulkRequest;