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\WebRisk\Resource;
19
20use Google\Service\WebRisk\GoogleCloudWebriskV1SubmitUriRequest;
21use Google\Service\WebRisk\GoogleLongrunningOperation;
22
23/**
24 * The "uris" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $webriskService = new Google\Service\WebRisk(...);
28 *   $uris = $webriskService->uris;
29 *  </code>
30 */
31class ProjectsUris extends \Google\Service\Resource
32{
33  /**
34   * Submits a URI suspected of containing malicious content to be reviewed.
35   * Returns a google.longrunning.Operation which, once the review is complete, is
36   * updated with its result. You can use the [Pub/Sub API]
37   * (https://cloud.google.com/pubsub) to receive notifications for the returned
38   * Operation. If the result verifies the existence of malicious content, the
39   * site will be added to the [Google's Social Engineering lists]
40   * (https://support.google.com/webmasters/answer/6350487/) in order to protect
41   * users that could get exposed to this threat in the future. Only allowlisted
42   * projects can use this method during Early Access. Please reach out to Sales
43   * or your customer engineer to obtain access. (uris.submit)
44   *
45   * @param string $parent Required. The name of the project that is making the
46   * submission. This string is in the format "projects/{project_number}".
47   * @param GoogleCloudWebriskV1SubmitUriRequest $postBody
48   * @param array $optParams Optional parameters.
49   * @return GoogleLongrunningOperation
50   */
51  public function submit($parent, GoogleCloudWebriskV1SubmitUriRequest $postBody, $optParams = [])
52  {
53    $params = ['parent' => $parent, 'postBody' => $postBody];
54    $params = array_merge($params, $optParams);
55    return $this->call('submit', [$params], GoogleLongrunningOperation::class);
56  }
57}
58
59// Adding a class alias for backwards compatibility with the previous class name.
60class_alias(ProjectsUris::class, 'Google_Service_WebRisk_Resource_ProjectsUris');
61