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\CloudAsset\Resource;
19
20use Google\Service\CloudAsset\BatchGetEffectiveIamPoliciesResponse;
21
22/**
23 * The "effectiveIamPolicies" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $cloudassetService = new Google\Service\CloudAsset(...);
27 *   $effectiveIamPolicies = $cloudassetService->effectiveIamPolicies;
28 *  </code>
29 */
30class EffectiveIamPolicies extends \Google\Service\Resource
31{
32  /**
33   * Gets effective IAM policies for a batch of resources.
34   * (effectiveIamPolicies.batchGet)
35   *
36   * @param string $scope Required. Only IAM policies on or below the scope will
37   * be returned. This can only be an organization number (such as
38   * "organizations/123"), a folder number (such as "folders/123"), a project ID
39   * (such as "projects/my-project-id"), or a project number (such as
40   * "projects/12345"). To know how to get organization id, visit [here
41   * ](https://cloud.google.com/resource-manager/docs/creating-managing-
42   * organization#retrieving_your_organization_id). To know how to get folder or
43   * project id, visit [here ](https://cloud.google.com/resource-manager/docs
44   * /creating-managing-folders#viewing_or_listing_folders_and_projects).
45   * @param array $optParams Optional parameters.
46   *
47   * @opt_param string names Required. The names refer to the
48   * [full_resource_names] (https://cloud.google.com/asset-inventory/docs
49   * /resource-name-format) of [searchable asset types](https://cloud.google.com
50   * /asset-inventory/docs/supported-asset-types#searchable_asset_types). A
51   * maximum of 20 resources' effective policies can be retrieved in a batch.
52   * @return BatchGetEffectiveIamPoliciesResponse
53   */
54  public function batchGet($scope, $optParams = [])
55  {
56    $params = ['scope' => $scope];
57    $params = array_merge($params, $optParams);
58    return $this->call('batchGet', [$params], BatchGetEffectiveIamPoliciesResponse::class);
59  }
60}
61
62// Adding a class alias for backwards compatibility with the previous class name.
63class_alias(EffectiveIamPolicies::class, 'Google_Service_CloudAsset_Resource_EffectiveIamPolicies');
64