<s> import saml2 <EOL> from saml2 import SamlBase <EOL> from saml2 import md <EOL> NAMESPACE = '<STR_LIT>' <EOL> class CreationInstant ( SamlBase ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_value_type = { '<STR_LIT>' : '<STR_LIT>' } <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> def creation_instant_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( CreationInstant , xml_string ) <EOL> class SerialNumber ( 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> def serial_number_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( SerialNumber , xml_string ) <EOL> class UsagePolicy ( SamlBase ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_value_type = { '<STR_LIT>' : '<STR_LIT>' } <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> def usage_policy_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( UsagePolicy , xml_string ) <EOL> class PublisherType_ ( 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>' , True ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT>' , False ) <EOL> c_attributes [ '<STR_LIT>' ] = ( '<STR_LIT>' , '<STR_LIT:string>' , False ) <EOL> def __init__ ( self , <EOL> publisher_id = None , <EOL> creation_instant = None , <EOL> serial_number = 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 . publisher_id = publisher_id <EOL> self . creation_instant = creation_instant <EOL> self . serial_number = serial_number <EOL> def publisher_type__from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( PublisherType_ , xml_string ) <EOL> class RegistrationAuthority ( md . EntityIDType_ ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = md . EntityIDType_ . c_children . copy ( ) <EOL> c_attributes = md . EntityIDType_ . c_attributes . copy ( ) <EOL> c_child_order = md . EntityIDType_ . c_child_order [ : ] <EOL> c_cardinality = md . EntityIDType_ . c_cardinality . copy ( ) <EOL> def registration_authority_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( RegistrationAuthority , xml_string ) <EOL> class RegistrationInstant ( SamlBase ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_value_type = { '<STR_LIT>' : '<STR_LIT>' } <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> def registration_instant_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( RegistrationInstant , xml_string ) <EOL> class RegistrationPolicy ( SamlBase ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_value_type = { '<STR_LIT>' : '<STR_LIT>' } <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> def registration_policy_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( RegistrationPolicy , xml_string ) <EOL> class Publisher ( PublisherType_ ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = PublisherType_ . c_children . copy ( ) <EOL> c_attributes = PublisherType_ . c_attributes . copy ( ) <EOL> c_child_order = PublisherType_ . c_child_order [ : ] <EOL> c_cardinality = PublisherType_ . c_cardinality . copy ( ) <EOL> def publisher_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( Publisher , xml_string ) <EOL> class RegistrationInfoType_ ( 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 [ <EOL> '<STR_LIT>' ] = ( <EOL> '<STR_LIT>' , RegistrationAuthority ) <EOL> c_children [ <EOL> '<STR_LIT>' ] = ( <EOL> '<STR_LIT>' , RegistrationInstant ) <EOL> c_children [ <EOL> '<STR_LIT>' ] = ( <EOL> '<STR_LIT>' , RegistrationPolicy ) <EOL> c_cardinality [ '<STR_LIT>' ] = { "<STR_LIT>" : <NUM_LIT:0> , "<STR_LIT>" : <NUM_LIT:1> } <EOL> c_child_order . extend ( [ '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ] ) <EOL> def __init__ ( self , <EOL> registration_authority = None , <EOL> registration_instant = None , <EOL> registration_policy = 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 . registration_authority = registration_authority <EOL> self . registration_instant = registration_instant <EOL> self . registration_policy = registration_policy <EOL> def registration_info_type__from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( RegistrationInfoType_ , xml_string ) <EOL> class PublishersType_ ( 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>' ] = ( <EOL> '<STR_LIT>' , [ Publisher ] ) <EOL> c_cardinality [ '<STR_LIT>' ] = { "<STR_LIT>" : <NUM_LIT:0> } <EOL> c_child_order . extend ( [ '<STR_LIT>' ] ) <EOL> def __init__ ( self , <EOL> publisher = 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 . publisher = publisher or [ ] <EOL> def publishers_type__from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( PublishersType_ , xml_string ) <EOL> class RegistrationInfo ( RegistrationInfoType_ ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = RegistrationInfoType_ . c_children . copy ( ) <EOL> c_attributes = RegistrationInfoType_ . c_attributes . copy ( ) <EOL> c_child_order = RegistrationInfoType_ . c_child_order [ : ] <EOL> c_cardinality = RegistrationInfoType_ . c_cardinality . copy ( ) <EOL> def registration_info_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( RegistrationInfo , xml_string ) <EOL> class Publishers ( PublishersType_ ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = PublishersType_ . c_children . copy ( ) <EOL> c_attributes = PublishersType_ . c_attributes . copy ( ) <EOL> c_child_order = PublishersType_ . c_child_order [ : ] <EOL> c_cardinality = PublishersType_ . c_cardinality . copy ( ) <EOL> def publishers_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( Publishers , xml_string ) <EOL> class DocumentInfoType_ ( 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>' ] = ( <EOL> '<STR_LIT>' , CreationInstant ) <EOL> c_cardinality [ '<STR_LIT>' ] = { "<STR_LIT>" : <NUM_LIT:0> , "<STR_LIT>" : <NUM_LIT:1> } <EOL> c_children [ '<STR_LIT>' ] = ( <EOL> '<STR_LIT>' , SerialNumber ) <EOL> c_cardinality [ '<STR_LIT>' ] = { "<STR_LIT>" : <NUM_LIT:0> , "<STR_LIT>" : <NUM_LIT:1> } <EOL> c_children [ '<STR_LIT>' ] = ( <EOL> '<STR_LIT>' , UsagePolicy ) <EOL> c_cardinality [ '<STR_LIT>' ] = { "<STR_LIT>" : <NUM_LIT:0> , "<STR_LIT>" : <NUM_LIT:1> } <EOL> c_children [ '<STR_LIT>' ] = ( <EOL> '<STR_LIT>' , Publishers ) <EOL> c_cardinality [ '<STR_LIT>' ] = { "<STR_LIT>" : <NUM_LIT:0> , "<STR_LIT>" : <NUM_LIT:1> } <EOL> c_child_order . extend ( <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def __init__ ( self , <EOL> creation_instant = None , <EOL> serial_number = None , <EOL> usage_policy = None , <EOL> publishers = 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 . creation_instant = creation_instant <EOL> self . serial_number = serial_number <EOL> self . usage_policy = usage_policy <EOL> self . publishers = publishers <EOL> def document_info_type__from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( DocumentInfoType_ , xml_string ) <EOL> class DocumentInfo ( DocumentInfoType_ ) : <EOL> """<STR_LIT>""" <EOL> c_tag = '<STR_LIT>' <EOL> c_namespace = NAMESPACE <EOL> c_children = DocumentInfoType_ . c_children . copy ( ) <EOL> c_attributes = DocumentInfoType_ . c_attributes . copy ( ) <EOL> c_child_order = DocumentInfoType_ . c_child_order [ : ] <EOL> c_cardinality = DocumentInfoType_ . c_cardinality . copy ( ) <EOL> def document_info_from_string ( xml_string ) : <EOL> return saml2 . create_class_from_xml_string ( DocumentInfo , xml_string ) <EOL> ELEMENT_FROM_STRING = { <EOL> DocumentInfo . c_tag : document_info_from_string , <EOL> DocumentInfoType_ . c_tag : document_info_type__from_string , <EOL> CreationInstant . c_tag : creation_instant_from_string , <EOL> SerialNumber . c_tag : serial_number_from_string , <EOL> UsagePolicy . c_tag : usage_policy_from_string , <EOL> Publishers . c_tag : publishers_from_string , <EOL> PublishersType_ . c_tag : publishers_type__from_string , <EOL> Publisher . c_tag : publisher_from_string , <EOL> PublisherType_ . c_tag : publisher_type__from_string , <EOL> RegistrationInfo . c_tag : registration_info_from_string , <EOL> RegistrationInfoType_ . c_tag : registration_info_type__from_string , <EOL> RegistrationAuthority . c_tag : registration_authority_from_string , <EOL> RegistrationInstant . c_tag : registration_instant_from_string , <EOL> RegistrationPolicy . c_tag : registration_policy_from_string , <EOL> } <EOL> ELEMENT_BY_TAG = { <EOL> '<STR_LIT>' : DocumentInfo , <EOL> '<STR_LIT>' : DocumentInfoType_ , <EOL> '<STR_LIT>' : CreationInstant , <EOL> '<STR_LIT>' : SerialNumber , <EOL> '<STR_LIT>' : UsagePolicy , <EOL> '<STR_LIT>' : Publishers , <EOL> '<STR_LIT>' : PublishersType_ , <EOL> '<STR_LIT>' : Publisher , <EOL> '<STR_LIT>' : PublisherType_ , <EOL> '<STR_LIT>' : RegistrationInfo , <EOL> '<STR_LIT>' : RegistrationInfoType_ , <EOL> '<STR_LIT>' : RegistrationAuthority , <EOL> '<STR_LIT>' : RegistrationInstant , <EOL> '<STR_LIT>' : RegistrationPolicy , <EOL> } <EOL> def factory ( tag , ** kwargs ) : <EOL> return ELEMENT_BY_TAG [ tag ] ( ** kwargs ) </s>
