[e3d4e0a] | 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\RecaptchaEnterprise\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\RecaptchaEnterprise\GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest;
|
---|
| 21 | use Google\Service\RecaptchaEnterprise\GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse;
|
---|
| 22 | use Google\Service\RecaptchaEnterprise\GoogleCloudRecaptchaenterpriseV1Assessment;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "assessments" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $recaptchaenterpriseService = new Google\Service\RecaptchaEnterprise(...);
|
---|
| 29 | * $assessments = $recaptchaenterpriseService->projects_assessments;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsAssessments extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Annotates a previously created Assessment to provide additional information
|
---|
| 36 | * on whether the event turned out to be authentic or fraudulent.
|
---|
| 37 | * (assessments.annotate)
|
---|
| 38 | *
|
---|
| 39 | * @param string $name Required. The resource name of the Assessment, in the
|
---|
| 40 | * format `projects/{project}/assessments/{assessment}`.
|
---|
| 41 | * @param GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest $postBody
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | * @return GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse
|
---|
| 44 | * @throws \Google\Service\Exception
|
---|
| 45 | */
|
---|
| 46 | public function annotate($name, GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest $postBody, $optParams = [])
|
---|
| 47 | {
|
---|
| 48 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 49 | $params = array_merge($params, $optParams);
|
---|
| 50 | return $this->call('annotate', [$params], GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse::class);
|
---|
| 51 | }
|
---|
| 52 | /**
|
---|
| 53 | * Creates an Assessment of the likelihood an event is legitimate.
|
---|
| 54 | * (assessments.create)
|
---|
| 55 | *
|
---|
| 56 | * @param string $parent Required. The name of the project in which the
|
---|
| 57 | * assessment is created, in the format `projects/{project}`.
|
---|
| 58 | * @param GoogleCloudRecaptchaenterpriseV1Assessment $postBody
|
---|
| 59 | * @param array $optParams Optional parameters.
|
---|
| 60 | * @return GoogleCloudRecaptchaenterpriseV1Assessment
|
---|
| 61 | * @throws \Google\Service\Exception
|
---|
| 62 | */
|
---|
| 63 | public function create($parent, GoogleCloudRecaptchaenterpriseV1Assessment $postBody, $optParams = [])
|
---|
| 64 | {
|
---|
| 65 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 66 | $params = array_merge($params, $optParams);
|
---|
| 67 | return $this->call('create', [$params], GoogleCloudRecaptchaenterpriseV1Assessment::class);
|
---|
| 68 | }
|
---|
| 69 | }
|
---|
| 70 |
|
---|
| 71 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 72 | class_alias(ProjectsAssessments::class, 'Google_Service_RecaptchaEnterprise_Resource_ProjectsAssessments');
|
---|