(self, s, the_api, parent=None)
return safe_class_name
Convert a name to a suitable class name in Java.

    Subclasses should override as appropriate.

    Args:
      s: (str) A canonical name for data element. (Usually the API wire format)
      the_api: (Api) The API this element is part of. For use as a hint when the
        name cannot be used directly.
      parent: (schema) The parent we use to get a safe class name.
    Returns:
      A name suitable for use as an element in Java.
Convert a name to a suitable class name in Java.
Convert a name to a suitable class name in Java .
def ToSafeClassName(self, s, the_api, parent=None):
    """Convert a name to a suitable class name in Java.

    Subclasses should override as appropriate.

    Args:
      s: (str) A canonical name for data element. (Usually the API wire format)
      the_api: (Api) The API this element is part of. For use as a hint when the
        name cannot be used directly.
      parent: (schema) The parent we use to get a safe class name.
    Returns:
      A name suitable for use as an element in Java.
    """
    safe_class_name = utilities.CamelCase(s)
    if parent:
      for ancestor in parent.full_path:
        if ancestor.safeClassName == safe_class_name:
          safe_class_name = '%s%s' % (parent.class_name, safe_class_name)
    if safe_class_name.lower() in JavaLanguageModel.RESERVED_CLASS_NAMES:
      api_name = utilities.CamelCase(the_api.values['name'])
      if utilities.CamelCase(the_api.values['canonicalName']):
        # Use canonical name if specified.
        api_name = utilities.CamelCase(
            the_api.values['canonicalName']).replace(' ', '')
      # Prepend the API name
      safe_class_name = '%s%s' % (api_name, utilities.CamelCase(s))
    return safe_class_name
def ToSafeClassName ( self , s , the_api , parent = None ) : safe_class_name = utilities . CamelCase ( s ) if parent : for ancestor in parent . full_path : if ancestor . safeClassName == safe_class_name : safe_class_name = '%s%s' % ( parent . class_name , safe_class_name ) if safe_class_name . lower ( ) in JavaLanguageModel . RESERVED_CLASS_NAMES : api_name = utilities . CamelCase ( the_api . values [ 'name' ] ) if utilities . CamelCase ( the_api . values [ 'canonicalName' ] ) : # Use canonical name if specified. api_name = utilities . CamelCase ( the_api . values [ 'canonicalName' ] ) . replace ( ' ' , '' ) # Prepend the API name safe_class_name = '%s%s' % ( api_name , utilities . CamelCase ( s ) ) return safe_class_name