import logging


def _VerifyOptions(options):
  """Verify the passed-in options.

  Args:
    options: The parsed options to verify.

  Returns:
    Boolean, True if verification passes, False otherwise.
  """
  if options.endpoints_service and not options.openapi_template:
    logging.error('Please specify openAPI template with --openapi_template '
                  'in deploying endpoints.')
    return False

  if options.openapi_template and not options.endpoints_service:
    logging.error('Please specify endpoints service with --endpoints_service '
                  'in deploying endpoints.')
    return False

  if (options.endpoints_service and
      options.project_id not in options.endpoints_service):
    logging.error('The project "%s" is not matched to the endpoints service '
                  '"%s".', options.project_id, options.endpoints_service)
    return False

  return True