source: vendor/google/apiclient-services/src/BigQueryConnectionService/Resource/ProjectsLocationsConnections.php

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

Upload project files

  • Property mode set to 100644
File size: 7.8 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\BigQueryConnectionService\Resource;
19
20use Google\Service\BigQueryConnectionService\BigqueryconnectionEmpty;
21use Google\Service\BigQueryConnectionService\Connection;
22use Google\Service\BigQueryConnectionService\GetIamPolicyRequest;
23use Google\Service\BigQueryConnectionService\ListConnectionsResponse;
24use Google\Service\BigQueryConnectionService\Policy;
25use Google\Service\BigQueryConnectionService\SetIamPolicyRequest;
26use Google\Service\BigQueryConnectionService\TestIamPermissionsRequest;
27use Google\Service\BigQueryConnectionService\TestIamPermissionsResponse;
28
29/**
30 * The "connections" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $bigqueryconnectionService = new Google\Service\BigQueryConnectionService(...);
34 * $connections = $bigqueryconnectionService->projects_locations_connections;
35 * </code>
36 */
37class ProjectsLocationsConnections extends \Google\Service\Resource
38{
39 /**
40 * Creates a new connection. (connections.create)
41 *
42 * @param string $parent Required. Parent resource name. Must be in the format
43 * `projects/{project_id}/locations/{location_id}`
44 * @param Connection $postBody
45 * @param array $optParams Optional parameters.
46 *
47 * @opt_param string connectionId Optional. Connection id that should be
48 * assigned to the created connection.
49 * @return Connection
50 * @throws \Google\Service\Exception
51 */
52 public function create($parent, Connection $postBody, $optParams = [])
53 {
54 $params = ['parent' => $parent, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('create', [$params], Connection::class);
57 }
58 /**
59 * Deletes connection and associated credential. (connections.delete)
60 *
61 * @param string $name Required. Name of the deleted connection, for example:
62 * `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
63 * @param array $optParams Optional parameters.
64 * @return BigqueryconnectionEmpty
65 * @throws \Google\Service\Exception
66 */
67 public function delete($name, $optParams = [])
68 {
69 $params = ['name' => $name];
70 $params = array_merge($params, $optParams);
71 return $this->call('delete', [$params], BigqueryconnectionEmpty::class);
72 }
73 /**
74 * Returns specified connection. (connections.get)
75 *
76 * @param string $name Required. Name of the requested connection, for example:
77 * `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
78 * @param array $optParams Optional parameters.
79 * @return Connection
80 * @throws \Google\Service\Exception
81 */
82 public function get($name, $optParams = [])
83 {
84 $params = ['name' => $name];
85 $params = array_merge($params, $optParams);
86 return $this->call('get', [$params], Connection::class);
87 }
88 /**
89 * Gets the access control policy for a resource. Returns an empty policy if the
90 * resource exists and does not have a policy set. (connections.getIamPolicy)
91 *
92 * @param string $resource REQUIRED: The resource for which the policy is being
93 * requested. See [Resource
94 * names](https://cloud.google.com/apis/design/resource_names) for the
95 * appropriate value for this field.
96 * @param GetIamPolicyRequest $postBody
97 * @param array $optParams Optional parameters.
98 * @return Policy
99 * @throws \Google\Service\Exception
100 */
101 public function getIamPolicy($resource, GetIamPolicyRequest $postBody, $optParams = [])
102 {
103 $params = ['resource' => $resource, 'postBody' => $postBody];
104 $params = array_merge($params, $optParams);
105 return $this->call('getIamPolicy', [$params], Policy::class);
106 }
107 /**
108 * Returns a list of connections in the given project.
109 * (connections.listProjectsLocationsConnections)
110 *
111 * @param string $parent Required. Parent resource name. Must be in the form:
112 * `projects/{project_id}/locations/{location_id}`
113 * @param array $optParams Optional parameters.
114 *
115 * @opt_param int pageSize Required. Page size.
116 * @opt_param string pageToken Page token.
117 * @return ListConnectionsResponse
118 * @throws \Google\Service\Exception
119 */
120 public function listProjectsLocationsConnections($parent, $optParams = [])
121 {
122 $params = ['parent' => $parent];
123 $params = array_merge($params, $optParams);
124 return $this->call('list', [$params], ListConnectionsResponse::class);
125 }
126 /**
127 * Updates the specified connection. For security reasons, also resets
128 * credential if connection properties are in the update field mask.
129 * (connections.patch)
130 *
131 * @param string $name Required. Name of the connection to update, for example:
132 * `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
133 * @param Connection $postBody
134 * @param array $optParams Optional parameters.
135 *
136 * @opt_param string updateMask Required. Update mask for the connection fields
137 * to be updated.
138 * @return Connection
139 * @throws \Google\Service\Exception
140 */
141 public function patch($name, Connection $postBody, $optParams = [])
142 {
143 $params = ['name' => $name, 'postBody' => $postBody];
144 $params = array_merge($params, $optParams);
145 return $this->call('patch', [$params], Connection::class);
146 }
147 /**
148 * Sets the access control policy on the specified resource. Replaces any
149 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
150 * `PERMISSION_DENIED` errors. (connections.setIamPolicy)
151 *
152 * @param string $resource REQUIRED: The resource for which the policy is being
153 * specified. See [Resource
154 * names](https://cloud.google.com/apis/design/resource_names) for the
155 * appropriate value for this field.
156 * @param SetIamPolicyRequest $postBody
157 * @param array $optParams Optional parameters.
158 * @return Policy
159 * @throws \Google\Service\Exception
160 */
161 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
162 {
163 $params = ['resource' => $resource, 'postBody' => $postBody];
164 $params = array_merge($params, $optParams);
165 return $this->call('setIamPolicy', [$params], Policy::class);
166 }
167 /**
168 * Returns permissions that a caller has on the specified resource. If the
169 * resource does not exist, this will return an empty set of permissions, not a
170 * `NOT_FOUND` error. Note: This operation is designed to be used for building
171 * permission-aware UIs and command-line tools, not for authorization checking.
172 * This operation may "fail open" without warning.
173 * (connections.testIamPermissions)
174 *
175 * @param string $resource REQUIRED: The resource for which the policy detail is
176 * being requested. See [Resource
177 * names](https://cloud.google.com/apis/design/resource_names) for the
178 * appropriate value for this field.
179 * @param TestIamPermissionsRequest $postBody
180 * @param array $optParams Optional parameters.
181 * @return TestIamPermissionsResponse
182 * @throws \Google\Service\Exception
183 */
184 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
185 {
186 $params = ['resource' => $resource, 'postBody' => $postBody];
187 $params = array_merge($params, $optParams);
188 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
189 }
190}
191
192// Adding a class alias for backwards compatibility with the previous class name.
193class_alias(ProjectsLocationsConnections::class, 'Google_Service_BigQueryConnectionService_Resource_ProjectsLocationsConnections');
Note: See TracBrowser for help on using the repository browser.