def _build_predict_tx_message(msg, msg_uuid, row, model_name, model_gcp_project,
                              model_region, model_date, model_api_endpoint):
  """Creates a JSON object for predict transaction cloud function.

  Args:
    msg: A JSON object representing the original message received by this cloud
      function
    msg_uuid: A string representing the unique identifier of the processing
      batch
    row: An array representing the data to be predicted
    model_name: A string representing the name of the prediction model to be
      used
    model_gcp_project: A string representing the name of the GCP project
    model_region: A string representing the region where the model resides
    model_date: A string representing the date of the model
    model_api_endpoint: A string representing the API endpoint of the model
      (different per region)

  Returns:
    A JSON object containing all the input parameters together.
  """
  return {
      'uuid': msg_uuid,
      'row': row,
      'model_project': model_gcp_project,
      'model_region': model_region,
      'model_api_endpoint': model_api_endpoint,
      'model_name': model_name,
      'model_date': model_date,
      'bq_output_table': msg['bq_output_table'] + '_' + msg['date'],
  }