def _convert_etree_element_to_topic(entry_element):
 topic = Topic()
 invalid_topic = True
 topic_element = entry_element.find('./atom:content/sb:TopicDescription', _etree_sb_feed_namespaces)
 if (topic_element is not None):
  mappings = [('DefaultMessageTimeToLive', 'default_message_time_to_live', None), ('MaxSizeInMegabytes', 'max_size_in_megabytes', int), ('RequiresDuplicateDetection', 'requires_duplicate_detection', _parse_bool), ('DuplicateDetectionHistoryTimeWindow', 'duplicate_detection_history_time_window', None), ('EnableBatchedOperations', 'enable_batched_operations', _parse_bool), ('SizeInBytes', 'size_in_bytes', int)]
  for map in mappings:
   if _read_etree_element(topic_element, map[0], topic, map[1], map[2]):
    invalid_topic = False
 if invalid_topic:
  raise AzureServiceBusResourceNotFound(_ERROR_TOPIC_NOT_FOUND)
 for (name, value) in _ETreeXmlToObject.get_entry_properties_from_element(entry_element, True).items():
  setattr(topic, name, value)
 return topic

def _convert_etree_element_to_topic ( entry_element ) : topic = Topic ( ) invalid_topic = True topic_element = entry_element . find ( './atom:content/sb:TopicDescription' , _etree_sb_feed_namespaces ) if ( topic_element is not None ) : mappings = [ ( 'DefaultMessageTimeToLive' , 'default_message_time_to_live' , None ) , ( 'MaxSizeInMegabytes' , 'max_size_in_megabytes' , int ) , ( 'RequiresDuplicateDetection' , 'requires_duplicate_detection' , _parse_bool ) , ( 'DuplicateDetectionHistoryTimeWindow' , 'duplicate_detection_history_time_window' , None ) , ( 'EnableBatchedOperations' , 'enable_batched_operations' , _parse_bool ) , ( 'SizeInBytes' , 'size_in_bytes' , int ) ] for map in mappings : if _read_etree_element ( topic_element , map [ 0 ] , topic , map [ 1 ] , map [ 2 ] ) : invalid_topic = False if invalid_topic : raise AzureServiceBusResourceNotFound ( _ERROR_TOPIC_NOT_FOUND ) for ( name , value ) in _ETreeXmlToObject . get_entry_properties_from_element ( entry_element , True ) . items ( ) : setattr ( topic , name , value ) return topic
converts entry element to topic the xml format for topic: <entry xmlns=URL <content type=application/xml> <topicdescription xmlns:i="URL" xmlns="URL"> <defaultmessagetimetolive>p10675199dt2h48m5 .