source: vendor/google/apiclient-services/src/ChecksService/Resource/AccountsReposScans.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: 4.1 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\ChecksService\Resource;
19
20use Google\Service\ChecksService\GoogleChecksRepoScanV1alphaGenerateScanRequest;
21use Google\Service\ChecksService\GoogleChecksRepoScanV1alphaListRepoScansResponse;
22use Google\Service\ChecksService\GoogleChecksRepoScanV1alphaRepoScan;
23use Google\Service\ChecksService\Operation;
24
25/**
26 * The "scans" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $checksService = new Google\Service\ChecksService(...);
30 * $scans = $checksService->accounts_repos_scans;
31 * </code>
32 */
33class AccountsReposScans extends \Google\Service\Resource
34{
35 /**
36 * Uploads the results of local Code Compliance analysis and generates a scan of
37 * privacy issues. Returns a google.longrunning.Operation containing analysis
38 * and findings. (scans.generate)
39 *
40 * @param string $parent Required. Resource name of the repo. Example:
41 * `accounts/123/repos/456`
42 * @param GoogleChecksRepoScanV1alphaGenerateScanRequest $postBody
43 * @param array $optParams Optional parameters.
44 * @return Operation
45 * @throws \Google\Service\Exception
46 */
47 public function generate($parent, GoogleChecksRepoScanV1alphaGenerateScanRequest $postBody, $optParams = [])
48 {
49 $params = ['parent' => $parent, 'postBody' => $postBody];
50 $params = array_merge($params, $optParams);
51 return $this->call('generate', [$params], Operation::class);
52 }
53 /**
54 * Gets a repo scan. By default, only the name and results_uri fields are
55 * returned. You can include other fields by listing them in the `fields` URL
56 * query parameter. For example, `?fields=name,sources` will return the name and
57 * sources fields. (scans.get)
58 *
59 * @param string $name Required. Resource name of the repo scan. Example:
60 * `accounts/123/repos/456/scans/789`
61 * @param array $optParams Optional parameters.
62 * @return GoogleChecksRepoScanV1alphaRepoScan
63 * @throws \Google\Service\Exception
64 */
65 public function get($name, $optParams = [])
66 {
67 $params = ['name' => $name];
68 $params = array_merge($params, $optParams);
69 return $this->call('get', [$params], GoogleChecksRepoScanV1alphaRepoScan::class);
70 }
71 /**
72 * Lists repo scans for the specified repo. (scans.listAccountsReposScans)
73 *
74 * @param string $parent Required. Resource name of the repo. Example:
75 * `accounts/123/repos/456`
76 * @param array $optParams Optional parameters.
77 *
78 * @opt_param string filter Optional. An [AIP-160](https://google.aip.dev/160)
79 * filter string to filter repo scans. Example: `scmMetadata.branch = main`
80 * @opt_param int pageSize Optional. The maximum number of repo scans to return.
81 * If unspecified, at most 10 repo scans will be returned. The maximum value is
82 * 50; values above 50 will be coerced to 50.
83 * @opt_param string pageToken Optional. A page token received from a previous
84 * `ListRepoScans` call. Provide this to retrieve the subsequent page. When
85 * paginating, all other parameters provided to `ListRepoScans` must match the
86 * call that provided the page token.
87 * @return GoogleChecksRepoScanV1alphaListRepoScansResponse
88 * @throws \Google\Service\Exception
89 */
90 public function listAccountsReposScans($parent, $optParams = [])
91 {
92 $params = ['parent' => $parent];
93 $params = array_merge($params, $optParams);
94 return $this->call('list', [$params], GoogleChecksRepoScanV1alphaListRepoScansResponse::class);
95 }
96}
97
98// Adding a class alias for backwards compatibility with the previous class name.
99class_alias(AccountsReposScans::class, 'Google_Service_ChecksService_Resource_AccountsReposScans');
Note: See TracBrowser for help on using the repository browser.