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\EnrollDataSourcesRequest;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "projects" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $bigquerydatatransferService = new Google\Service\BigQueryDataTransfer(...);
|
---|
28 | * $projects = $bigquerydatatransferService->projects;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class Projects extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Enroll data sources in a user project. This allows users to create transfer
|
---|
35 | * configurations for these data sources. They will also appear in the
|
---|
36 | * ListDataSources RPC and as such, will appear in the [BigQuery
|
---|
37 | * UI](https://console.cloud.google.com/bigquery), and the documents can be
|
---|
38 | * found in the public guide for [BigQuery Web
|
---|
39 | * UI](https://cloud.google.com/bigquery/bigquery-web-ui) and [Data Transfer
|
---|
40 | * Service](https://cloud.google.com/bigquery/docs/working-with-transfers).
|
---|
41 | * (projects.enrollDataSources)
|
---|
42 | *
|
---|
43 | * @param string $name Required. The name of the project resource in the form:
|
---|
44 | * `projects/{project_id}`
|
---|
45 | * @param EnrollDataSourcesRequest $postBody
|
---|
46 | * @param array $optParams Optional parameters.
|
---|
47 | * @return BigquerydatatransferEmpty
|
---|
48 | * @throws \Google\Service\Exception
|
---|
49 | */
|
---|
50 | public function enrollDataSources($name, EnrollDataSourcesRequest $postBody, $optParams = [])
|
---|
51 | {
|
---|
52 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
53 | $params = array_merge($params, $optParams);
|
---|
54 | return $this->call('enrollDataSources', [$params], BigquerydatatransferEmpty::class);
|
---|
55 | }
|
---|
56 | }
|
---|
57 |
|
---|
58 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
59 | class_alias(Projects::class, 'Google_Service_BigQueryDataTransfer_Resource_Projects');
|
---|