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.spi;
10 import java.io.Serializable;
11 import java.util.List;
12 import javax.xml.bind.annotation.XmlAccessType;
13 import javax.xml.bind.annotation.XmlAccessorType;
14 import javax.xml.bind.annotation.XmlElement;
15 import javax.xml.bind.annotation.XmlRootElement;
18 @XmlAccessorType(XmlAccessType.NONE)
19 public final class NeutronSFCPortPairGroup extends NeutronBaseAttributes<NeutronSFCPortPairGroup>
20 implements Serializable {
21 private static final long serialVersionUID = 1L;
23 // See OpenStack Networking SFC (networking-sfc) Port Pair Group API v1.0
24 // Reference for description of annotated attributes
26 @XmlElement(name = "port_pairs")
27 List<String> portPairs;
29 public NeutronSFCPortPairGroup() {
32 public List<String> getPortPairs() {
36 public void setPortPairs(List<String> portPairs) {
37 this.portPairs = portPairs;
41 * This method copies selected fields from the object and returns them
42 * as a new object, suitable for marshaling.
44 * @param fields List of attributes to be extracted
45 * @return an OpenStack Neutron SFC Port Pair Group object with only the selected fields
49 public NeutronSFCPortPairGroup extractFields(List<String> fields) {
50 NeutronSFCPortPairGroup ans = new NeutronSFCPortPairGroup();
51 for (String s : fields) {
53 if (s.equals("port_pairs")) {
54 ans.setPortPairs(this.getPortPairs());
61 public String toString() {
62 return "NeutronSFCPortPairGroup[" + "tenantID='" + tenantID + '\'' + ", name='" + name + '\'' + ", portPairs="