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 | use Google\Service\BigQueryDataTransfer\ListLocationsResponse;
|
---|
23 | use Google\Service\BigQueryDataTransfer\Location;
|
---|
24 | use Google\Service\BigQueryDataTransfer\UnenrollDataSourcesRequest;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "locations" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $bigquerydatatransferService = new Google\Service\BigQueryDataTransfer(...);
|
---|
31 | * $locations = $bigquerydatatransferService->projects_locations;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class ProjectsLocations extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Enroll data sources in a user project. This allows users to create transfer
|
---|
38 | * configurations for these data sources. They will also appear in the
|
---|
39 | * ListDataSources RPC and as such, will appear in the [BigQuery
|
---|
40 | * UI](https://console.cloud.google.com/bigquery), and the documents can be
|
---|
41 | * found in the public guide for [BigQuery Web
|
---|
42 | * UI](https://cloud.google.com/bigquery/bigquery-web-ui) and [Data Transfer
|
---|
43 | * Service](https://cloud.google.com/bigquery/docs/working-with-transfers).
|
---|
44 | * (locations.enrollDataSources)
|
---|
45 | *
|
---|
46 | * @param string $name Required. The name of the project resource in the form:
|
---|
47 | * `projects/{project_id}`
|
---|
48 | * @param EnrollDataSourcesRequest $postBody
|
---|
49 | * @param array $optParams Optional parameters.
|
---|
50 | * @return BigquerydatatransferEmpty
|
---|
51 | * @throws \Google\Service\Exception
|
---|
52 | */
|
---|
53 | public function enrollDataSources($name, EnrollDataSourcesRequest $postBody, $optParams = [])
|
---|
54 | {
|
---|
55 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
56 | $params = array_merge($params, $optParams);
|
---|
57 | return $this->call('enrollDataSources', [$params], BigquerydatatransferEmpty::class);
|
---|
58 | }
|
---|
59 | /**
|
---|
60 | * Gets information about a location. (locations.get)
|
---|
61 | *
|
---|
62 | * @param string $name Resource name for the location.
|
---|
63 | * @param array $optParams Optional parameters.
|
---|
64 | * @return Location
|
---|
65 | * @throws \Google\Service\Exception
|
---|
66 | */
|
---|
67 | public function get($name, $optParams = [])
|
---|
68 | {
|
---|
69 | $params = ['name' => $name];
|
---|
70 | $params = array_merge($params, $optParams);
|
---|
71 | return $this->call('get', [$params], Location::class);
|
---|
72 | }
|
---|
73 | /**
|
---|
74 | * Lists information about the supported locations for this service.
|
---|
75 | * (locations.listProjectsLocations)
|
---|
76 | *
|
---|
77 | * @param string $name The resource that owns the locations collection, if
|
---|
78 | * applicable.
|
---|
79 | * @param array $optParams Optional parameters.
|
---|
80 | *
|
---|
81 | * @opt_param string filter A filter to narrow down results to a preferred
|
---|
82 | * subset. The filtering language accepts strings like `"displayName=tokyo"`,
|
---|
83 | * and is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
---|
84 | * @opt_param int pageSize The maximum number of results to return. If not set,
|
---|
85 | * the service selects a default.
|
---|
86 | * @opt_param string pageToken A page token received from the `next_page_token`
|
---|
87 | * field in the response. Send that page token to receive the subsequent page.
|
---|
88 | * @return ListLocationsResponse
|
---|
89 | * @throws \Google\Service\Exception
|
---|
90 | */
|
---|
91 | public function listProjectsLocations($name, $optParams = [])
|
---|
92 | {
|
---|
93 | $params = ['name' => $name];
|
---|
94 | $params = array_merge($params, $optParams);
|
---|
95 | return $this->call('list', [$params], ListLocationsResponse::class);
|
---|
96 | }
|
---|
97 | /**
|
---|
98 | * Unenroll data sources in a user project. This allows users to remove transfer
|
---|
99 | * configurations for these data sources. They will no longer appear in the
|
---|
100 | * ListDataSources RPC and will also no longer appear in the [BigQuery
|
---|
101 | * UI](https://console.cloud.google.com/bigquery). Data transfers configurations
|
---|
102 | * of unenrolled data sources will not be scheduled.
|
---|
103 | * (locations.unenrollDataSources)
|
---|
104 | *
|
---|
105 | * @param string $name Required. The name of the project resource in the form:
|
---|
106 | * `projects/{project_id}`
|
---|
107 | * @param UnenrollDataSourcesRequest $postBody
|
---|
108 | * @param array $optParams Optional parameters.
|
---|
109 | * @return BigquerydatatransferEmpty
|
---|
110 | * @throws \Google\Service\Exception
|
---|
111 | */
|
---|
112 | public function unenrollDataSources($name, UnenrollDataSourcesRequest $postBody, $optParams = [])
|
---|
113 | {
|
---|
114 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
115 | $params = array_merge($params, $optParams);
|
---|
116 | return $this->call('unenrollDataSources', [$params], BigquerydatatransferEmpty::class);
|
---|
117 | }
|
---|
118 | }
|
---|
119 |
|
---|
120 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
121 | class_alias(ProjectsLocations::class, 'Google_Service_BigQueryDataTransfer_Resource_ProjectsLocations');
|
---|