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 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;
17 @XmlAccessorType(XmlAccessType.NONE)
18 public final class NeutronTapFlow extends NeutronBaseAttributes<NeutronTapFlow> {
19 private static final long serialVersionUID = 1L;
21 @XmlElement(name = "tap_service_id")
24 @XmlElement(name = "direction")
25 String tapFlowDirection;
27 @XmlElement(name = "source_port")
28 String tapFlowSourcePort;
30 public String getTapFlowServiceID() {
34 public void setTapFlowServiceID(String tapService) {
35 this.tapServiceID = tapService;
38 public String getTapFlowDirection() {
39 return tapFlowDirection;
42 public void setTapFlowDirection(String direction) {
43 this.tapFlowDirection = direction;
46 public String getTapFlowSourcePort() {
47 return tapFlowSourcePort;
50 public void setTapFlowSourcePort(String sourcePort) {
51 this.tapFlowSourcePort = sourcePort;
55 protected boolean extractField(String field, NeutronTapFlow ans) {
58 ans.setTapFlowSourcePort(this.getTapFlowSourcePort());
61 ans.setTapFlowDirection(this.getTapFlowDirection());
63 case "tap_service_id":
64 ans.setTapFlowServiceID(this.getTapFlowServiceID());
67 return super.extractField(field, ans);
73 public String toString() {
74 return "NeutronTapFlow[" + "tapFlowUUID='" + uuid + '\'' + ", tapFlowTenantID='" + tenantID + '\''
75 + ", tapFlowName='" + name + '\'' + ", tapFlowServiceID='" + tapServiceID + '\''
76 + ", tapFlowSourcePort='" + tapFlowSourcePort + '\''
77 + ", tapFlowDirection='" + tapFlowDirection + '\'' + ']';