source: vendor/google/apiclient-services/src/Bigquery/Resource/RowAccessPolicies.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 4.4 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\Bigquery\Resource;
19
20use Google\Service\Bigquery\GetIamPolicyRequest;
21use Google\Service\Bigquery\ListRowAccessPoliciesResponse;
22use Google\Service\Bigquery\Policy;
23use Google\Service\Bigquery\TestIamPermissionsRequest;
24use Google\Service\Bigquery\TestIamPermissionsResponse;
25
26/**
27 * The "rowAccessPolicies" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $bigqueryService = new Google\Service\Bigquery(...);
31 * $rowAccessPolicies = $bigqueryService->rowAccessPolicies;
32 * </code>
33 */
34class RowAccessPolicies extends \Google\Service\Resource
35{
36 /**
37 * Gets the access control policy for a resource. Returns an empty policy if the
38 * resource exists and does not have a policy set.
39 * (rowAccessPolicies.getIamPolicy)
40 *
41 * @param string $resource REQUIRED: The resource for which the policy is being
42 * requested. See [Resource
43 * names](https://cloud.google.com/apis/design/resource_names) for the
44 * appropriate value for this field.
45 * @param GetIamPolicyRequest $postBody
46 * @param array $optParams Optional parameters.
47 * @return Policy
48 * @throws \Google\Service\Exception
49 */
50 public function getIamPolicy($resource, GetIamPolicyRequest $postBody, $optParams = [])
51 {
52 $params = ['resource' => $resource, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('getIamPolicy', [$params], Policy::class);
55 }
56 /**
57 * Lists all row access policies on the specified table.
58 * (rowAccessPolicies.listRowAccessPolicies)
59 *
60 * @param string $projectId Required. Project ID of the row access policies to
61 * list.
62 * @param string $datasetId Required. Dataset ID of row access policies to list.
63 * @param string $tableId Required. Table ID of the table to list row access
64 * policies.
65 * @param array $optParams Optional parameters.
66 *
67 * @opt_param int pageSize The maximum number of results to return in a single
68 * response page. Leverage the page tokens to iterate through the entire
69 * collection.
70 * @opt_param string pageToken Page token, returned by a previous call, to
71 * request the next page of results.
72 * @return ListRowAccessPoliciesResponse
73 * @throws \Google\Service\Exception
74 */
75 public function listRowAccessPolicies($projectId, $datasetId, $tableId, $optParams = [])
76 {
77 $params = ['projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId];
78 $params = array_merge($params, $optParams);
79 return $this->call('list', [$params], ListRowAccessPoliciesResponse::class);
80 }
81 /**
82 * Returns permissions that a caller has on the specified resource. If the
83 * resource does not exist, this will return an empty set of permissions, not a
84 * `NOT_FOUND` error. Note: This operation is designed to be used for building
85 * permission-aware UIs and command-line tools, not for authorization checking.
86 * This operation may "fail open" without warning.
87 * (rowAccessPolicies.testIamPermissions)
88 *
89 * @param string $resource REQUIRED: The resource for which the policy detail is
90 * being requested. See [Resource
91 * names](https://cloud.google.com/apis/design/resource_names) for the
92 * appropriate value for this field.
93 * @param TestIamPermissionsRequest $postBody
94 * @param array $optParams Optional parameters.
95 * @return TestIamPermissionsResponse
96 * @throws \Google\Service\Exception
97 */
98 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
99 {
100 $params = ['resource' => $resource, 'postBody' => $postBody];
101 $params = array_merge($params, $optParams);
102 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
103 }
104}
105
106// Adding a class alias for backwards compatibility with the previous class name.
107class_alias(RowAccessPolicies::class, 'Google_Service_Bigquery_Resource_RowAccessPolicies');
Note: See TracBrowser for help on using the repository browser.