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 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 NeutronVpnIpSecPolicy extends NeutronBaseAttributes<NeutronVpnIpSecPolicy> implements Serializable {
20 private static final long serialVersionUID = 1L;
22 // See OpenStack Network API v2.0 Reference for description of
23 // annotated attributes
25 @XmlElement(name = "transform_protocol")
26 String transformProtocol;
28 @XmlElement(name = "encapsulation_mode")
29 String encapsulationMode;
31 @XmlElement(name = "auth_algorithm")
34 @XmlElement(name = "encryption_algorithm")
35 String encryptionAlgorithm;
37 @XmlElement(name = "pfs")
38 String perfectForwardSecrecy;
40 @XmlElement(name = "lifetime")
41 NeutronVpnLifetime lifetime;
43 public NeutronVpnIpSecPolicy() {
46 public String getTransformProtocol() {
47 return transformProtocol;
50 public void setTransformProtocol(String transformProtocol) {
51 this.transformProtocol = transformProtocol;
54 public String getEncapsulationMode() {
55 return encapsulationMode;
58 public void setEncapsulationMode(String encapsulationMode) {
59 this.encapsulationMode = encapsulationMode;
62 public String getAuthAlgorithm() {
66 public void setAuthAlgorithm(String authAlgorithm) {
67 this.authAlgorithm = authAlgorithm;
70 public String getEncryptionAlgorithm() {
71 return encryptionAlgorithm;
74 public void setEncryptionAlgorithm(String encryptionAlgorithm) {
75 this.encryptionAlgorithm = encryptionAlgorithm;
78 public String getPerfectForwardSecrecy() {
79 return perfectForwardSecrecy;
82 public void setPerfectForwardSecrecy(String perfectForwardSecrecy) {
83 this.perfectForwardSecrecy = perfectForwardSecrecy;
86 public NeutronVpnLifetime getLifetime() {
90 public void setLifetime(NeutronVpnLifetime lifetime) {
91 this.lifetime = lifetime;
95 protected boolean extractField(String field, NeutronVpnIpSecPolicy ans) {
97 case "transform_protocol":
98 ans.setTransformProtocol(this.getTransformProtocol());
100 case "encapsulation_mode":
101 ans.setEncapsulationMode(this.getEncapsulationMode());
103 case "auth_algorithm":
104 ans.setAuthAlgorithm(this.getAuthAlgorithm());
106 case "encryption_algorithm":
107 ans.setEncryptionAlgorithm(this.getEncryptionAlgorithm());
110 ans.setPerfectForwardSecrecy(this.getPerfectForwardSecrecy());
113 return super.extractField(field, ans);