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\RecaptchaEnterprise\Resource; 19 20use Google\Service\RecaptchaEnterprise\GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest; 21use Google\Service\RecaptchaEnterprise\GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse; 22use 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->assessments; 30 * </code> 31 */ 32class 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 */ 45 public function annotate($name, GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest $postBody, $optParams = []) 46 { 47 $params = ['name' => $name, 'postBody' => $postBody]; 48 $params = array_merge($params, $optParams); 49 return $this->call('annotate', [$params], GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse::class); 50 } 51 /** 52 * Creates an Assessment of the likelihood an event is legitimate. 53 * (assessments.create) 54 * 55 * @param string $parent Required. The name of the project in which the 56 * assessment will be created, in the format "projects/{project}". 57 * @param GoogleCloudRecaptchaenterpriseV1Assessment $postBody 58 * @param array $optParams Optional parameters. 59 * @return GoogleCloudRecaptchaenterpriseV1Assessment 60 */ 61 public function create($parent, GoogleCloudRecaptchaenterpriseV1Assessment $postBody, $optParams = []) 62 { 63 $params = ['parent' => $parent, 'postBody' => $postBody]; 64 $params = array_merge($params, $optParams); 65 return $this->call('create', [$params], GoogleCloudRecaptchaenterpriseV1Assessment::class); 66 } 67} 68 69// Adding a class alias for backwards compatibility with the previous class name. 70class_alias(ProjectsAssessments::class, 'Google_Service_RecaptchaEnterprise_Resource_ProjectsAssessments'); 71