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\PolicyAnalyzer\Resource;
19
20use Google\Service\PolicyAnalyzer\GoogleCloudPolicyanalyzerV1QueryActivityResponse;
21
22/**
23 * The "activities" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $policyanalyzerService = new Google\Service\PolicyAnalyzer(...);
27 *   $activities = $policyanalyzerService->activities;
28 *  </code>
29 */
30class ProjectsLocationsActivityTypesActivities extends \Google\Service\Resource
31{
32  /**
33   * Queries policy activities on Google Cloud resources. (activities.query)
34   *
35   * @param string $parent Required. The container resource on which to execute
36   * the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locati
37   * ons/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google
38   * Cloud Locations: https://cloud.google.com/about/locations/
39   * @param array $optParams Optional parameters.
40   *
41   * @opt_param string filter Optional. Filter expression to restrict the
42   * activities returned. For serviceAccountLastAuthentication activities,
43   * supported filters are: - `activities.full_resource_name {=} [STRING]` -
44   * `activities.fullResourceName {=} [STRING]` where `[STRING]` is the full
45   * resource name of the service account. For serviceAccountKeyLastAuthentication
46   * activities, supported filters are: - `activities.full_resource_name {=}
47   * [STRING]` - `activities.fullResourceName {=} [STRING]` where `[STRING]` is
48   * the full resource name of the service account key.
49   * @opt_param int pageSize Optional. The maximum number of results to return
50   * from this request. Max limit is 1000. Non-positive values are ignored. The
51   * presence of `nextPageToken` in the response indicates that more results might
52   * be available.
53   * @opt_param string pageToken Optional. If present, then retrieve the next
54   * batch of results from the preceding call to this method. `pageToken` must be
55   * the value of `nextPageToken` from the previous response. The values of other
56   * method parameters should be identical to those in the previous call.
57   * @return GoogleCloudPolicyanalyzerV1QueryActivityResponse
58   */
59  public function query($parent, $optParams = [])
60  {
61    $params = ['parent' => $parent];
62    $params = array_merge($params, $optParams);
63    return $this->call('query', [$params], GoogleCloudPolicyanalyzerV1QueryActivityResponse::class);
64  }
65}
66
67// Adding a class alias for backwards compatibility with the previous class name.
68class_alias(ProjectsLocationsActivityTypesActivities::class, 'Google_Service_PolicyAnalyzer_Resource_ProjectsLocationsActivityTypesActivities');
69