Fix FindBugs violations
[neutron.git] / neutron-spi / src / main / java / org / opendaylight / neutron / spi / NeutronQosDscpMarkingRule.java
1 /*
2  * Copyright (c) 2016 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 NeutronQosDscpMarkingRule extends NeutronObject<NeutronQosDscpMarkingRule> {
19     private static final long serialVersionUID = 1L;
20
21     @XmlElement(name = "dscp_mark")
22     Short dscpMark;
23
24     public Short getDscpMark() {
25         return dscpMark;
26     }
27
28     public void setDscpMark(Short dscpMark) {
29         this.dscpMark = dscpMark;
30     }
31
32     @Override
33     protected boolean extractField(String field, NeutronQosDscpMarkingRule ans) {
34         switch (field) {
35             case "dscp_mark":
36                 ans.setDscpMark(this.getDscpMark());
37                 break;
38             default:
39                 return super.extractField(field, ans);
40         }
41         return true;
42     }
43
44     @Override
45     public String toString() {
46         return "qosDscpMarkingRules{" + "qosDscpMarkingRuleUUID='" + uuid + '\'' + ", qosDscpMarkingRuleTenantID='"
47             + tenantID + '\'' + ", qosDscpMarkingRuleDscpMark='" + dscpMark
48             + '\''
49             + '}';
50     }
51 }