2 * Copyright (c) 2015 Hewlett-Packard Development Company, L.P. 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 edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
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;
17 @XmlRootElement(name = "l2gatewayConnection")
18 @XmlAccessorType(XmlAccessType.NONE)
19 public final class NeutronL2gatewayConnection extends NeutronBaseAttributes<NeutronL2gatewayConnection> {
20 private static final long serialVersionUID = 1L;
22 @XmlElement(name = "gateway_id")
25 @XmlElement(name = "network_id")
28 @XmlElement(name = "segmentation_id")
31 @XmlElement(name = "port_id")
34 public String getL2gatewayID() {
38 public String getNetworkID() {
42 public Integer getSegmentID() {
46 public void setL2gatewayID(String l2gatewayID) {
47 this.l2gatewayID = l2gatewayID;
50 public void setNetworkID(String networkID) {
51 this.networkID = networkID;
54 public void setSegmentID(Integer segmentID) {
55 this.segmentID = segmentID;
58 // getPortID differ only by capitalization with NeutronTrunk.getPortId but it's not worth changing the API and
59 // disrupting downstream users just for that reason.
60 @SuppressFBWarnings("NM_CONFUSING")
61 public String getPortID() {
65 @SuppressFBWarnings("NM_CONFUSING")
66 public void setPortID(String portID) {
71 protected boolean extractField(String field, NeutronL2gatewayConnection ans) {
74 ans.setID(this.getID());
77 ans.setL2gatewayID(this.getL2gatewayID());
80 ans.setNetworkID(this.getNetworkID());
82 case "segmentation_id":
83 ans.setSegmentID(this.getSegmentID());
86 ans.setPortID(this.getPortID());
89 return super.extractField(field, ans);
95 public String toString() {
96 return "NeutronL2GatewayConnection [" + "tenant_id = " + tenantID + ", connection_id = " + uuid
97 + ", gateway_id = " + l2gatewayID + ", network_id = " + networkID + ", segmentation_id = " + segmentID
98 + ", port_id = " + portID + "]";