def ToClassName(self, s, element, element_type=None):
    # Camelcase what we have and account for spaces in canonical names
    name = utilities.CamelCase(s).replace(' ', '')
    if name.lower() in JavaLanguageModel.RESERVED_CLASS_NAMES:
      # Prepend the service name
      service = self._class_name or utilities.CamelCase(self.values['name'])
      return service + name

    if name == self.values.get('className'):
      if 'resource' == element_type:
        name += 'Operations'
      elif 'method' == element_type:
        name += 'Operation'
    return name
Convert a discovery name to a suitable Java class name.
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/java_generator.py/JavaApi.ToClassName