sort out signature of extraceField method
[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 java.io.Serializable;
12 import java.util.Iterator;
13 import java.util.List;
14 import javax.xml.bind.annotation.XmlAccessType;
15 import javax.xml.bind.annotation.XmlAccessorType;
16 import javax.xml.bind.annotation.XmlElement;
17 import javax.xml.bind.annotation.XmlRootElement;
18
19 @XmlRootElement
20 @XmlAccessorType(XmlAccessType.NONE)
21 public class NeutronQosDscpMarkingRule extends NeutronObject<NeutronQosDscpMarkingRule>
22         implements Serializable, INeutronObject<NeutronQosDscpMarkingRule> {
23     private static final long serialVersionUID = 1L;
24
25     @XmlElement(name = "dscp_mark")
26     Short dscpMark;
27
28     public Short getDscpMark() {
29         return dscpMark;
30     }
31
32     public void setDscpMark(Short dscpMark) {
33         this.dscpMark = dscpMark;
34     }
35
36     public NeutronQosDscpMarkingRule extractFields(List<String> fields) {
37         NeutronQosDscpMarkingRule ans = new NeutronQosDscpMarkingRule();
38         Iterator<String> i = fields.iterator();
39         while (i.hasNext()) {
40             String s = i.next();
41             if (s.equals("id")) {
42                 ans.setID(this.getID());
43             }
44             if (s.equals("tenant_id")) {
45                 ans.setTenantID(this.getTenantID());
46             }
47             if (s.equals("dscp_mark")) {
48                 ans.setDscpMark(this.getDscpMark());
49             }
50         }
51         return ans;
52     }
53
54     @Override
55     public String toString() {
56         return "qosDscpRules{" + "qosDscpRuleUUID='" + uuid + '\'' + ", qosDscpRuleTenantID='" + tenantID + '\''
57                 + ", qosDscpRuleDscpMark='" + dscpMark + '\'' + '}';
58     }
59 }