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

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

Upload project files

  • Property mode set to 100644
File size: 13.5 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\BeyondCorp\Resource;
19
20use Google\Service\BeyondCorp\Connection;
21use Google\Service\BeyondCorp\GoogleIamV1Policy;
22use Google\Service\BeyondCorp\GoogleIamV1SetIamPolicyRequest;
23use Google\Service\BeyondCorp\GoogleIamV1TestIamPermissionsRequest;
24use Google\Service\BeyondCorp\GoogleIamV1TestIamPermissionsResponse;
25use Google\Service\BeyondCorp\GoogleLongrunningOperation;
26use Google\Service\BeyondCorp\ListConnectionsResponse;
27use Google\Service\BeyondCorp\ResolveConnectionsResponse;
28
29/**
30 * The "connections" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $beyondcorpService = new Google\Service\BeyondCorp(...);
34 * $connections = $beyondcorpService->connections;
35 * </code>
36 */
37class ProjectsLocationsConnections extends \Google\Service\Resource
38{
39 /**
40 * Creates a new Connection in a given project and location.
41 * (connections.create)
42 *
43 * @param string $parent Required. The resource project name of the connection
44 * location using the form: `projects/{project_id}/locations/{location_id}`
45 * @param Connection $postBody
46 * @param array $optParams Optional parameters.
47 *
48 * @opt_param string connectionId Optional. User-settable connection resource
49 * ID. * Must start with a letter. * Must contain between 4-63 characters from
50 * (/a-z-/). * Must end with a number or a letter.
51 * @opt_param string requestId Optional. An optional request ID to identify
52 * requests. Specify a unique request ID so that if you must retry your request,
53 * the server will know to ignore the request if it has already been completed.
54 * The server will guarantee that for at least 60 minutes since the first
55 * request. For example, consider a situation where you make an initial request
56 * and t he request times out. If you make the request again with the same
57 * request ID, the server can check if original operation with the same request
58 * ID was received, and if so, will ignore the second request. This prevents
59 * clients from accidentally creating duplicate commitments. The request ID must
60 * be a valid UUID with the exception that zero UUID is not supported
61 * (00000000-0000-0000-0000-000000000000).
62 * @opt_param bool validateOnly Optional. If set, validates request by executing
63 * a dry-run which would not alter the resource in any way.
64 * @return GoogleLongrunningOperation
65 */
66 public function create($parent, Connection $postBody, $optParams = [])
67 {
68 $params = ['parent' => $parent, 'postBody' => $postBody];
69 $params = array_merge($params, $optParams);
70 return $this->call('create', [$params], GoogleLongrunningOperation::class);
71 }
72 /**
73 * Deletes a single Connection. (connections.delete)
74 *
75 * @param string $name Required. BeyondCorp Connector name using the form:
76 * `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
77 * @param array $optParams Optional parameters.
78 *
79 * @opt_param string requestId Optional. An optional request ID to identify
80 * requests. Specify a unique request ID so that if you must retry your request,
81 * the server will know to ignore the request if it has already been completed.
82 * The server will guarantee that for at least 60 minutes after the first
83 * request. For example, consider a situation where you make an initial request
84 * and t he request times out. If you make the request again with the same
85 * request ID, the server can check if original operation with the same request
86 * ID was received, and if so, will ignore the second request. This prevents
87 * clients from accidentally creating duplicate commitments. The request ID must
88 * be a valid UUID with the exception that zero UUID is not supported
89 * (00000000-0000-0000-0000-000000000000).
90 * @opt_param bool validateOnly Optional. If set, validates request by executing
91 * a dry-run which would not alter the resource in any way.
92 * @return GoogleLongrunningOperation
93 */
94 public function delete($name, $optParams = [])
95 {
96 $params = ['name' => $name];
97 $params = array_merge($params, $optParams);
98 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
99 }
100 /**
101 * Gets details of a single Connection. (connections.get)
102 *
103 * @param string $name Required. BeyondCorp Connection name using the form:
104 * `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
105 * @param array $optParams Optional parameters.
106 * @return Connection
107 */
108 public function get($name, $optParams = [])
109 {
110 $params = ['name' => $name];
111 $params = array_merge($params, $optParams);
112 return $this->call('get', [$params], Connection::class);
113 }
114 /**
115 * Gets the access control policy for a resource. Returns an empty policy if the
116 * resource exists and does not have a policy set. (connections.getIamPolicy)
117 *
118 * @param string $resource REQUIRED: The resource for which the policy is being
119 * requested. See [Resource
120 * names](https://cloud.google.com/apis/design/resource_names) for the
121 * appropriate value for this field.
122 * @param array $optParams Optional parameters.
123 *
124 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
125 * version that will be used to format the policy. Valid values are 0, 1, and 3.
126 * Requests specifying an invalid value will be rejected. Requests for policies
127 * with any conditional role bindings must specify version 3. Policies with no
128 * conditional role bindings may specify any valid value or leave the field
129 * unset. The policy in the response might use the policy version that you
130 * specified, or it might use a lower policy version. For example, if you
131 * specify version 3, but the policy has no conditional role bindings, the
132 * response uses version 1. To learn which resources support conditions in their
133 * IAM policies, see the [IAM
134 * documentation](https://cloud.google.com/iam/help/conditions/resource-
135 * policies).
136 * @return GoogleIamV1Policy
137 */
138 public function getIamPolicy($resource, $optParams = [])
139 {
140 $params = ['resource' => $resource];
141 $params = array_merge($params, $optParams);
142 return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
143 }
144 /**
145 * Lists Connections in a given project and location.
146 * (connections.listProjectsLocationsConnections)
147 *
148 * @param string $parent Required. The resource name of the connection location
149 * using the form: `projects/{project_id}/locations/{location_id}`
150 * @param array $optParams Optional parameters.
151 *
152 * @opt_param string filter Optional. A filter specifying constraints of a list
153 * operation.
154 * @opt_param string orderBy Optional. Specifies the ordering of results. See
155 * [Sorting
156 * order](https://cloud.google.com/apis/design/design_patterns#sorting_order)
157 * for more information.
158 * @opt_param int pageSize Optional. The maximum number of items to return. If
159 * not specified, a default value of 50 will be used by the service. Regardless
160 * of the page_size value, the response may include a partial list and a caller
161 * should only rely on response's next_page_token to determine if there are more
162 * instances left to be queried.
163 * @opt_param string pageToken Optional. The next_page_token value returned from
164 * a previous ListConnectionsRequest, if any.
165 * @return ListConnectionsResponse
166 */
167 public function listProjectsLocationsConnections($parent, $optParams = [])
168 {
169 $params = ['parent' => $parent];
170 $params = array_merge($params, $optParams);
171 return $this->call('list', [$params], ListConnectionsResponse::class);
172 }
173 /**
174 * Updates the parameters of a single Connection. (connections.patch)
175 *
176 * @param string $name Required. Unique resource name of the connection. The
177 * name is ignored when creating a connection.
178 * @param Connection $postBody
179 * @param array $optParams Optional parameters.
180 *
181 * @opt_param bool allowMissing Optional. If set as true, will create the
182 * resource if it is not found.
183 * @opt_param string requestId Optional. An optional request ID to identify
184 * requests. Specify a unique request ID so that if you must retry your request,
185 * the server will know to ignore the request if it has already been completed.
186 * The server will guarantee that for at least 60 minutes since the first
187 * request. For example, consider a situation where you make an initial request
188 * and t he request times out. If you make the request again with the same
189 * request ID, the server can check if original operation with the same request
190 * ID was received, and if so, will ignore the second request. This prevents
191 * clients from accidentally creating duplicate commitments. The request ID must
192 * be a valid UUID with the exception that zero UUID is not supported
193 * (00000000-0000-0000-0000-000000000000).
194 * @opt_param string updateMask Required. Mask of fields to update. At least one
195 * path must be supplied in this field. The elements of the repeated paths field
196 * may only include these fields from [BeyondCorp.Connection]: * `labels` *
197 * `display_name` * `application_endpoint` * `connectors`
198 * @opt_param bool validateOnly Optional. If set, validates request by executing
199 * a dry-run which would not alter the resource in any way.
200 * @return GoogleLongrunningOperation
201 */
202 public function patch($name, Connection $postBody, $optParams = [])
203 {
204 $params = ['name' => $name, 'postBody' => $postBody];
205 $params = array_merge($params, $optParams);
206 return $this->call('patch', [$params], GoogleLongrunningOperation::class);
207 }
208 /**
209 * Resolves connections details for a given connector. An internal method called
210 * by a connector to find connections to connect to. (connections.resolve)
211 *
212 * @param string $parent Required. The resource name of the connection location
213 * using the form: `projects/{project_id}/locations/{location_id}`
214 * @param array $optParams Optional parameters.
215 *
216 * @opt_param string connectorId Required. BeyondCorp Connector name of the
217 * connector associated with those connections using the form:
218 * `projects/{project_id}/locations/{location_id}/connectors/{connector_id}`
219 * @opt_param int pageSize Optional. The maximum number of items to return. If
220 * not specified, a default value of 50 will be used by the service. Regardless
221 * of the page_size value, the response may include a partial list and a caller
222 * should only rely on response's next_page_token to determine if there are more
223 * instances left to be queried.
224 * @opt_param string pageToken Optional. The next_page_token value returned from
225 * a previous ResolveConnectionsResponse, if any.
226 * @return ResolveConnectionsResponse
227 */
228 public function resolve($parent, $optParams = [])
229 {
230 $params = ['parent' => $parent];
231 $params = array_merge($params, $optParams);
232 return $this->call('resolve', [$params], ResolveConnectionsResponse::class);
233 }
234 /**
235 * Sets the access control policy on the specified resource. Replaces any
236 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
237 * `PERMISSION_DENIED` errors. (connections.setIamPolicy)
238 *
239 * @param string $resource REQUIRED: The resource for which the policy is being
240 * specified. See [Resource
241 * names](https://cloud.google.com/apis/design/resource_names) for the
242 * appropriate value for this field.
243 * @param GoogleIamV1SetIamPolicyRequest $postBody
244 * @param array $optParams Optional parameters.
245 * @return GoogleIamV1Policy
246 */
247 public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
248 {
249 $params = ['resource' => $resource, 'postBody' => $postBody];
250 $params = array_merge($params, $optParams);
251 return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
252 }
253 /**
254 * Returns permissions that a caller has on the specified resource. If the
255 * resource does not exist, this will return an empty set of permissions, not a
256 * `NOT_FOUND` error. Note: This operation is designed to be used for building
257 * permission-aware UIs and command-line tools, not for authorization checking.
258 * This operation may "fail open" without warning.
259 * (connections.testIamPermissions)
260 *
261 * @param string $resource REQUIRED: The resource for which the policy detail is
262 * being requested. See [Resource
263 * names](https://cloud.google.com/apis/design/resource_names) for the
264 * appropriate value for this field.
265 * @param GoogleIamV1TestIamPermissionsRequest $postBody
266 * @param array $optParams Optional parameters.
267 * @return GoogleIamV1TestIamPermissionsResponse
268 */
269 public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
270 {
271 $params = ['resource' => $resource, 'postBody' => $postBody];
272 $params = array_merge($params, $optParams);
273 return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
274 }
275}
276
277// Adding a class alias for backwards compatibility with the previous class name.
278class_alias(ProjectsLocationsConnections::class, 'Google_Service_BeyondCorp_Resource_ProjectsLocationsConnections');
Note: See TracBrowser for help on using the repository browser.