def _GetRequestParams(options):
  """Extracts request parameters which will be passed to PostTryJob.

  Args:
    options: The options object parsed from the command line.

  Returns:
    A dictionary with parameters to pass to PostTryJob.
  """
  params = {
      'user': options.user,
      'name': options.name,
  }
  # Add other parameters if they're available in the options object.
  for key in ['email', 'revision', 'root', 'bot', 'patch']:
    option = getattr(options, key)
    if option:
      params[key] = option
  return params