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