2 * Copyright (c) 2016 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 java.util.List;
13 import javax.xml.bind.annotation.XmlAccessType;
14 import javax.xml.bind.annotation.XmlAccessorType;
15 import javax.xml.bind.annotation.XmlElement;
16 import javax.xml.bind.annotation.XmlRootElement;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
21 @XmlAccessorType(XmlAccessType.NONE)
22 public final class NeutronQosDscpMarkingRule extends NeutronObject<NeutronQosDscpMarkingRule>
23 implements Serializable, INeutronObject<NeutronQosDscpMarkingRule> {
24 private static final Logger LOGGER = LoggerFactory.getLogger(NeutronQosDscpMarkingRule.class);
25 private static final long serialVersionUID = 1L;
27 @XmlElement(name = "dscp_mark")
30 public Short getDscpMark() {
34 public void setDscpMark(Short dscpMark) {
35 this.dscpMark = dscpMark;
38 public NeutronQosDscpMarkingRule extractFields(List<String> fields) {
39 NeutronQosDscpMarkingRule ans = new NeutronQosDscpMarkingRule();
40 for (String s : fields) {
41 if (extractField(s, ans)) {
46 ans.setDscpMark(this.getDscpMark());
49 LOGGER.warn("{} is not a NeutronQosDscpMarkingRule suitable field.", s);
57 public String toString() {
58 return "qosDscpRules{" + "qosDscpRuleUUID='" + uuid + '\'' + ", qosDscpRuleTenantID='" + tenantID + '\''
59 + ", qosDscpRuleDscpMark='" + dscpMark + '\'' + '}';