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\BigQueryDataTransfer\Resource;
19
20use Google\Service\BigQueryDataTransfer\BigquerydatatransferEmpty;
21use Google\Service\BigQueryDataTransfer\ListTransferRunsResponse;
22use Google\Service\BigQueryDataTransfer\TransferRun;
23
24/**
25 * The "runs" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $bigquerydatatransferService = new Google\Service\BigQueryDataTransfer(...);
29 *   $runs = $bigquerydatatransferService->runs;
30 *  </code>
31 */
32class ProjectsLocationsTransferConfigsRuns extends \Google\Service\Resource
33{
34  /**
35   * Deletes the specified transfer run. (runs.delete)
36   *
37   * @param string $name Required. The field will contain name of the resource
38   * requested, for example:
39   * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or `project
40   * s/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_
41   * id}`
42   * @param array $optParams Optional parameters.
43   * @return BigquerydatatransferEmpty
44   */
45  public function delete($name, $optParams = [])
46  {
47    $params = ['name' => $name];
48    $params = array_merge($params, $optParams);
49    return $this->call('delete', [$params], BigquerydatatransferEmpty::class);
50  }
51  /**
52   * Returns information about the particular transfer run. (runs.get)
53   *
54   * @param string $name Required. The field will contain name of the resource
55   * requested, for example:
56   * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or `project
57   * s/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_
58   * id}`
59   * @param array $optParams Optional parameters.
60   * @return TransferRun
61   */
62  public function get($name, $optParams = [])
63  {
64    $params = ['name' => $name];
65    $params = array_merge($params, $optParams);
66    return $this->call('get', [$params], TransferRun::class);
67  }
68  /**
69   * Returns information about running and completed transfer runs.
70   * (runs.listProjectsLocationsTransferConfigsRuns)
71   *
72   * @param string $parent Required. Name of transfer configuration for which
73   * transfer runs should be retrieved. Format of transfer configuration resource
74   * name is: `projects/{project_id}/transferConfigs/{config_id}` or
75   * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
76   * @param array $optParams Optional parameters.
77   *
78   * @opt_param int pageSize Page size. The default page size is the maximum value
79   * of 1000 results.
80   * @opt_param string pageToken Pagination token, which can be used to request a
81   * specific page of `ListTransferRunsRequest` list results. For multiple-page
82   * results, `ListTransferRunsResponse` outputs a `next_page` token, which can be
83   * used as the `page_token` value to request the next page of list results.
84   * @opt_param string runAttempt Indicates how run attempts are to be pulled.
85   * @opt_param string states When specified, only transfer runs with requested
86   * states are returned.
87   * @return ListTransferRunsResponse
88   */
89  public function listProjectsLocationsTransferConfigsRuns($parent, $optParams = [])
90  {
91    $params = ['parent' => $parent];
92    $params = array_merge($params, $optParams);
93    return $this->call('list', [$params], ListTransferRunsResponse::class);
94  }
95}
96
97// Adding a class alias for backwards compatibility with the previous class name.
98class_alias(ProjectsLocationsTransferConfigsRuns::class, 'Google_Service_BigQueryDataTransfer_Resource_ProjectsLocationsTransferConfigsRuns');
99