Google_JobsServiceResource

The "jobs" collection of methods.

Defined (2)

The class is defined in the following location(s).

/src/contrib/Google_BigqueryService.php  
  1. class Google_JobsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Retrieves the specified job by ID. (jobs.get) 
  5. * @param string $projectId Project ID of the requested job 
  6. * @param string $jobId Job ID of the requested job 
  7. * @param array $optParams Optional parameters. 
  8. * @return Google_Job 
  9. */ 
  10. public function get($projectId, $jobId, $optParams = array()) { 
  11. $params = array('projectId' => $projectId, 'jobId' => $jobId); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('get', array($params)); 
  14. if ($this->useObjects()) { 
  15. return new Google_Job($data); 
  16. } else { 
  17. return $data; 
  18. /** 
  19. * Retrieves the results of a query job. (jobs.getQueryResults) 
  20. * @param string $projectId Project ID of the query job 
  21. * @param string $jobId Job ID of the query job 
  22. * @param array $optParams Optional parameters. 
  23. * @opt_param string maxResults Maximum number of results to read 
  24. * @opt_param string pageToken Page token, returned by a previous call, to request the next page of results 
  25. * @opt_param string startIndex Zero-based index of the starting row 
  26. * @opt_param string timeoutMs How long to wait for the query to complete, in milliseconds, before returning. Default is to return immediately. If the timeout passes before the job completes, the request will fail with a TIMEOUT error 
  27. * @return Google_GetQueryResultsResponse 
  28. */ 
  29. public function getQueryResults($projectId, $jobId, $optParams = array()) { 
  30. $params = array('projectId' => $projectId, 'jobId' => $jobId); 
  31. $params = array_merge($params, $optParams); 
  32. $data = $this->__call('getQueryResults', array($params)); 
  33. if ($this->useObjects()) { 
  34. return new Google_GetQueryResultsResponse($data); 
  35. } else { 
  36. return $data; 
  37. /** 
  38. * Starts a new asynchronous job. (jobs.insert) 
  39. * @param string $projectId Project ID of the project that will be billed for the job 
  40. * @param Google_Job $postBody 
  41. * @param array $optParams Optional parameters. 
  42. * @return Google_Job 
  43. */ 
  44. public function insert($projectId, Google_Job $postBody, $optParams = array()) { 
  45. $params = array('projectId' => $projectId, 'postBody' => $postBody); 
  46. $params = array_merge($params, $optParams); 
  47. $data = $this->__call('insert', array($params)); 
  48. if ($this->useObjects()) { 
  49. return new Google_Job($data); 
  50. } else { 
  51. return $data; 
  52. /** 
  53. * Lists all the Jobs in the specified project that were started by the user. (jobs.list) 
  54. * @param string $projectId Project ID of the jobs to list 
  55. * @param array $optParams Optional parameters. 
  56. * @opt_param bool allUsers Whether to display jobs owned by all users in the project. Default false 
  57. * @opt_param string maxResults Maximum number of results to return 
  58. * @opt_param string pageToken Page token, returned by a previous call, to request the next page of results 
  59. * @opt_param string projection Restrict information returned to a set of selected fields 
  60. * @opt_param string stateFilter Filter for job state 
  61. * @return Google_JobList 
  62. */ 
  63. public function listJobs($projectId, $optParams = array()) { 
  64. $params = array('projectId' => $projectId); 
  65. $params = array_merge($params, $optParams); 
  66. $data = $this->__call('list', array($params)); 
  67. if ($this->useObjects()) { 
  68. return new Google_JobList($data); 
  69. } else { 
  70. return $data; 
  71. /** 
  72. * Runs a BigQuery SQL query synchronously and returns query results if the query completes within a 
  73. * specified timeout. (jobs.query) 
  74. * @param string $projectId Project ID of the project billed for the query 
  75. * @param Google_QueryRequest $postBody 
  76. * @param array $optParams Optional parameters. 
  77. * @return Google_QueryResponse 
  78. */ 
  79. public function query($projectId, Google_QueryRequest $postBody, $optParams = array()) { 
  80. $params = array('projectId' => $projectId, 'postBody' => $postBody); 
  81. $params = array_merge($params, $optParams); 
  82. $data = $this->__call('query', array($params)); 
  83. if ($this->useObjects()) { 
  84. return new Google_QueryResponse($data); 
  85. } else { 
  86. return $data; 
/src/contrib/Google_CoordinateService.php  
  1. class Google_JobsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Retrieves a job, including all the changes made to the job. (jobs.get) 
  5. * @param string $teamId Team ID 
  6. * @param string $jobId Job number 
  7. * @param array $optParams Optional parameters. 
  8. * @return Google_Job 
  9. */ 
  10. public function get($teamId, $jobId, $optParams = array()) { 
  11. $params = array('teamId' => $teamId, 'jobId' => $jobId); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('get', array($params)); 
  14. if ($this->useObjects()) { 
  15. return new Google_Job($data); 
  16. } else { 
  17. return $data; 
  18. /** 
  19. * Inserts a new job. Only the state field of the job should be set. (jobs.insert) 
  20. * @param string $teamId Team ID 
  21. * @param string $address Job address as newline (Unix) separated string 
  22. * @param double $lat The latitude coordinate of this job's location. 
  23. * @param double $lng The longitude coordinate of this job's location. 
  24. * @param string $title Job title 
  25. * @param Google_Job $postBody 
  26. * @param array $optParams Optional parameters. 
  27. * @opt_param string assignee Assignee email address, or empty string to unassign. 
  28. * @opt_param string customField Map from custom field id (from /team//custom_fields) to the field value. For example '123=Alice' 
  29. * @opt_param string customerName Customer name 
  30. * @opt_param string customerPhoneNumber Customer phone number 
  31. * @opt_param string note Job note as newline (Unix) separated string 
  32. * @return Google_Job 
  33. */ 
  34. public function insert($teamId, $address, $lat, $lng, $title, Google_Job $postBody, $optParams = array()) { 
  35. $params = array('teamId' => $teamId, 'address' => $address, 'lat' => $lat, 'lng' => $lng, 'title' => $title, 'postBody' => $postBody); 
  36. $params = array_merge($params, $optParams); 
  37. $data = $this->__call('insert', array($params)); 
  38. if ($this->useObjects()) { 
  39. return new Google_Job($data); 
  40. } else { 
  41. return $data; 
  42. /** 
  43. * Retrieves jobs created or modified since the given timestamp. (jobs.list) 
  44. * @param string $teamId Team ID 
  45. * @param array $optParams Optional parameters. 
  46. * @opt_param string maxResults Maximum number of results to return in one page. 
  47. * @opt_param string minModifiedTimestampMs Minimum time a job was modified in milliseconds since epoch. 
  48. * @opt_param string pageToken Continuation token 
  49. * @return Google_JobListResponse 
  50. */ 
  51. public function listJobs($teamId, $optParams = array()) { 
  52. $params = array('teamId' => $teamId); 
  53. $params = array_merge($params, $optParams); 
  54. $data = $this->__call('list', array($params)); 
  55. if ($this->useObjects()) { 
  56. return new Google_JobListResponse($data); 
  57. } else { 
  58. return $data; 
  59. /** 
  60. * Updates a job. Fields that are set in the job state will be updated. This method supports patch 
  61. * semantics. (jobs.patch) 
  62. * @param string $teamId Team ID 
  63. * @param string $jobId Job number 
  64. * @param Google_Job $postBody 
  65. * @param array $optParams Optional parameters. 
  66. * @opt_param string address Job address as newline (Unix) separated string 
  67. * @opt_param string assignee Assignee email address, or empty string to unassign. 
  68. * @opt_param string customField Map from custom field id (from /team//custom_fields) to the field value. For example '123=Alice' 
  69. * @opt_param string customerName Customer name 
  70. * @opt_param string customerPhoneNumber Customer phone number 
  71. * @opt_param double lat The latitude coordinate of this job's location. 
  72. * @opt_param double lng The longitude coordinate of this job's location. 
  73. * @opt_param string note Job note as newline (Unix) separated string 
  74. * @opt_param string progress Job progress 
  75. * @opt_param string title Job title 
  76. * @return Google_Job 
  77. */ 
  78. public function patch($teamId, $jobId, Google_Job $postBody, $optParams = array()) { 
  79. $params = array('teamId' => $teamId, 'jobId' => $jobId, 'postBody' => $postBody); 
  80. $params = array_merge($params, $optParams); 
  81. $data = $this->__call('patch', array($params)); 
  82. if ($this->useObjects()) { 
  83. return new Google_Job($data); 
  84. } else { 
  85. return $data; 
  86. /** 
  87. * Updates a job. Fields that are set in the job state will be updated. (jobs.update) 
  88. * @param string $teamId Team ID 
  89. * @param string $jobId Job number 
  90. * @param Google_Job $postBody 
  91. * @param array $optParams Optional parameters. 
  92. * @opt_param string address Job address as newline (Unix) separated string 
  93. * @opt_param string assignee Assignee email address, or empty string to unassign. 
  94. * @opt_param string customField Map from custom field id (from /team//custom_fields) to the field value. For example '123=Alice' 
  95. * @opt_param string customerName Customer name 
  96. * @opt_param string customerPhoneNumber Customer phone number 
  97. * @opt_param double lat The latitude coordinate of this job's location. 
  98. * @opt_param double lng The longitude coordinate of this job's location. 
  99. * @opt_param string note Job note as newline (Unix) separated string 
  100. * @opt_param string progress Job progress 
  101. * @opt_param string title Job title 
  102. * @return Google_Job 
  103. */ 
  104. public function update($teamId, $jobId, Google_Job $postBody, $optParams = array()) { 
  105. $params = array('teamId' => $teamId, 'jobId' => $jobId, 'postBody' => $postBody); 
  106. $params = array_merge($params, $optParams); 
  107. $data = $this->__call('update', array($params)); 
  108. if ($this->useObjects()) { 
  109. return new Google_Job($data); 
  110. } else { 
  111. return $data;