o
    g                     @   s:   d dl Z d dlmZ d dlZejddG dd dZdS )    N)contextmanagerT)slotsc                   @   s   e Zd ZdZejddZejddZejddZejddZ	ejddZ
ejddZejddZejddZejddZejeejdZedd Zdd	 ZdS )
Settingsa<  

    :param strict: boolean to indicate if the lxml should be parsed a 'strict'.
      If false then the recover mode is enabled which tries to parse invalid
      XML as best as it can.
    :type strict: boolean
    :param raw_response: boolean to skip the parsing of the XML response by
     zeep but instead returning the raw data

    :param forbid_dtd: disallow XML with a <!DOCTYPE> processing instruction
    :type forbid_dtd: bool
    :param forbid_entities: disallow XML with <!ENTITY> declarations inside the DTD
    :type forbid_entities: bool
    :param forbid_external: disallow any access to remote or local resources
      in external entities or DTD and raising an ExternalReferenceForbidden
      exception when a DTD or entity references an external resource.
    :type forbid_external: bool
    :param xml_huge_tree: disable lxml/libxml2 security restrictions and
                          support very deep trees and very long text content

    :param force_https: Force all connections to HTTPS if the WSDL is also
      loaded from an HTTPS endpoint. (default: true)
    :type force_https: bool
    :param extra_http_headers: Additional HTTP headers to be sent to the
     transport. This can be used in combination with the context manager
     approach to add http headers for specific calls.
    :type extra_headers: list

    :param xsd_ignore_sequence_order: boolean to indicate whether to enforce sequence
     order when parsing complex types. This is a workaround for servers that
     don't respect sequence order.
    :type xsd_ignore_sequence_order: boolean
    T)defaultFNc                 k   s    i }|  D ]\}}t| |||< t| j|| qz&d V  W |  D ]\}}t| |}||kr7t| j| q#t| j|| q#d S |  D ]\}}t| |}||krYt| j| qEt| j|| qEw )N)itemsgetattrsetattr_tlsdelattr)selfoptionscurrentkeyvaluer    r   F/home/ubuntu/webapp/venv/lib/python3.10/site-packages/zeep/settings.py__call__=   s$   

zSettings.__call__c                 C   s4   t | d}|dkrt||rt||S t | |S )Nr	   )object__getattribute__hasattrr   )r   r   r	   r   r   r   r   N   s   
zSettings.__getattribute__)__name__
__module____qualname____doc__attribstrictraw_responseforce_httpsextra_http_headersxml_huge_tree
forbid_dtdforbid_entitiesforbid_externalxsd_ignore_sequence_orderFactory	threadinglocalr	   r   r   r   r   r   r   r   r      s    "
r   )r&   
contextlibr   r   sr   r   r   r   r   <module>   s
    
