code: def to_api_repr(self):
          
          resource = copy.deepcopy(self._properties)
  
          # Query parameters have an addition property associated with them
          # to indicate if the query is using named or positional parameters.
          query_parameters = resource["query"].get("queryParameters")
          if query_parameters:
              if query_parameters[0].get("name") is None:
                  resource["query"]["parameterMode"] = "POSITIONAL"
              else:
                  resource["query"]["parameterMode"] = "NAMED"
  
          return resource
docs: Build an API representation of the query job config.
  
          Returns:
              dict: A dictionary in the format used by the BigQuery API.