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 NeutronVpnIkePolicy extends NeutronBaseAttributes<NeutronVpnIkePolicy> 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 = "auth_algorithm")
28 @XmlElement(name = "encryption_algorithm")
29 String encryptionAlgorithm;
31 @XmlElement(name = "phase1_negotiation_mode")
32 String phase1NegotiationMode;
34 @XmlElement(name = "pfs")
35 String perfectForwardSecrecy;
37 @XmlElement(name = "ike_version")
40 @XmlElement(name = "lifetime")
41 NeutronVpnLifetime lifetime;
43 public NeutronVpnIkePolicy() {
46 public String getAuthAlgorithm() {
50 public void setAuthAlgorithm(String authAlgorithm) {
51 this.authAlgorithm = authAlgorithm;
54 public String getEncryptionAlgorithm() {
55 return encryptionAlgorithm;
58 public void setEncryptionAlgorithm(String encryptionAlgorithm) {
59 this.encryptionAlgorithm = encryptionAlgorithm;
62 public String getPhase1NegotiationMode() {
63 return phase1NegotiationMode;
66 public void setPhase1NegotiationMode(String phase1NegotiationMode) {
67 this.phase1NegotiationMode = phase1NegotiationMode;
70 public String getPerfectForwardSecrecy() {
71 return perfectForwardSecrecy;
74 public void setPerfectForwardSecrecy(String perfectForwardSecrecy) {
75 this.perfectForwardSecrecy = perfectForwardSecrecy;
78 public String getIkeVersion() {
82 public void setIkeVersion(String ikeVersion) {
83 this.ikeVersion = ikeVersion;
86 public NeutronVpnLifetime getLifetime() {
90 public void setLifetime(NeutronVpnLifetime lifetime) {
91 this.lifetime = lifetime;
95 protected boolean extractField(String field, NeutronVpnIkePolicy ans) {
97 case "auth_algorithm":
98 ans.setAuthAlgorithm(this.getAuthAlgorithm());
100 case "encryption_algorithm":
101 ans.setEncryptionAlgorithm(this.getEncryptionAlgorithm());
103 case "phase1_negotiation_mode":
104 ans.setPhase1NegotiationMode(this.getPhase1NegotiationMode());
107 ans.setPerfectForwardSecrecy(this.getPerfectForwardSecrecy());
110 ans.setIkeVersion(this.getIkeVersion());
113 return super.extractField(field, ans);