def make_get_public_certificates_call(rpc):
 request = app_identity_service_pb.GetPublicCertificateForAppRequest()
 response = app_identity_service_pb.GetPublicCertificateForAppResponse()
 def get_certs_result(rpc):
  'Check success, handle exceptions, and return converted RPC result.\n\n    This method waits for the RPC if it has not yet finished, and calls the\n    post-call hooks on the first invocation.\n\n    Args:\n      rpc: A UserRPC object.\n\n    Returns:\n      A list of PublicCertificate object.\n    '
  assert (rpc.service == _APP_IDENTITY_SERVICE_NAME), repr(rpc.service)
  assert (rpc.method == _GET_CERTS_METHOD_NAME), repr(rpc.method)
  try:
   rpc.check_success()
  except apiproxy_errors.ApplicationError as err:
   raise _to_app_identity_error(err)
  result = []
  for cert in response.public_certificate_list_list():
   result.append(PublicCertificate(cert.key_name(), cert.x509_certificate_pem()))
  return result
 rpc.make_call(_GET_CERTS_METHOD_NAME, request, response, get_certs_result)

def make_get_public_certificates_call ( rpc ) : request = app_identity_service_pb . GetPublicCertificateForAppRequest ( ) response = app_identity_service_pb . GetPublicCertificateForAppResponse ( ) def get_certs_result ( rpc ) : assert ( rpc . service == _APP_IDENTITY_SERVICE_NAME ) , repr ( rpc . service ) assert ( rpc . method == _GET_CERTS_METHOD_NAME ) , repr ( rpc . method ) try : rpc . check_success ( ) except apiproxy_errors . ApplicationError as err : raise _to_app_identity_error ( err ) result = [ ] for cert in response . public_certificate_list_list ( ) : result . append ( PublicCertificate ( cert . key_name ( ) , cert . x509_certificate_pem ( ) ) ) return result rpc . make_call ( _GET_CERTS_METHOD_NAME , request , response , get_certs_result )
executes the rpc call to get a list of public certificates .