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\CloudDataplex\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1EntryGroup;
|
---|
21 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1ListEntryGroupsResponse;
|
---|
22 | use Google\Service\CloudDataplex\GoogleIamV1Policy;
|
---|
23 | use Google\Service\CloudDataplex\GoogleIamV1SetIamPolicyRequest;
|
---|
24 | use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsRequest;
|
---|
25 | use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsResponse;
|
---|
26 | use Google\Service\CloudDataplex\GoogleLongrunningOperation;
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * The "entryGroups" collection of methods.
|
---|
30 | * Typical usage is:
|
---|
31 | * <code>
|
---|
32 | * $dataplexService = new Google\Service\CloudDataplex(...);
|
---|
33 | * $entryGroups = $dataplexService->projects_locations_entryGroups;
|
---|
34 | * </code>
|
---|
35 | */
|
---|
36 | class ProjectsLocationsEntryGroups extends \Google\Service\Resource
|
---|
37 | {
|
---|
38 | /**
|
---|
39 | * Creates an EntryGroup. (entryGroups.create)
|
---|
40 | *
|
---|
41 | * @param string $parent Required. The resource name of the entryGroup, of the
|
---|
42 | * form: projects/{project_number}/locations/{location_id} where location_id
|
---|
43 | * refers to a GCP region.
|
---|
44 | * @param GoogleCloudDataplexV1EntryGroup $postBody
|
---|
45 | * @param array $optParams Optional parameters.
|
---|
46 | *
|
---|
47 | * @opt_param string entryGroupId Required. EntryGroup identifier.
|
---|
48 | * @opt_param bool validateOnly Optional. The service validates the request
|
---|
49 | * without performing any mutations. The default is false.
|
---|
50 | * @return GoogleLongrunningOperation
|
---|
51 | * @throws \Google\Service\Exception
|
---|
52 | */
|
---|
53 | public function create($parent, GoogleCloudDataplexV1EntryGroup $postBody, $optParams = [])
|
---|
54 | {
|
---|
55 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
56 | $params = array_merge($params, $optParams);
|
---|
57 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
58 | }
|
---|
59 | /**
|
---|
60 | * Deletes an EntryGroup. (entryGroups.delete)
|
---|
61 | *
|
---|
62 | * @param string $name Required. The resource name of the EntryGroup: projects/{
|
---|
63 | * project_number}/locations/{location_id}/entryGroups/{entry_group_id}.
|
---|
64 | * @param array $optParams Optional parameters.
|
---|
65 | *
|
---|
66 | * @opt_param string etag Optional. If the client provided etag value does not
|
---|
67 | * match the current etag value, the DeleteEntryGroupRequest method returns an
|
---|
68 | * ABORTED error response.
|
---|
69 | * @return GoogleLongrunningOperation
|
---|
70 | * @throws \Google\Service\Exception
|
---|
71 | */
|
---|
72 | public function delete($name, $optParams = [])
|
---|
73 | {
|
---|
74 | $params = ['name' => $name];
|
---|
75 | $params = array_merge($params, $optParams);
|
---|
76 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
77 | }
|
---|
78 | /**
|
---|
79 | * Gets an EntryGroup. (entryGroups.get)
|
---|
80 | *
|
---|
81 | * @param string $name Required. The resource name of the EntryGroup: projects/{
|
---|
82 | * project_number}/locations/{location_id}/entryGroups/{entry_group_id}.
|
---|
83 | * @param array $optParams Optional parameters.
|
---|
84 | * @return GoogleCloudDataplexV1EntryGroup
|
---|
85 | * @throws \Google\Service\Exception
|
---|
86 | */
|
---|
87 | public function get($name, $optParams = [])
|
---|
88 | {
|
---|
89 | $params = ['name' => $name];
|
---|
90 | $params = array_merge($params, $optParams);
|
---|
91 | return $this->call('get', [$params], GoogleCloudDataplexV1EntryGroup::class);
|
---|
92 | }
|
---|
93 | /**
|
---|
94 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
95 | * resource exists and does not have a policy set. (entryGroups.getIamPolicy)
|
---|
96 | *
|
---|
97 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
98 | * requested. See Resource names
|
---|
99 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
100 | * value for this field.
|
---|
101 | * @param array $optParams Optional parameters.
|
---|
102 | *
|
---|
103 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
104 | * version that will be used to format the policy.Valid values are 0, 1, and 3.
|
---|
105 | * Requests specifying an invalid value will be rejected.Requests for policies
|
---|
106 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
107 | * conditional role bindings may specify any valid value or leave the field
|
---|
108 | * unset.The policy in the response might use the policy version that you
|
---|
109 | * specified, or it might use a lower policy version. For example, if you
|
---|
110 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
111 | * response uses version 1.To learn which resources support conditions in their
|
---|
112 | * IAM policies, see the IAM documentation
|
---|
113 | * (https://cloud.google.com/iam/help/conditions/resource-policies).
|
---|
114 | * @return GoogleIamV1Policy
|
---|
115 | * @throws \Google\Service\Exception
|
---|
116 | */
|
---|
117 | public function getIamPolicy($resource, $optParams = [])
|
---|
118 | {
|
---|
119 | $params = ['resource' => $resource];
|
---|
120 | $params = array_merge($params, $optParams);
|
---|
121 | return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
122 | }
|
---|
123 | /**
|
---|
124 | * Lists EntryGroup resources in a project and location.
|
---|
125 | * (entryGroups.listProjectsLocationsEntryGroups)
|
---|
126 | *
|
---|
127 | * @param string $parent Required. The resource name of the entryGroup location,
|
---|
128 | * of the form: projects/{project_number}/locations/{location_id} where
|
---|
129 | * location_id refers to a Google Cloud region.
|
---|
130 | * @param array $optParams Optional parameters.
|
---|
131 | *
|
---|
132 | * @opt_param string filter Optional. Filter request.
|
---|
133 | * @opt_param string orderBy Optional. Order by fields for the result.
|
---|
134 | * @opt_param int pageSize Optional. Maximum number of EntryGroups to return.
|
---|
135 | * The service may return fewer than this value. If unspecified, the service
|
---|
136 | * returns at most 10 EntryGroups. The maximum value is 1000; values above 1000
|
---|
137 | * will be coerced to 1000.
|
---|
138 | * @opt_param string pageToken Optional. Page token received from a previous
|
---|
139 | * ListEntryGroups call. Provide this to retrieve the subsequent page. When
|
---|
140 | * paginating, all other parameters you provide to ListEntryGroups must match
|
---|
141 | * the call that provided the page token.
|
---|
142 | * @return GoogleCloudDataplexV1ListEntryGroupsResponse
|
---|
143 | * @throws \Google\Service\Exception
|
---|
144 | */
|
---|
145 | public function listProjectsLocationsEntryGroups($parent, $optParams = [])
|
---|
146 | {
|
---|
147 | $params = ['parent' => $parent];
|
---|
148 | $params = array_merge($params, $optParams);
|
---|
149 | return $this->call('list', [$params], GoogleCloudDataplexV1ListEntryGroupsResponse::class);
|
---|
150 | }
|
---|
151 | /**
|
---|
152 | * Updates an EntryGroup. (entryGroups.patch)
|
---|
153 | *
|
---|
154 | * @param string $name Output only. The relative resource name of the
|
---|
155 | * EntryGroup, in the format projects/{project_id_or_number}/locations/{location
|
---|
156 | * _id}/entryGroups/{entry_group_id}.
|
---|
157 | * @param GoogleCloudDataplexV1EntryGroup $postBody
|
---|
158 | * @param array $optParams Optional parameters.
|
---|
159 | *
|
---|
160 | * @opt_param string updateMask Required. Mask of fields to update.
|
---|
161 | * @opt_param bool validateOnly Optional. The service validates the request,
|
---|
162 | * without performing any mutations. The default is false.
|
---|
163 | * @return GoogleLongrunningOperation
|
---|
164 | * @throws \Google\Service\Exception
|
---|
165 | */
|
---|
166 | public function patch($name, GoogleCloudDataplexV1EntryGroup $postBody, $optParams = [])
|
---|
167 | {
|
---|
168 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
169 | $params = array_merge($params, $optParams);
|
---|
170 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
171 | }
|
---|
172 | /**
|
---|
173 | * Sets the access control policy on the specified resource. Replaces any
|
---|
174 | * existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
|
---|
175 | * errors. (entryGroups.setIamPolicy)
|
---|
176 | *
|
---|
177 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
178 | * specified. See Resource names
|
---|
179 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
180 | * value for this field.
|
---|
181 | * @param GoogleIamV1SetIamPolicyRequest $postBody
|
---|
182 | * @param array $optParams Optional parameters.
|
---|
183 | * @return GoogleIamV1Policy
|
---|
184 | * @throws \Google\Service\Exception
|
---|
185 | */
|
---|
186 | public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
|
---|
187 | {
|
---|
188 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
189 | $params = array_merge($params, $optParams);
|
---|
190 | return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
191 | }
|
---|
192 | /**
|
---|
193 | * Returns permissions that a caller has on the specified resource. If the
|
---|
194 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
195 | * NOT_FOUND error.Note: This operation is designed to be used for building
|
---|
196 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
197 | * This operation may "fail open" without warning.
|
---|
198 | * (entryGroups.testIamPermissions)
|
---|
199 | *
|
---|
200 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
201 | * being requested. See Resource names
|
---|
202 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
203 | * value for this field.
|
---|
204 | * @param GoogleIamV1TestIamPermissionsRequest $postBody
|
---|
205 | * @param array $optParams Optional parameters.
|
---|
206 | * @return GoogleIamV1TestIamPermissionsResponse
|
---|
207 | * @throws \Google\Service\Exception
|
---|
208 | */
|
---|
209 | public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
210 | {
|
---|
211 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
212 | $params = array_merge($params, $optParams);
|
---|
213 | return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
|
---|
214 | }
|
---|
215 | }
|
---|
216 |
|
---|
217 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
218 | class_alias(ProjectsLocationsEntryGroups::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsEntryGroups');
|
---|