source: vendor/google/apiclient-services/src/IDS/Resource/ProjectsLocationsEndpoints.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 11.3 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\IDS\Resource;
19
20use Google\Service\IDS\Endpoint;
21use Google\Service\IDS\ListEndpointsResponse;
22use Google\Service\IDS\Operation;
23use Google\Service\IDS\Policy;
24use Google\Service\IDS\SetIamPolicyRequest;
25use Google\Service\IDS\TestIamPermissionsRequest;
26use Google\Service\IDS\TestIamPermissionsResponse;
27
28/**
29 * The "endpoints" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $idsService = new Google\Service\IDS(...);
33 * $endpoints = $idsService->projects_locations_endpoints;
34 * </code>
35 */
36class ProjectsLocationsEndpoints extends \Google\Service\Resource
37{
38 /**
39 * Creates a new Endpoint in a given project and location. (endpoints.create)
40 *
41 * @param string $parent Required. The endpoint's parent.
42 * @param Endpoint $postBody
43 * @param array $optParams Optional parameters.
44 *
45 * @opt_param string endpointId Required. The endpoint identifier. This will be
46 * part of the endpoint's resource name. This value must start with a lowercase
47 * letter followed by up to 62 lowercase letters, numbers, or hyphens, and
48 * cannot end with a hyphen. Values that do not match this pattern will trigger
49 * an INVALID_ARGUMENT error.
50 * @opt_param string requestId An optional request ID to identify requests.
51 * Specify a unique request ID so that if you must retry your request, the
52 * server will know to ignore the request if it has already been completed. The
53 * server will guarantee that for at least 60 minutes since the first request.
54 * For example, consider a situation where you make an initial request and the
55 * request times out. If you make the request again with the same request ID,
56 * the server can check if original operation with the same request ID was
57 * received, and if so, will ignore the second request. This prevents clients
58 * from accidentally creating duplicate commitments. The request ID must be a
59 * valid UUID with the exception that zero UUID is not supported
60 * (00000000-0000-0000-0000-000000000000).
61 * @return Operation
62 * @throws \Google\Service\Exception
63 */
64 public function create($parent, Endpoint $postBody, $optParams = [])
65 {
66 $params = ['parent' => $parent, 'postBody' => $postBody];
67 $params = array_merge($params, $optParams);
68 return $this->call('create', [$params], Operation::class);
69 }
70 /**
71 * Deletes a single Endpoint. (endpoints.delete)
72 *
73 * @param string $name Required. The name of the endpoint to delete.
74 * @param array $optParams Optional parameters.
75 *
76 * @opt_param string requestId An optional request ID to identify requests.
77 * Specify a unique request ID so that if you must retry your request, the
78 * server will know to ignore the request if it has already been completed. The
79 * server will guarantee that for at least 60 minutes after the first request.
80 * For example, consider a situation where you make an initial request and the
81 * request times out. If you make the request again with the same request ID,
82 * the server can check if original operation with the same request ID was
83 * received, and if so, will ignore the second request. This prevents clients
84 * from accidentally creating duplicate commitments. The request ID must be a
85 * valid UUID with the exception that zero UUID is not supported
86 * (00000000-0000-0000-0000-000000000000).
87 * @return Operation
88 * @throws \Google\Service\Exception
89 */
90 public function delete($name, $optParams = [])
91 {
92 $params = ['name' => $name];
93 $params = array_merge($params, $optParams);
94 return $this->call('delete', [$params], Operation::class);
95 }
96 /**
97 * Gets details of a single Endpoint. (endpoints.get)
98 *
99 * @param string $name Required. The name of the endpoint to retrieve. Format:
100 * projects/{project}/locations/{location}/endpoints/{endpoint}
101 * @param array $optParams Optional parameters.
102 * @return Endpoint
103 * @throws \Google\Service\Exception
104 */
105 public function get($name, $optParams = [])
106 {
107 $params = ['name' => $name];
108 $params = array_merge($params, $optParams);
109 return $this->call('get', [$params], Endpoint::class);
110 }
111 /**
112 * Gets the access control policy for a resource. Returns an empty policy if the
113 * resource exists and does not have a policy set. (endpoints.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 Policy
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], Policy::class);
141 }
142 /**
143 * Lists Endpoints in a given project and location.
144 * (endpoints.listProjectsLocationsEndpoints)
145 *
146 * @param string $parent Required. The parent, which owns this collection of
147 * endpoints.
148 * @param array $optParams Optional parameters.
149 *
150 * @opt_param string filter Optional. The filter expression, following the
151 * syntax outlined in https://google.aip.dev/160.
152 * @opt_param string orderBy Optional. One or more fields to compare and use to
153 * sort the output. See https://google.aip.dev/132#ordering.
154 * @opt_param int pageSize Optional. The maximum number of endpoints to return.
155 * The service may return fewer than this value.
156 * @opt_param string pageToken Optional. A page token, received from a previous
157 * `ListEndpoints` call. Provide this to retrieve the subsequent page. When
158 * paginating, all other parameters provided to `ListEndpoints` must match the
159 * call that provided the page token.
160 * @return ListEndpointsResponse
161 * @throws \Google\Service\Exception
162 */
163 public function listProjectsLocationsEndpoints($parent, $optParams = [])
164 {
165 $params = ['parent' => $parent];
166 $params = array_merge($params, $optParams);
167 return $this->call('list', [$params], ListEndpointsResponse::class);
168 }
169 /**
170 * Updates the parameters of a single Endpoint. (endpoints.patch)
171 *
172 * @param string $name Output only. The name of the endpoint.
173 * @param Endpoint $postBody
174 * @param array $optParams Optional parameters.
175 *
176 * @opt_param string requestId An optional request ID to identify requests.
177 * Specify a unique request ID so that if you must retry your request, the
178 * server will know to ignore the request if it has already been completed. The
179 * server will guarantee that for at least 60 minutes since the first request.
180 * For example, consider a situation where you make an initial request and the
181 * request times out. If you make the request again with the same request ID,
182 * the server can check if original operation with the same request ID was
183 * received, and if so, will ignore the second request. This prevents clients
184 * from accidentally creating duplicate commitments. The request ID must be a
185 * valid UUID with the exception that zero UUID is not supported
186 * (00000000-0000-0000-0000-000000000000).
187 * @opt_param string updateMask Field mask is used to specify the fields to be
188 * overwritten in the Endpoint resource by the update. The fields specified in
189 * the update_mask are relative to the resource, not the full request. A field
190 * will be overwritten if it is in the mask. If the user does not provide a mask
191 * then all fields will be overwritten.
192 * @return Operation
193 * @throws \Google\Service\Exception
194 */
195 public function patch($name, Endpoint $postBody, $optParams = [])
196 {
197 $params = ['name' => $name, 'postBody' => $postBody];
198 $params = array_merge($params, $optParams);
199 return $this->call('patch', [$params], Operation::class);
200 }
201 /**
202 * Sets the access control policy on the specified resource. Replaces any
203 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
204 * `PERMISSION_DENIED` errors. (endpoints.setIamPolicy)
205 *
206 * @param string $resource REQUIRED: The resource for which the policy is being
207 * specified. See [Resource
208 * names](https://cloud.google.com/apis/design/resource_names) for the
209 * appropriate value for this field.
210 * @param SetIamPolicyRequest $postBody
211 * @param array $optParams Optional parameters.
212 * @return Policy
213 * @throws \Google\Service\Exception
214 */
215 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
216 {
217 $params = ['resource' => $resource, 'postBody' => $postBody];
218 $params = array_merge($params, $optParams);
219 return $this->call('setIamPolicy', [$params], Policy::class);
220 }
221 /**
222 * Returns permissions that a caller has on the specified resource. If the
223 * resource does not exist, this will return an empty set of permissions, not a
224 * `NOT_FOUND` error. Note: This operation is designed to be used for building
225 * permission-aware UIs and command-line tools, not for authorization checking.
226 * This operation may "fail open" without warning.
227 * (endpoints.testIamPermissions)
228 *
229 * @param string $resource REQUIRED: The resource for which the policy detail is
230 * being requested. See [Resource
231 * names](https://cloud.google.com/apis/design/resource_names) for the
232 * appropriate value for this field.
233 * @param TestIamPermissionsRequest $postBody
234 * @param array $optParams Optional parameters.
235 * @return TestIamPermissionsResponse
236 * @throws \Google\Service\Exception
237 */
238 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
239 {
240 $params = ['resource' => $resource, 'postBody' => $postBody];
241 $params = array_merge($params, $optParams);
242 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
243 }
244}
245
246// Adding a class alias for backwards compatibility with the previous class name.
247class_alias(ProjectsLocationsEndpoints::class, 'Google_Service_IDS_Resource_ProjectsLocationsEndpoints');
Note: See TracBrowser for help on using the repository browser.