2 * Copyright (c) 2017 Intel Corporation. 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
9 package org.opendaylight.neutron.spi;
11 import java.io.Serializable;
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 NeutronTapFlow extends NeutronBaseAttributes<NeutronTapFlow> implements Serializable {
20 private static final long serialVersionUID = 1L;
22 @XmlElement(name = "tap_service_id")
25 @XmlElement(name = "direction")
26 String tapFlowDirection;
28 @XmlElement(name = "source_port")
29 String tapFlowSourcePort;
31 public String getTapFlowServiceID() {
35 public void setTapFlowServiceID(String tapService) {
36 this.tapServiceID = tapService;
39 public String getTapFlowDirection() {
40 return tapFlowDirection;
43 public void setTapFlowDirection(String direction) {
44 this.tapFlowDirection = direction;
47 public String getTapFlowSourcePort() {
48 return tapFlowSourcePort;
51 public void setTapFlowSourcePort(String sourcePort) {
52 this.tapFlowSourcePort = sourcePort;
56 protected boolean extractField(String field, NeutronTapFlow ans) {
59 ans.setTapFlowSourcePort(this.getTapFlowSourcePort());
62 ans.setTapFlowDirection(this.getTapFlowDirection());
64 case "tap_service_id":
65 ans.setTapFlowServiceID(this.getTapFlowServiceID());
68 return super.extractField(field, ans);
74 public String toString() {
75 return "NeutronTapFlow[" + "tapFlowUUID='" + uuid + '\'' + ", tapFlowTenantID='" + tenantID + '\''
76 + ", tapFlowName='" + name + '\'' + ", tapFlowServiceID='" + tapServiceID + '\''
77 + ", tapFlowSourcePort='" + tapFlowSourcePort + '\''
78 + ", tapFlowDirection='" + tapFlowDirection + '\'' + ']';