#
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
#   Licensed under the Apache License, Version 2.0 (the "License")
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
#

from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response
from nssrc.com.citrix.netscaler.nitro.service.options import options
from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro_exception

from nssrc.com.citrix.netscaler.nitro.util.nitro_util import nitro_util

class ipsecprofile(base_resource) :
	""" Configuration for IPSEC profile resource. """
	def __init__(self) :
		self._name = ""
		self._ikeversion = ""
		self._encalgo = []
		self._hashalgo = []
		self._lifetime = 0
		self._psk = ""
		self._publickey = ""
		self._privatekey = ""
		self._peerpublickey = ""
		self._livenesscheckinterval = 0
		self._replaywindowsize = 0
		self._ikeretryinterval = 0
		self._retransmissiontime = 0
		self._builtin = []
		self.___count = 0

	@property
	def name(self) :
		ur"""The name of the ipsec profile.<br/>Minimum length =  1<br/>Maximum length =  32.
		"""
		try :
			return self._name
		except Exception as e:
			raise e

	@name.setter
	def name(self, name) :
		ur"""The name of the ipsec profile.<br/>Minimum length =  1<br/>Maximum length =  32
		"""
		try :
			self._name = name
		except Exception as e:
			raise e

	@property
	def ikeversion(self) :
		ur"""IKE Protocol Version.<br/>Possible values = V1, V2.
		"""
		try :
			return self._ikeversion
		except Exception as e:
			raise e

	@ikeversion.setter
	def ikeversion(self, ikeversion) :
		ur"""IKE Protocol Version.<br/>Possible values = V1, V2
		"""
		try :
			self._ikeversion = ikeversion
		except Exception as e:
			raise e

	@property
	def encalgo(self) :
		ur"""Type of encryption algorithm.<br/>Possible values = AES, 3DES.
		"""
		try :
			return self._encalgo
		except Exception as e:
			raise e

	@encalgo.setter
	def encalgo(self, encalgo) :
		ur"""Type of encryption algorithm.<br/>Possible values = AES, 3DES
		"""
		try :
			self._encalgo = encalgo
		except Exception as e:
			raise e

	@property
	def hashalgo(self) :
		ur"""Type of hashing algorithm.<br/>Possible values = HMAC_SHA1, HMAC_SHA256, HMAC_SHA384, HMAC_SHA512, HMAC_MD5.
		"""
		try :
			return self._hashalgo
		except Exception as e:
			raise e

	@hashalgo.setter
	def hashalgo(self, hashalgo) :
		ur"""Type of hashing algorithm.<br/>Possible values = HMAC_SHA1, HMAC_SHA256, HMAC_SHA384, HMAC_SHA512, HMAC_MD5
		"""
		try :
			self._hashalgo = hashalgo
		except Exception as e:
			raise e

	@property
	def lifetime(self) :
		ur"""Lifetime of IKE SA in seconds. Lifetime of IPSec SA will be (lifetime of IKE SA/8).<br/>Minimum length =  480<br/>Maximum length =  31536000.
		"""
		try :
			return self._lifetime
		except Exception as e:
			raise e

	@lifetime.setter
	def lifetime(self, lifetime) :
		ur"""Lifetime of IKE SA in seconds. Lifetime of IPSec SA will be (lifetime of IKE SA/8).<br/>Minimum length =  480<br/>Maximum length =  31536000
		"""
		try :
			self._lifetime = lifetime
		except Exception as e:
			raise e

	@property
	def psk(self) :
		ur"""Pre shared key value.
		"""
		try :
			return self._psk
		except Exception as e:
			raise e

	@psk.setter
	def psk(self, psk) :
		ur"""Pre shared key value.
		"""
		try :
			self._psk = psk
		except Exception as e:
			raise e

	@property
	def publickey(self) :
		ur"""Public key file path.
		"""
		try :
			return self._publickey
		except Exception as e:
			raise e

	@publickey.setter
	def publickey(self, publickey) :
		ur"""Public key file path.