#
# 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 lbgroup(base_resource) :
	""" Configuration for LB group resource. """
	def __init__(self) :
		self._name = ""
		self._persistencetype = ""
		self._persistencebackup = ""
		self._backuppersistencetimeout = 0
		self._persistmask = ""
		self._cookiename = ""
		self._v6persistmasklen = 0
		self._cookiedomain = ""
		self._timeout = 0
		self._rule = ""
		self._newname = ""
		self._td = 0
		self.___count = 0

	@property
	def name(self) :
		ur"""Name of the load balancing virtual server group.<br/>Minimum length =  1.
		"""
		try :
			return self._name
		except Exception as e:
			raise e

	@name.setter
	def name(self, name) :
		ur"""Name of the load balancing virtual server group.<br/>Minimum length =  1
		"""
		try :
			self._name = name
		except Exception as e:
			raise e

	@property
	def persistencetype(self) :
		ur"""Type of persistence for the group. Available settings function as follows:
		* SOURCEIP - Create persistence sessions based on the client IP.
		* COOKIEINSERT - Create persistence sessions based on a cookie in client requests. The cookie is inserted by a Set-Cookie directive from the server, in its first response to a client.
		* RULE - Create persistence sessions based on a user defined rule.
		* NONE - Disable persistence for the group.<br/>Possible values = SOURCEIP, COOKIEINSERT, RULE, NONE.
		"""
		try :
			return self._persistencetype
		except Exception as e: