#NEWLINE# def GetMavenArtifactId( api_name , package_path = '' , canonical_name = '' , owner_domain = 'google.com' ) : #NEWLINE# #INDENT# "Returns the maven artifact id for a given api.\n\n  Args:\n    api_name:  (str) The api name.\n    package_path: (str|None) The package path, if any.\n    canonical_name: (str|None) The canonical api name, if any.\n    owner_domain: (str) The api's owner domain.\n  Returns:\n    (str) The artifact id.\n  " #NEWLINE# if ( package_path and parts ) : #NEWLINE# #INDENT# api_name = canonical_name . lower ( ) . replace ( ' ' , '' ) #NEWLINE# #UNINDENT# parts = [ ] #NEWLINE# if ( owner_domain == 'google.com' ) : #NEWLINE# #INDENT# parts . extend ( [ 'google' , 'api' , 'services' ] ) #NEWLINE# #UNINDENT# if package_path : #NEWLINE# #INDENT# parts . extend ( re . split ( '\\.|/' , package_path ) ) #NEWLINE# #UNINDENT# parts . append ( api_name ) #NEWLINE# return '-' . join ( parts )