azure-servicemanagement-legacy/azure/servicemanagement/_common_serialization.py
def _get_serialization_name(element_name):
    """converts a Python name into a serializable name"""
    known = _KNOWN_SERIALIZATION_XFORMS.get(element_name)
    if known is not None:
        return known

    if element_name.startswith('x_ms_'):
        return element_name.replace('_', '-')
    if element_name.endswith('_id'):
        element_name = element_name.replace('_id', 'ID')
    for name in ['content_', 'last_modified', 'if_', 'cache_control']:
        if element_name.startswith(name):
            element_name = element_name.replace('_', '-_')

    return ''.join(name.capitalize() for name in element_name.split('_'))
def _get_serialization_name(element_name):
    known = _KNOWN_SERIALIZATION_XFORMS.get(element_name)
    if known is not None:
        return known

    if element_name.startswith('x_ms_'):
        return element_name.replace('_', '-')
    if element_name.endswith('_id'):
        element_name = element_name.replace('_id', 'ID')
    for name in ['content_', 'last_modified', 'if_', 'cache_control']:
        if element_name.startswith(name):
            element_name = element_name.replace('_', '-_')

    return ''.join(name.capitalize() for name in element_name.split('_'))
def _get_serialization_name ( element_name ) : known = _KNOWN_SERIALIZATION_XFORMS . get ( element_name ) if known is not None : return known if element_name . startswith ( 'x_ms_' ) : return element_name . replace ( '_' , '-' ) if element_name . endswith ( '_id' ) : element_name = element_name . replace ( '_id' , 'ID' ) for name in [ 'content_' , 'last_modified' , 'if_' , 'cache_control' ] : if element_name . startswith ( name ) : element_name = element_name . replace ( '_' , '-_' ) return '' . join ( name . capitalize ( ) for name in element_name . split ( '_' ) )
converts a Python name into a serializable name
converts a Python name into a serializable name