def create(cls, name, address, inspected_service, secondary=None,
               balancing_mode='ha', proxy_service='generic', location=None,
               comment=None, add_x_forwarded_for=False, trust_host_header=False,
               **kw):
        """
        Create a Proxy Server element
        
        :param str name: name of proxy server element
        :param str address: address of element. Can be a single FQDN or comma separated
            list of IP addresses
        :param list secondary: list of secondary IP addresses
        :param str balancing_mode: how to balance traffic, valid options are
            ha (first available server), src, dst, srcdst (default: ha)
        :param str proxy_service: which proxy service to use for next hop, options
            are generic or forcepoint_ap-web_cloud
        :param str,Element location: location for this proxy server
        :param bool add_x_forwarded_for: add X-Forwarded-For header when using the
            Generic Proxy forwarding method (default: False)
        :param bool trust_host_header: trust the host header when using the Generic
            Proxy forwarding method (default: False)
        :param dict inspected_service: inspection services dict. Valid keys are
            service_type and port. Service type valid values are HTTP, HTTPS, FTP or SMTP
            and are case sensitive
        :param str comment: optional comment
        :param kw: keyword arguments are used to collect settings when the proxy_service
            value is forcepoint_ap-web_cloud. Valid keys are `fp_proxy_key`, 
            `fp_proxy_key_id`, `fp_proxy_user_id`. The fp_proxy_key is the password value.
            All other values are of type int
        """     
        json = {'name': name,
                'comment': comment,
                'secondary': secondary or [],
                'http_proxy': proxy_service,
                'balancing_mode': balancing_mode,
                'inspected_service': inspected_service,
                'trust_host_header': trust_host_header,
                'add_x_forwarded_for': add_x_forwarded_for,
                'location_ref': element_resolver(location)
            }
        addresses = address.split(',')
        json.update(address=addresses.pop(0))
        json.update(ip_address=addresses if 'ip_address' not in kw else kw['ip_address'])
        
        if proxy_service == 'forcepoint_ap-web_cloud':
            for key in ('fp_proxy_key', 'fp_proxy_key_id', 'fp_proxy_user_id'):
                if key not in kw:
                    raise CreateElementFailed('Missing required fp key when adding a '
                        'proxy server to forward to forcepoint. Missing key: %s' % key)
                json[key] = kw.get(key)
        
        return ElementCreator(cls, json)
def create ( cls , name , address , inspected_service , secondary = None , balancing_mode = 'ha' , proxy_service = 'generic' , location = None , comment = None , add_x_forwarded_for = False , trust_host_header = False , ** kw ) : json = { 'name' : name , 'comment' : comment , 'secondary' : secondary or [ ] , 'http_proxy' : proxy_service , 'balancing_mode' : balancing_mode , 'inspected_service' : inspected_service , 'trust_host_header' : trust_host_header , 'add_x_forwarded_for' : add_x_forwarded_for , 'location_ref' : element_resolver ( location ) } addresses = address . split ( ',' ) json . update ( address = addresses . pop ( 0 ) ) json . update ( ip_address = addresses if 'ip_address' not in kw else kw [ 'ip_address' ] ) if proxy_service == 'forcepoint_ap-web_cloud' : for key in ( 'fp_proxy_key' , 'fp_proxy_key_id' , 'fp_proxy_user_id' ) : if key not in kw : raise CreateElementFailed ( 'Missing required fp key when adding a ' 'proxy server to forward to forcepoint. Missing key: %s' % key ) json [ key ] = kw . get ( key ) return ElementCreator ( cls , json )
Create a Proxy Server element
        
        :param str name: name of proxy server element
        :param str address: address of element. Can be a single FQDN or comma separated
            list of IP addresses
        :param list secondary: list of secondary IP addresses
        :param str balancing_mode: how to balance traffic, valid options are
            ha (first available server), src, dst, srcdst (default: ha)
        :param str proxy_service: which proxy service to use for next hop, options
            are generic or forcepoint_ap-web_cloud
        :param str,Element location: location for this proxy server
        :param bool add_x_forwarded_for: add X-Forwarded-For header when using the
            Generic Proxy forwarding method (default: False)
        :param bool trust_host_header: trust the host header when using the Generic
            Proxy forwarding method (default: False)
        :param dict inspected_service: inspection services dict. Valid keys are
            service_type and port. Service type valid values are HTTP, HTTPS, FTP or SMTP
            and are case sensitive
        :param str comment: optional comment
        :param kw: keyword arguments are used to collect settings when the proxy_service
            value is forcepoint_ap-web_cloud. Valid keys are `fp_proxy_key`, 
            `fp_proxy_key_id`, `fp_proxy_user_id`. The fp_proxy_key is the password value.
            All other values are of type int