Fix FindBugs violations
[neutron.git] / neutron-spi / src / main / java / org / opendaylight / neutron / spi / NeutronTapService.java
1 /*
2  * Copyright (c) 2017 Intel Corporation.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.neutron.spi;
10
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;
15
16 @XmlRootElement
17 @XmlAccessorType(XmlAccessType.NONE)
18 public final class NeutronTapService extends NeutronBaseAttributes<NeutronTapService> {
19     private static final long serialVersionUID = 1L;
20
21     @XmlElement(name = "port_id")
22     String tapServicePortID;
23
24     public String getTapServicePortID() {
25         return tapServicePortID;
26     }
27
28     public void setTapServicePortID(String port) {
29         this.tapServicePortID = port;
30     }
31
32     @Override
33     protected boolean extractField(String field, NeutronTapService ans) {
34         switch (field) {
35             case "port_id":
36                 ans.setTapServicePortID(this.getTapServicePortID());
37                 break;
38             default:
39                 return super.extractField(field, ans);
40         }
41         return true;
42     }
43
44     @Override
45     public String toString() {
46         return "NeutronTapService[" + "tapServiceUUID='" + uuid + '\'' + ", tapServiceTenantID='"
47                 + tenantID + '\'' + ", tapServiceName='" + name + '\'' + ", tapServicePortID='"
48                 + tapServicePortID + '\'' + ']';
49     }
50 }