2 * Copyright (c) 2016, 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 java.math.BigInteger;
12 import javax.xml.bind.annotation.XmlAccessType;
13 import javax.xml.bind.annotation.XmlAccessorType;
14 import javax.xml.bind.annotation.XmlElement;
15 import javax.xml.bind.annotation.XmlRootElement;
18 @XmlAccessorType(XmlAccessType.NONE)
19 public final class NeutronQosBandwidthLimitRule extends NeutronObject<NeutronQosBandwidthLimitRule> {
20 private static final long serialVersionUID = 1L;
22 @XmlElement(name = "max_kbps")
25 @XmlElement(name = "max_burst_kbps")
26 BigInteger maxBurstKbps;
28 @XmlElement(defaultValue = "egress", name = "direction")
31 public BigInteger getMaxKbps() {
35 public void setMaxKbps(BigInteger maxKbps) {
36 this.maxKbps = maxKbps;
39 public BigInteger getMaxBurstKbps() {
43 public void setMaxBurstKbps(BigInteger maxBurstKbps) {
44 this.maxBurstKbps = maxBurstKbps;
47 public String getDirection() {
51 public void setDirection(String direction) {
52 this.direction = direction;
56 public boolean extractField(String field, NeutronQosBandwidthLimitRule ans) {
59 ans.setMaxKbps(this.getMaxKbps());
61 case "max_burst_kbps":
62 ans.setMaxBurstKbps(this.getMaxBurstKbps());
65 ans.setDirection(this.getDirection());
68 return super.extractField(field, ans);
74 public String toString() {
75 return "qosBandwidthLimitRules{" + "qosBandwidthLimitRuleUUID='" + uuid + '\''
76 + ", qosBandwidthLimitRuleTenantID='" + getTenantID() + '\'' + ", qosBandwidthLimitRuleMaxValue='" + maxKbps
77 + '\'' + ", qosBandwidthLimitRuleMaxBurst='" + maxBurstKbps
78 + '\'' + ", qosBandwidthLimitRuleDirection='" + direction