package org.opendaylight.neutron.spi;
import java.io.Serializable;
-import java.util.Iterator;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public class NeutronSFCPortPairGroup extends NeutronObject<NeutronSFCPortPairGroup>
- implements Serializable, INeutronObject<NeutronSFCPortPairGroup> {
+public final class NeutronSFCPortPairGroup extends NeutronBaseAttributes<NeutronSFCPortPairGroup>
+ implements Serializable {
private static final long serialVersionUID = 1L;
// See OpenStack Networking SFC (networking-sfc) Port Pair Group API v1.0
// Reference for description of annotated attributes
- @XmlElement(name = "name")
- String name;
-
@XmlElement(name = "port_pairs")
List<String> portPairs;
public NeutronSFCPortPairGroup() {
}
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
public List<String> getPortPairs() {
return portPairs;
}
public NeutronSFCPortPairGroup extractFields(List<String> fields) {
NeutronSFCPortPairGroup ans = new NeutronSFCPortPairGroup();
- Iterator<String> i = fields.iterator();
- while (i.hasNext()) {
- String s = i.next();
- if (s.equals("id")) {
- ans.setID(this.getID());
- }
- if (s.equals("tenant_id")) {
- ans.setTenantID(this.getTenantID());
- }
- if (s.equals("name")) {
- ans.setName(this.getName());
- }
+ for (String s : fields) {
+ extractField(s, ans);
if (s.equals("port_pairs")) {
ans.setPortPairs(this.getPortPairs());
}