<s> import saml2 <EOL> from saml2 import SamlBase <EOL> from saml2 import saml <EOL> from saml2 import samlp <EOL> NAMESPACE = '<STR_LIT>' <EOL> class RequestType_ ( SamlBase ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = SamlBase . c_children . copy ( ) <EOL> c_attributes = SamlBase . c_attributes . copy ( ) <EOL> c_child_order = SamlBase . c_child_order [ : ] <EOL> c_cardinality = SamlBase . c_cardinality . copy ( ) <EOL> c_children [ '<STR_LIT>' ] = ( '<STR_LIT>' , saml . Issuer ) <EOL> c_children [ '<STR_LIT>' ] = ( '<STR_LIT>' , samlp . IDPList ) <EOL> c_cardinality [ '<STR_LIT>' ] = { "<STR_LIT>" : <NUM_LIT:0> , "<STR_LIT>" : <NUM_LIT:1> } <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT:None>' , True ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT:None>' , True ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT:string>' , False ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT>' , False ) <EOL> c_child_order . extend ( [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def __init__ ( self , <EOL> issuer = None , <EOL> idp_list = None , <EOL> must_understand = None , <EOL> actor = None , <EOL> provider_name = None , <EOL> is_passive = None , <EOL> text = None , <EOL> extension_elements = None , <EOL> extension_attributes = None , <EOL> ) : <EOL> SamlBase . __init__ ( self , <EOL> text = text , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes , <EOL> ) <EOL> self . issuer = issuer <EOL> self . idp_list = idp_list <EOL> self . must_understand = must_understand <EOL> self . actor = actor <EOL> self . provider_name = provider_name <EOL> self . is_passive = is_passive <EOL> def request_type__from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( RequestType_ , xml_string ) <EOL> class ResponseType_ ( SamlBase ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = SamlBase . c_children . copy ( ) <EOL> c_attributes = SamlBase . c_attributes . copy ( ) <EOL> c_child_order = SamlBase . c_child_order [ : ] <EOL> c_cardinality = SamlBase . c_cardinality . copy ( ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT:None>' , True ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT:None>' , True ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT>' , True ) <EOL> def __init__ ( self , <EOL> must_understand = None , <EOL> actor = None , <EOL> assertion_consumer_service_url = None , <EOL> text = None , <EOL> extension_elements = None , <EOL> extension_attributes = None , <EOL> ) : <EOL> SamlBase . __init__ ( self , <EOL> text = text , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes , <EOL> ) <EOL> self . must_understand = must_understand <EOL> self . actor = actor <EOL> self . assertion_consumer_service_url = assertion_consumer_service_url <EOL> def response_type__from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( ResponseType_ , xml_string ) <EOL> class RelayStateType_ ( SamlBase ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_value_type = { '<STR_LIT>' : '<STR_LIT:string>' } <EOL> c_children = SamlBase . c_children . copy ( ) <EOL> c_attributes = SamlBase . c_attributes . copy ( ) <EOL> c_child_order = SamlBase . c_child_order [ : ] <EOL> c_cardinality = SamlBase . c_cardinality . copy ( ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT:string>' , True ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT:string>' , True ) <EOL> def __init__ ( self , <EOL> must_understand = None , <EOL> actor = None , <EOL> text = None , <EOL> extension_elements = None , <EOL> extension_attributes = None , <EOL> ) : <EOL> SamlBase . __init__ ( self , <EOL> text = text , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes , <EOL> ) <EOL> self . must_understand = must_understand <EOL> self . actor = actor <EOL> def relay_state_type__from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( RelayStateType_ , xml_string ) <EOL> class Request ( RequestType_ ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = RequestType_ . c_children . copy ( ) <EOL> c_attributes = RequestType_ . c_attributes . copy ( ) <EOL> c_child_order = RequestType_ . c_child_order [ : ] <EOL> c_cardinality = RequestType_ . c_cardinality . copy ( ) <EOL> def request_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( Request , xml_string ) <EOL> class Response ( ResponseType_ ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = ResponseType_ . c_children . copy ( ) <EOL> c_attributes = ResponseType_ . c_attributes . copy ( ) <EOL> c_child_order = ResponseType_ . c_child_order [ : ] <EOL> c_cardinality = ResponseType_ . c_cardinality . copy ( ) <EOL> def response_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( Response , xml_string ) <EOL> class RelayState ( RelayStateType_ ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = RelayStateType_ . c_children . copy ( ) <EOL> c_attributes = RelayStateType_ . c_attributes . copy ( ) <EOL> c_child_order = RelayStateType_ . c_child_order [ : ] <EOL> c_cardinality = RelayStateType_ . c_cardinality . copy ( ) <EOL> def relay_state_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( RelayState , xml_string ) <EOL> ELEMENT_FROM_STRING = { <EOL> Request . c_tag : request_from_string , <EOL> RequestType_ . c_tag : request_type__from_string , <EOL> Response . c_tag : response_from_string , <EOL> ResponseType_ . c_tag : response_type__from_string , <EOL> RelayState . c_tag : relay_state_from_string , <EOL> RelayStateType_ . c_tag : relay_state_type__from_string , <EOL> } <EOL> ELEMENT_BY_TAG = { <EOL> '<STR_LIT>' : Request , <EOL> '<STR_LIT>' : RequestType_ , <EOL> '<STR_LIT>' : Response , <EOL> '<STR_LIT>' : ResponseType_ , <EOL> '<STR_LIT>' : RelayState , <EOL> '<STR_LIT>' : RelayStateType_ , <EOL> } <EOL> def factory ( tag , ** kwargs ) : <EOL> return ELEMENT_BY_TAG [ tag ] ( ** kwargs ) </s>
