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;
13 import javax.xml.bind.annotation.XmlAccessType;
14 import javax.xml.bind.annotation.XmlAccessorType;
15 import javax.xml.bind.annotation.XmlElement;
16 import javax.xml.bind.annotation.XmlRootElement;
17 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
20 @XmlAccessorType(XmlAccessType.NONE)
21 public final class NeutronSFCPortChain extends NeutronBaseAttributes<NeutronSFCPortChain> implements Serializable {
22 private static final long serialVersionUID = 1L;
24 // See OpenStack Networking SFC (networking-sfc) Port Chain API v1.0 Reference
25 // for description of annotated attributes
27 @XmlElement(name = "port_pair_groups")
28 List<String> portPairGroupsUUID;
30 @XmlElement(name = "flow_classifiers")
31 List<String> flowClassifiersUUID;
33 @XmlElement(name = "chain_parameters")
34 @XmlJavaTypeAdapter(NeutronResourceMapPropertyAdapter.class)
35 Map<String, String> chainParameters;
37 public NeutronSFCPortChain() {
40 public List<String> getPortPairGroupsUUID() {
41 return portPairGroupsUUID;
44 public void setPortPairGroupsUUID(List<String> portPairGroupsUUID) {
45 this.portPairGroupsUUID = portPairGroupsUUID;
48 public List<String> getFlowClassifiersUUID() {
49 return flowClassifiersUUID;
52 public void setFlowClassifiersUUID(List<String> flowClassifiersUUID) {
53 this.flowClassifiersUUID = flowClassifiersUUID;
56 public Map<String, String> getChainParameters() {
57 return chainParameters;
60 public void setChainParameters(Map<String, String> chainParameters) {
61 this.chainParameters = chainParameters;
65 protected boolean extractField(String field, NeutronSFCPortChain ans) {
67 case "port_pair_groups":
68 ans.setPortPairGroupsUUID(this.getPortPairGroupsUUID());
70 case "flow_classifiers":
71 ans.setFlowClassifiersUUID(this.getFlowClassifiersUUID());
73 case "chain_parameters":
74 ans.setChainParameters(this.getChainParameters());
77 return super.extractField(field, ans);
83 public String toString() {
84 return "NeutronSFCPortChain[" + "tenantID='" + tenantID + '\'' + ", name='" + name + '\''
85 + ", portPairGroupsUUID=" + portPairGroupsUUID + ", flowClassifiersUUID='" + flowClassifiersUUID + '\''
86 + ", chainParameters=" + chainParameters + ']';