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 java.util.Iterator;
13 import java.util.List;
14 import javax.xml.bind.annotation.XmlAccessType;
15 import javax.xml.bind.annotation.XmlAccessorType;
16 import javax.xml.bind.annotation.XmlElement;
17 import javax.xml.bind.annotation.XmlRootElement;
19 @XmlRootElement(name = "l2gatewayConnection")
20 @XmlAccessorType(XmlAccessType.NONE)
21 public final class NeutronL2gatewayConnection extends NeutronObject<NeutronL2gatewayConnection>
22 implements Serializable, INeutronObject<NeutronL2gatewayConnection> {
23 private static final long serialVersionUID = 1L;
25 @XmlElement(name = "gateway_id")
28 @XmlElement(name = "network_id")
31 @XmlElement(name = "segmentation_id")
34 @XmlElement(name = "port_id")
37 public String getL2gatewayID() {
41 public String getNetworkID() {
45 public Integer getSegmentID() {
49 public void setL2gatewayID(String l2gatewayID) {
50 this.l2gatewayID = l2gatewayID;
53 public void setNetworkID(String networkID) {
54 this.networkID = networkID;
57 public void setSegmentID(Integer segmentID) {
58 this.segmentID = segmentID;
61 public String getPortID() {
65 public void setPortID(String portID) {
69 public NeutronL2gatewayConnection extractFields(List<String> fields) {
70 NeutronL2gatewayConnection ans = new NeutronL2gatewayConnection();
71 Iterator<String> i = fields.iterator();
74 if (s.equals("tenant_id")) {
75 ans.setTenantID(this.getTenantID());
77 if (s.equals("connection_id")) {
78 ans.setID(this.getID());
80 if (s.equals("gateway_id")) {
81 ans.setL2gatewayID(this.getL2gatewayID());
83 if (s.equals("network_id")) {
84 ans.setNetworkID(this.getNetworkID());
86 if (s.equals("segmentation_id")) {
87 ans.setSegmentID(this.getSegmentID());
89 if (s.equals("port_id")) {
90 ans.setPortID(this.getPortID());
97 public String toString() {
98 return "NeutronL2GatewayConnection [" + "tenant_id = " + tenantID + ", connection_id = " + uuid
99 + ", gateway_id = " + l2gatewayID + ", network_id = " + networkID + ", segmentation_id = " + segmentID
100 + ", port_id = " + portID + "]";