source: vendor/google/apiclient-services/src/Dataflow/Resource/ProjectsJobsWorkItems.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload project files

  • Property mode set to 100644
File size: 2.7 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Dataflow\Resource;
19
20use Google\Service\Dataflow\LeaseWorkItemRequest;
21use Google\Service\Dataflow\LeaseWorkItemResponse;
22use Google\Service\Dataflow\ReportWorkItemStatusRequest;
23use Google\Service\Dataflow\ReportWorkItemStatusResponse;
24
25/**
26 * The "workItems" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $dataflowService = new Google\Service\Dataflow(...);
30 * $workItems = $dataflowService->projects_jobs_workItems;
31 * </code>
32 */
33class ProjectsJobsWorkItems extends \Google\Service\Resource
34{
35 /**
36 * Leases a dataflow WorkItem to run. (workItems.lease)
37 *
38 * @param string $projectId Identifies the project this worker belongs to.
39 * @param string $jobId Identifies the workflow job this worker belongs to.
40 * @param LeaseWorkItemRequest $postBody
41 * @param array $optParams Optional parameters.
42 * @return LeaseWorkItemResponse
43 * @throws \Google\Service\Exception
44 */
45 public function lease($projectId, $jobId, LeaseWorkItemRequest $postBody, $optParams = [])
46 {
47 $params = ['projectId' => $projectId, 'jobId' => $jobId, 'postBody' => $postBody];
48 $params = array_merge($params, $optParams);
49 return $this->call('lease', [$params], LeaseWorkItemResponse::class);
50 }
51 /**
52 * Reports the status of dataflow WorkItems leased by a worker.
53 * (workItems.reportStatus)
54 *
55 * @param string $projectId The project which owns the WorkItem's job.
56 * @param string $jobId The job which the WorkItem is part of.
57 * @param ReportWorkItemStatusRequest $postBody
58 * @param array $optParams Optional parameters.
59 * @return ReportWorkItemStatusResponse
60 * @throws \Google\Service\Exception
61 */
62 public function reportStatus($projectId, $jobId, ReportWorkItemStatusRequest $postBody, $optParams = [])
63 {
64 $params = ['projectId' => $projectId, 'jobId' => $jobId, 'postBody' => $postBody];
65 $params = array_merge($params, $optParams);
66 return $this->call('reportStatus', [$params], ReportWorkItemStatusResponse::class);
67 }
68}
69
70// Adding a class alias for backwards compatibility with the previous class name.
71class_alias(ProjectsJobsWorkItems::class, 'Google_Service_Dataflow_Resource_ProjectsJobsWorkItems');
Note: See TracBrowser for help on using the repository browser.