(api_name, package_path='', canonical_name='',
                       owner_domain='google.com')
return '-'.join(parts)
Returns the maven artifact id for a given api.

  Args:
    api_name:  (str) The api name.
    package_path: (str|None) The package path, if any.
    canonical_name: (str|None) The canonical api name, if any.
    owner_domain: (str) The api's owner domain.
  Returns:
    (str) The artifact id.
Returns the maven artifact id for a given api.
Returns the maven artifact id for a given api .
def GetMavenArtifactId(api_name, package_path='', canonical_name='',
                       owner_domain='google.com'):
  """Returns the maven artifact id for a given api.

  Args:
    api_name:  (str) The api name.
    package_path: (str|None) The package path, if any.
    canonical_name: (str|None) The canonical api name, if any.
    owner_domain: (str) The api's owner domain.
  Returns:
    (str) The artifact id.
  """
  # TODO(user): This logic is meant to match equivalent
  # logic in api.Api._SetupModules() in setting up the path,
  # using canonicalName only if packagePath is set, for backwards
  # compatibility.  A TODO there proposes a breaking change of
  # obeying canonicalName unconditionally; were that done this
  # would have to change likewise for our tests to pass.
  if package_path and canonical_name:
    api_name = canonical_name.lower().replace(' ', '')

  parts = []
  if owner_domain == 'google.com':
    parts.extend(['google', 'api', 'services'])
  if package_path:
    parts.extend(re.split(r'\.|/', package_path))
  parts.append(api_name)
  return '-'.join(parts)
def GetMavenArtifactId ( api_name , package_path = '' , canonical_name = '' , owner_domain = 'google.com' ) : # TODO(user): This logic is meant to match equivalent # logic in api.Api._SetupModules() in setting up the path, # using canonicalName only if packagePath is set, for backwards # compatibility.  A TODO there proposes a breaking change of # obeying canonicalName unconditionally; were that done this # would have to change likewise for our tests to pass. if package_path and canonical_name : api_name = canonical_name . lower ( ) . replace ( ' ' , '' ) parts = [ ] if owner_domain == 'google.com' : parts . extend ( [ 'google' , 'api' , 'services' ] ) if package_path : parts . extend ( re . split ( r'\.|/' , package_path ) ) parts . append ( api_name ) return '-' . join ( parts )