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