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 java.io.Serializable;
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 implements Serializable {
21 private static final long serialVersionUID = 1L;
23 @XmlElement(name = "gateway_id")
26 @XmlElement(name = "network_id")
29 @XmlElement(name = "segmentation_id")
32 @XmlElement(name = "port_id")
35 public String getL2gatewayID() {
39 public String getNetworkID() {
43 public Integer getSegmentID() {
47 public void setL2gatewayID(String l2gatewayID) {
48 this.l2gatewayID = l2gatewayID;
51 public void setNetworkID(String networkID) {
52 this.networkID = networkID;
55 public void setSegmentID(Integer segmentID) {
56 this.segmentID = segmentID;
59 public String getPortID() {
63 public void setPortID(String portID) {
68 protected boolean extractField(String field, NeutronL2gatewayConnection ans) {
71 ans.setID(this.getID());
74 ans.setL2gatewayID(this.getL2gatewayID());
77 ans.setNetworkID(this.getNetworkID());
79 case "segmentation_id":
80 ans.setSegmentID(this.getSegmentID());
83 ans.setPortID(this.getPortID());
86 return super.extractField(field, ans);
92 public String toString() {
93 return "NeutronL2GatewayConnection [" + "tenant_id = " + tenantID + ", connection_id = " + uuid
94 + ", gateway_id = " + l2gatewayID + ", network_id = " + networkID + ", segmentation_id = " + segmentID
95 + ", port_id = " + portID + "]";