2 * Copyright (c) 2015 IBM Corporation and others. 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;
19 @XmlAccessorType(XmlAccessType.NONE)
20 public final class NeutronMeteringLabel extends NeutronBaseAttributes<NeutronMeteringLabel> implements Serializable {
21 private static final long serialVersionUID = 1L;
23 @XmlElement(defaultValue = "false", name = "shared")
30 public Boolean getMeteringLabelShared() {
34 public void setMeteringLabelShared(Boolean shared) {
41 public NeutronMeteringLabel() {
45 public String toString() {
46 return "NeutronMeteringLabel [id=" + uuid + ", name=" + name + ", tenant_id=" + tenantID
47 + ", shared=" + shared + "]";
51 * This method copies selected fields from the object and returns them
52 * as a new object, suitable for marshaling.
55 * List of attributes to be extracted
56 * @return a NeutronMeteringLabel object with only the selected fields
59 public NeutronMeteringLabel extractFields(List<String> fields) {
60 NeutronMeteringLabel ans = new NeutronMeteringLabel();
61 for (String s : fields) {
63 if (s.equals("shared")) {
64 ans.setMeteringLabelShared(this.getMeteringLabelShared());