Google_JobsServiceResource
The "jobs" collection of methods.
Defined (2)
The class is defined in the following location(s).
- /src/contrib/Google_BigqueryService.php
- class Google_JobsServiceResource extends Google_ServiceResource {
- /**
- * Retrieves the specified job by ID. (jobs.get)
- *
- * @param string $projectId Project ID of the requested job
- * @param string $jobId Job ID of the requested job
- * @param array $optParams Optional parameters.
- * @return Google_Job
- */
- public function get($projectId, $jobId, $optParams = array()) {
- $params = array('projectId' => $projectId, 'jobId' => $jobId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Job($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves the results of a query job. (jobs.getQueryResults)
- *
- * @param string $projectId Project ID of the query job
- * @param string $jobId Job ID of the query job
- * @param array $optParams Optional parameters.
- *
- * @opt_param string maxResults Maximum number of results to read
- * @opt_param string pageToken Page token, returned by a previous call, to request the next page of results
- * @opt_param string startIndex Zero-based index of the starting row
- * @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
- * @return Google_GetQueryResultsResponse
- */
- public function getQueryResults($projectId, $jobId, $optParams = array()) {
- $params = array('projectId' => $projectId, 'jobId' => $jobId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('getQueryResults', array($params));
- if ($this->useObjects()) {
- return new Google_GetQueryResultsResponse($data);
- } else {
- return $data;
- }
- }
- /**
- * Starts a new asynchronous job. (jobs.insert)
- *
- * @param string $projectId Project ID of the project that will be billed for the job
- * @param Google_Job $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Job
- */
- public function insert($projectId, Google_Job $postBody, $optParams = array()) {
- $params = array('projectId' => $projectId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Job($data);
- } else {
- return $data;
- }
- }
- /**
- * Lists all the Jobs in the specified project that were started by the user. (jobs.list)
- *
- * @param string $projectId Project ID of the jobs to list
- * @param array $optParams Optional parameters.
- *
- * @opt_param bool allUsers Whether to display jobs owned by all users in the project. Default false
- * @opt_param string maxResults Maximum number of results to return
- * @opt_param string pageToken Page token, returned by a previous call, to request the next page of results
- * @opt_param string projection Restrict information returned to a set of selected fields
- * @opt_param string stateFilter Filter for job state
- * @return Google_JobList
- */
- public function listJobs($projectId, $optParams = array()) {
- $params = array('projectId' => $projectId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_JobList($data);
- } else {
- return $data;
- }
- }
- /**
- * Runs a BigQuery SQL query synchronously and returns query results if the query completes within a
- * specified timeout. (jobs.query)
- *
- * @param string $projectId Project ID of the project billed for the query
- * @param Google_QueryRequest $postBody
- * @param array $optParams Optional parameters.
- * @return Google_QueryResponse
- */
- public function query($projectId, Google_QueryRequest $postBody, $optParams = array()) {
- $params = array('projectId' => $projectId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('query', array($params));
- if ($this->useObjects()) {
- return new Google_QueryResponse($data);
- } else {
- return $data;
- }
- }
- }
- /src/contrib/Google_CoordinateService.php
- class Google_JobsServiceResource extends Google_ServiceResource {
- /**
- * Retrieves a job, including all the changes made to the job. (jobs.get)
- *
- * @param string $teamId Team ID
- * @param string $jobId Job number
- * @param array $optParams Optional parameters.
- * @return Google_Job
- */
- public function get($teamId, $jobId, $optParams = array()) {
- $params = array('teamId' => $teamId, 'jobId' => $jobId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Job($data);
- } else {
- return $data;
- }
- }
- /**
- * Inserts a new job. Only the state field of the job should be set. (jobs.insert)
- *
- * @param string $teamId Team ID
- * @param string $address Job address as newline (Unix) separated string
- * @param double $lat The latitude coordinate of this job's location.
- * @param double $lng The longitude coordinate of this job's location.
- * @param string $title Job title
- * @param Google_Job $postBody
- * @param array $optParams Optional parameters.
- *
- * @opt_param string assignee Assignee email address, or empty string to unassign.
- * @opt_param string customField Map from custom field id (from /team//custom_fields) to the field value. For example '123=Alice'
- * @opt_param string customerName Customer name
- * @opt_param string customerPhoneNumber Customer phone number
- * @opt_param string note Job note as newline (Unix) separated string
- * @return Google_Job
- */
- public function insert($teamId, $address, $lat, $lng, $title, Google_Job $postBody, $optParams = array()) {
- $params = array('teamId' => $teamId, 'address' => $address, 'lat' => $lat, 'lng' => $lng, 'title' => $title, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Job($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves jobs created or modified since the given timestamp. (jobs.list)
- *
- * @param string $teamId Team ID
- * @param array $optParams Optional parameters.
- *
- * @opt_param string maxResults Maximum number of results to return in one page.
- * @opt_param string minModifiedTimestampMs Minimum time a job was modified in milliseconds since epoch.
- * @opt_param string pageToken Continuation token
- * @return Google_JobListResponse
- */
- public function listJobs($teamId, $optParams = array()) {
- $params = array('teamId' => $teamId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_JobListResponse($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates a job. Fields that are set in the job state will be updated. This method supports patch
- * semantics. (jobs.patch)
- *
- * @param string $teamId Team ID
- * @param string $jobId Job number
- * @param Google_Job $postBody
- * @param array $optParams Optional parameters.
- *
- * @opt_param string address Job address as newline (Unix) separated string
- * @opt_param string assignee Assignee email address, or empty string to unassign.
- * @opt_param string customField Map from custom field id (from /team//custom_fields) to the field value. For example '123=Alice'
- * @opt_param string customerName Customer name
- * @opt_param string customerPhoneNumber Customer phone number
- * @opt_param double lat The latitude coordinate of this job's location.
- * @opt_param double lng The longitude coordinate of this job's location.
- * @opt_param string note Job note as newline (Unix) separated string
- * @opt_param string progress Job progress
- * @opt_param string title Job title
- * @return Google_Job
- */
- public function patch($teamId, $jobId, Google_Job $postBody, $optParams = array()) {
- $params = array('teamId' => $teamId, 'jobId' => $jobId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('patch', array($params));
- if ($this->useObjects()) {
- return new Google_Job($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates a job. Fields that are set in the job state will be updated. (jobs.update)
- *
- * @param string $teamId Team ID
- * @param string $jobId Job number
- * @param Google_Job $postBody
- * @param array $optParams Optional parameters.
- *
- * @opt_param string address Job address as newline (Unix) separated string
- * @opt_param string assignee Assignee email address, or empty string to unassign.
- * @opt_param string customField Map from custom field id (from /team//custom_fields) to the field value. For example '123=Alice'
- * @opt_param string customerName Customer name
- * @opt_param string customerPhoneNumber Customer phone number
- * @opt_param double lat The latitude coordinate of this job's location.
- * @opt_param double lng The longitude coordinate of this job's location.
- * @opt_param string note Job note as newline (Unix) separated string
- * @opt_param string progress Job progress
- * @opt_param string title Job title
- * @return Google_Job
- */
- public function update($teamId, $jobId, Google_Job $postBody, $optParams = array()) {
- $params = array('teamId' => $teamId, 'jobId' => $jobId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_Job($data);
- } else {
- return $data;
- }
- }
- }