source: vendor/google/apiclient-services/src/BigQueryDataTransfer/Resource/ProjectsDataSources.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 3.9 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\BigQueryDataTransfer\Resource;
19
20use Google\Service\BigQueryDataTransfer\CheckValidCredsRequest;
21use Google\Service\BigQueryDataTransfer\CheckValidCredsResponse;
22use Google\Service\BigQueryDataTransfer\DataSource;
23use Google\Service\BigQueryDataTransfer\ListDataSourcesResponse;
24
25/**
26 * The "dataSources" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $bigquerydatatransferService = new Google\Service\BigQueryDataTransfer(...);
30 * $dataSources = $bigquerydatatransferService->projects_dataSources;
31 * </code>
32 */
33class ProjectsDataSources extends \Google\Service\Resource
34{
35 /**
36 * Returns true if valid credentials exist for the given data source and
37 * requesting user. (dataSources.checkValidCreds)
38 *
39 * @param string $name Required. The data source in the form:
40 * `projects/{project_id}/dataSources/{data_source_id}` or
41 * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
42 * @param CheckValidCredsRequest $postBody
43 * @param array $optParams Optional parameters.
44 * @return CheckValidCredsResponse
45 * @throws \Google\Service\Exception
46 */
47 public function checkValidCreds($name, CheckValidCredsRequest $postBody, $optParams = [])
48 {
49 $params = ['name' => $name, 'postBody' => $postBody];
50 $params = array_merge($params, $optParams);
51 return $this->call('checkValidCreds', [$params], CheckValidCredsResponse::class);
52 }
53 /**
54 * Retrieves a supported data source and returns its settings. (dataSources.get)
55 *
56 * @param string $name Required. The field will contain name of the resource
57 * requested, for example: `projects/{project_id}/dataSources/{data_source_id}`
58 * or
59 * `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`
60 * @param array $optParams Optional parameters.
61 * @return DataSource
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], DataSource::class);
69 }
70 /**
71 * Lists supported data sources and returns their settings.
72 * (dataSources.listProjectsDataSources)
73 *
74 * @param string $parent Required. The BigQuery project id for which data
75 * sources should be returned. Must be in the form: `projects/{project_id}` or
76 * `projects/{project_id}/locations/{location_id}`
77 * @param array $optParams Optional parameters.
78 *
79 * @opt_param int pageSize Page size. The default page size is the maximum value
80 * of 1000 results.
81 * @opt_param string pageToken Pagination token, which can be used to request a
82 * specific page of `ListDataSourcesRequest` list results. For multiple-page
83 * results, `ListDataSourcesResponse` outputs a `next_page` token, which can be
84 * used as the `page_token` value to request the next page of list results.
85 * @return ListDataSourcesResponse
86 * @throws \Google\Service\Exception
87 */
88 public function listProjectsDataSources($parent, $optParams = [])
89 {
90 $params = ['parent' => $parent];
91 $params = array_merge($params, $optParams);
92 return $this->call('list', [$params], ListDataSourcesResponse::class);
93 }
94}
95
96// Adding a class alias for backwards compatibility with the previous class name.
97class_alias(ProjectsDataSources::class, 'Google_Service_BigQueryDataTransfer_Resource_ProjectsDataSources');
Note: See TracBrowser for help on using the repository browser.