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 javax.xml.bind.annotation.XmlAccessType;
12 import javax.xml.bind.annotation.XmlAccessorType;
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlRootElement;
17 @XmlAccessorType(XmlAccessType.NONE)
18 public final class NeutronVpnIkePolicy extends NeutronBaseAttributes<NeutronVpnIkePolicy> {
19 private static final long serialVersionUID = 1L;
21 // See OpenStack Network API v2.0 Reference for description of
22 // annotated attributes
24 @XmlElement(name = "auth_algorithm")
27 @XmlElement(name = "encryption_algorithm")
28 String encryptionAlgorithm;
30 @XmlElement(name = "phase1_negotiation_mode")
31 String phase1NegotiationMode;
33 @XmlElement(name = "pfs")
34 String perfectForwardSecrecy;
36 @XmlElement(name = "ike_version")
39 @XmlElement(name = "lifetime")
40 NeutronVpnLifetime lifetime;
42 public NeutronVpnIkePolicy() {
45 public String getAuthAlgorithm() {
49 public void setAuthAlgorithm(String authAlgorithm) {
50 this.authAlgorithm = authAlgorithm;
53 public String getEncryptionAlgorithm() {
54 return encryptionAlgorithm;
57 public void setEncryptionAlgorithm(String encryptionAlgorithm) {
58 this.encryptionAlgorithm = encryptionAlgorithm;
61 public String getPhase1NegotiationMode() {
62 return phase1NegotiationMode;
65 public void setPhase1NegotiationMode(String phase1NegotiationMode) {
66 this.phase1NegotiationMode = phase1NegotiationMode;
69 public String getPerfectForwardSecrecy() {
70 return perfectForwardSecrecy;
73 public void setPerfectForwardSecrecy(String perfectForwardSecrecy) {
74 this.perfectForwardSecrecy = perfectForwardSecrecy;
77 public String getIkeVersion() {
81 public void setIkeVersion(String ikeVersion) {
82 this.ikeVersion = ikeVersion;
85 public NeutronVpnLifetime getLifetime() {
89 public void setLifetime(NeutronVpnLifetime lifetime) {
90 this.lifetime = lifetime;
94 protected boolean extractField(String field, NeutronVpnIkePolicy ans) {
96 case "auth_algorithm":
97 ans.setAuthAlgorithm(this.getAuthAlgorithm());
99 case "encryption_algorithm":
100 ans.setEncryptionAlgorithm(this.getEncryptionAlgorithm());
102 case "phase1_negotiation_mode":
103 ans.setPhase1NegotiationMode(this.getPhase1NegotiationMode());
106 ans.setPerfectForwardSecrecy(this.getPerfectForwardSecrecy());
109 ans.setIkeVersion(this.getIkeVersion());
112 return super.extractField(field, ans);