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;
19 
20 use Google\Client;
21 
22 /**
23  * Service definition for BigQueryConnectionService (v1beta1).
24  *
25  * <p>
26  * Allows users to manage BigQuery connections to external data sources.</p>
27  *
28  * <p>
29  * For more information about this service, see the API
30  * <a href="https://cloud.google.com/bigquery/" target="_blank">Documentation</a>
31  * </p>
32  *
33  * @author Google, Inc.
34  */
35 class BigQueryConnectionService extends \Google\Service
36 {
37   /** View and manage your data in Google BigQuery and see the email address for your Google Account. */
38   const BIGQUERY =
39       "https://www.googleapis.com/auth/bigquery";
40   /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
41   const CLOUD_PLATFORM =
42       "https://www.googleapis.com/auth/cloud-platform";
43 
44   public $projects_locations_connections;
45 
46   /**
47    * Constructs the internal representation of the BigQueryConnectionService
48    * service.
49    *
50    * @param Client|array $clientOrConfig The client used to deliver requests, or a
51    *                                     config array to pass to a new Client instance.
52    * @param string $rootUrl The root URL used for requests to the service.
53    */
54   public function __construct($clientOrConfig = [], $rootUrl = null)
55   {
56     parent::__construct($clientOrConfig);
57     $this->rootUrl = $rootUrl ?: 'https://bigqueryconnection.googleapis.com/';
58     $this->servicePath = '';
59     $this->batchPath = 'batch';
60     $this->version = 'v1beta1';
61     $this->serviceName = 'bigqueryconnection';
62 
63     $this->projects_locations_connections = new BigQueryConnectionService\Resource\ProjectsLocationsConnections(
64         $this,
65         $this->serviceName,
66         'connections',
67         [
68           'methods' => [
69             'create' => [
70               'path' => 'v1beta1/{+parent}/connections',
71               'httpMethod' => 'POST',
72               'parameters' => [
73                 'parent' => [
74                   'location' => 'path',
75                   'type' => 'string',
76                   'required' => true,
77                 ],
78                 'connectionId' => [
79                   'location' => 'query',
80                   'type' => 'string',
81                 ],
82               ],
83             ],'delete' => [
84               'path' => 'v1beta1/{+name}',
85               'httpMethod' => 'DELETE',
86               'parameters' => [
87                 'name' => [
88                   'location' => 'path',
89                   'type' => 'string',
90                   'required' => true,
91                 ],
92               ],
93             ],'get' => [
94               'path' => 'v1beta1/{+name}',
95               'httpMethod' => 'GET',
96               'parameters' => [
97                 'name' => [
98                   'location' => 'path',
99                   'type' => 'string',
100                   'required' => true,
101                 ],
102               ],
103             ],'getIamPolicy' => [
104               'path' => 'v1beta1/{+resource}:getIamPolicy',
105               'httpMethod' => 'POST',
106               'parameters' => [
107                 'resource' => [
108                   'location' => 'path',
109                   'type' => 'string',
110                   'required' => true,
111                 ],
112               ],
113             ],'list' => [
114               'path' => 'v1beta1/{+parent}/connections',
115               'httpMethod' => 'GET',
116               'parameters' => [
117                 'parent' => [
118                   'location' => 'path',
119                   'type' => 'string',
120                   'required' => true,
121                 ],
122                 'maxResults' => [
123                   'location' => 'query',
124                   'type' => 'integer',
125                 ],
126                 'pageToken' => [
127                   'location' => 'query',
128                   'type' => 'string',
129                 ],
130               ],
131             ],'patch' => [
132               'path' => 'v1beta1/{+name}',
133               'httpMethod' => 'PATCH',
134               'parameters' => [
135                 'name' => [
136                   'location' => 'path',
137                   'type' => 'string',
138                   'required' => true,
139                 ],
140                 'updateMask' => [
141                   'location' => 'query',
142                   'type' => 'string',
143                 ],
144               ],
145             ],'setIamPolicy' => [
146               'path' => 'v1beta1/{+resource}:setIamPolicy',
147               'httpMethod' => 'POST',
148               'parameters' => [
149                 'resource' => [
150                   'location' => 'path',
151                   'type' => 'string',
152                   'required' => true,
153                 ],
154               ],
155             ],'testIamPermissions' => [
156               'path' => 'v1beta1/{+resource}:testIamPermissions',
157               'httpMethod' => 'POST',
158               'parameters' => [
159                 'resource' => [
160                   'location' => 'path',
161                   'type' => 'string',
162                   'required' => true,
163                 ],
164               ],
165             ],'updateCredential' => [
166               'path' => 'v1beta1/{+name}',
167               'httpMethod' => 'PATCH',
168               'parameters' => [
169                 'name' => [
170                   'location' => 'path',
171                   'type' => 'string',
172                   'required' => true,
173                 ],
174               ],
175             ],
176           ]
177         ]
178     );
179   }
180 }
181 
182 // Adding a class alias for backwards compatibility with the previous class name.
183 class_alias(BigQueryConnectionService::class, 'Google_Service_BigQueryConnectionService');
184