def create_job_request()

in python-batch/batch.py [0:0]


  def create_job_request(self) -> batch_v1.Job:

      # Define what will be done as part of the job.

      self._create_runnable()
      self._create_task()
      self.task.runnables = [self.runnable]
      self._create_taskgroup()
      self._create_allocation_policy()
      self._create_job_request()

      create_request = batch_v1.CreateJobRequest()
      create_request.job = self.job
      create_request.job_id = self.job_id
      
      # The job's parent is the region in which the job will run
      create_request.parent = f'projects/{ self.project_id }/locations/{self.config["region"]}'

      return(create_request)