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\Apigee\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Apigee\GoogleApiHttpBody;
|
---|
21 | use Google\Service\Apigee\GoogleCloudApigeeV1ListSecurityReportsResponse;
|
---|
22 | use Google\Service\Apigee\GoogleCloudApigeeV1SecurityReport;
|
---|
23 | use Google\Service\Apigee\GoogleCloudApigeeV1SecurityReportQuery;
|
---|
24 | use Google\Service\Apigee\GoogleCloudApigeeV1SecurityReportResultView;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "hostSecurityReports" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
31 | * $hostSecurityReports = $apigeeService->organizations_hostSecurityReports;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class OrganizationsHostSecurityReports extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Submit a query at host level to be processed in the background. If the
|
---|
38 | * submission of the query succeeds, the API returns a 201 status and an ID that
|
---|
39 | * refer to the query. In addition to the HTTP status 201, the `state` of
|
---|
40 | * "enqueued" means that the request succeeded. (hostSecurityReports.create)
|
---|
41 | *
|
---|
42 | * @param string $parent Required. The parent resource name. Must be of the form
|
---|
43 | * `organizations/{org}`.
|
---|
44 | * @param GoogleCloudApigeeV1SecurityReportQuery $postBody
|
---|
45 | * @param array $optParams Optional parameters.
|
---|
46 | * @return GoogleCloudApigeeV1SecurityReport
|
---|
47 | * @throws \Google\Service\Exception
|
---|
48 | */
|
---|
49 | public function create($parent, GoogleCloudApigeeV1SecurityReportQuery $postBody, $optParams = [])
|
---|
50 | {
|
---|
51 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
52 | $params = array_merge($params, $optParams);
|
---|
53 | return $this->call('create', [$params], GoogleCloudApigeeV1SecurityReport::class);
|
---|
54 | }
|
---|
55 | /**
|
---|
56 | * Get status of a query submitted at host level. If the query is still in
|
---|
57 | * progress, the `state` is set to "running" After the query has completed
|
---|
58 | * successfully, `state` is set to "completed" (hostSecurityReports.get)
|
---|
59 | *
|
---|
60 | * @param string $name Required. Name of the security report to get. Must be of
|
---|
61 | * the form `organizations/{org}/securityReports/{reportId}`.
|
---|
62 | * @param array $optParams Optional parameters.
|
---|
63 | * @return GoogleCloudApigeeV1SecurityReport
|
---|
64 | * @throws \Google\Service\Exception
|
---|
65 | */
|
---|
66 | public function get($name, $optParams = [])
|
---|
67 | {
|
---|
68 | $params = ['name' => $name];
|
---|
69 | $params = array_merge($params, $optParams);
|
---|
70 | return $this->call('get', [$params], GoogleCloudApigeeV1SecurityReport::class);
|
---|
71 | }
|
---|
72 | /**
|
---|
73 | * After the query is completed, use this API to retrieve the results. If the
|
---|
74 | * request succeeds, and there is a non-zero result set, the result is
|
---|
75 | * downloaded to the client as a zipped JSON file. The name of the downloaded
|
---|
76 | * file will be: OfflineQueryResult-.zip Example:
|
---|
77 | * `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`
|
---|
78 | * (hostSecurityReports.getResult)
|
---|
79 | *
|
---|
80 | * @param string $name Required. Name of the security report result to get. Must
|
---|
81 | * be of the form `organizations/{org}/securityReports/{reportId}/result`.
|
---|
82 | * @param array $optParams Optional parameters.
|
---|
83 | * @return GoogleApiHttpBody
|
---|
84 | * @throws \Google\Service\Exception
|
---|
85 | */
|
---|
86 | public function getResult($name, $optParams = [])
|
---|
87 | {
|
---|
88 | $params = ['name' => $name];
|
---|
89 | $params = array_merge($params, $optParams);
|
---|
90 | return $this->call('getResult', [$params], GoogleApiHttpBody::class);
|
---|
91 | }
|
---|
92 | /**
|
---|
93 | * After the query is completed, use this API to view the query result when
|
---|
94 | * result size is small. (hostSecurityReports.getResultView)
|
---|
95 | *
|
---|
96 | * @param string $name Required. Name of the security report result view to get.
|
---|
97 | * Must be of the form
|
---|
98 | * `organizations/{org}/securityReports/{reportId}/resultView`.
|
---|
99 | * @param array $optParams Optional parameters.
|
---|
100 | * @return GoogleCloudApigeeV1SecurityReportResultView
|
---|
101 | * @throws \Google\Service\Exception
|
---|
102 | */
|
---|
103 | public function getResultView($name, $optParams = [])
|
---|
104 | {
|
---|
105 | $params = ['name' => $name];
|
---|
106 | $params = array_merge($params, $optParams);
|
---|
107 | return $this->call('getResultView', [$params], GoogleCloudApigeeV1SecurityReportResultView::class);
|
---|
108 | }
|
---|
109 | /**
|
---|
110 | * Return a list of Security Reports at host level.
|
---|
111 | * (hostSecurityReports.listOrganizationsHostSecurityReports)
|
---|
112 | *
|
---|
113 | * @param string $parent Required. The parent resource name. Must be of the form
|
---|
114 | * `organizations/{org}`.
|
---|
115 | * @param array $optParams Optional parameters.
|
---|
116 | *
|
---|
117 | * @opt_param string dataset Filter response list by dataset. Example: `api`,
|
---|
118 | * `mint`
|
---|
119 | * @opt_param string envgroupHostname Required. Filter response list by
|
---|
120 | * hostname.
|
---|
121 | * @opt_param string from Filter response list by returning security reports
|
---|
122 | * that created after this date time. Time must be in ISO date-time format like
|
---|
123 | * '2011-12-03T10:15:30Z'.
|
---|
124 | * @opt_param int pageSize The maximum number of security report to return in
|
---|
125 | * the list response.
|
---|
126 | * @opt_param string pageToken Token returned from the previous list response to
|
---|
127 | * fetch the next page.
|
---|
128 | * @opt_param string status Filter response list by security report status.
|
---|
129 | * @opt_param string submittedBy Filter response list by user who submitted
|
---|
130 | * queries.
|
---|
131 | * @opt_param string to Filter response list by returning security reports that
|
---|
132 | * created before this date time. Time must be in ISO date-time format like
|
---|
133 | * '2011-12-03T10:16:30Z'.
|
---|
134 | * @return GoogleCloudApigeeV1ListSecurityReportsResponse
|
---|
135 | * @throws \Google\Service\Exception
|
---|
136 | */
|
---|
137 | public function listOrganizationsHostSecurityReports($parent, $optParams = [])
|
---|
138 | {
|
---|
139 | $params = ['parent' => $parent];
|
---|
140 | $params = array_merge($params, $optParams);
|
---|
141 | return $this->call('list', [$params], GoogleCloudApigeeV1ListSecurityReportsResponse::class);
|
---|
142 | }
|
---|
143 | }
|
---|
144 |
|
---|
145 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
146 | class_alias(OrganizationsHostSecurityReports::class, 'Google_Service_Apigee_Resource_OrganizationsHostSecurityReports');
|
---|