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\Dialogflow\Resource; 19 20use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3ListTestCaseResultsResponse; 21use Google\Service\Dialogflow\GoogleCloudDialogflowCxV3TestCaseResult; 22 23/** 24 * The "results" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $dialogflowService = new Google\Service\Dialogflow(...); 28 * $results = $dialogflowService->results; 29 * </code> 30 */ 31class ProjectsLocationsAgentsTestCasesResults extends \Google\Service\Resource 32{ 33 /** 34 * Gets a test case result. (results.get) 35 * 36 * @param string $name Required. The name of the testcase. Format: 37 * `projects//locations//agents//testCases//results/`. 38 * @param array $optParams Optional parameters. 39 * @return GoogleCloudDialogflowCxV3TestCaseResult 40 */ 41 public function get($name, $optParams = []) 42 { 43 $params = ['name' => $name]; 44 $params = array_merge($params, $optParams); 45 return $this->call('get', [$params], GoogleCloudDialogflowCxV3TestCaseResult::class); 46 } 47 /** 48 * Fetches a list of results for a given test case. 49 * (results.listProjectsLocationsAgentsTestCasesResults) 50 * 51 * @param string $parent Required. The test case to list results for. Format: 52 * `projects//locations//agents// testCases/`. Specify a `-` as a wildcard for 53 * TestCase ID to list results across multiple test cases. 54 * @param array $optParams Optional parameters. 55 * 56 * @opt_param string filter The filter expression used to filter test case 57 * results. See [API Filtering](https://aip.dev/160). The expression is case 58 * insensitive. Only 'AND' is supported for logical operators. The supported 59 * syntax is listed below in detail: [AND ] ... [AND latest] The supported 60 * fields and operators are: field operator `environment` `=`, `IN` (Use value 61 * `draft` for draft environment) `test_time` `>`, `<` `latest` only returns the 62 * latest test result in all results for each test case. Examples: * 63 * "environment=draft AND latest" matches the latest test result for each test 64 * case in the draft environment. * "environment IN (e1,e2)" matches any test 65 * case results with an environment resource name of either "e1" or "e2". * 66 * "test_time > 1602540713" matches any test case results with test time later 67 * than a unix timestamp in seconds 1602540713. 68 * @opt_param int pageSize The maximum number of items to return in a single 69 * page. By default 100 and at most 1000. 70 * @opt_param string pageToken The next_page_token value returned from a 71 * previous list request. 72 * @return GoogleCloudDialogflowCxV3ListTestCaseResultsResponse 73 */ 74 public function listProjectsLocationsAgentsTestCasesResults($parent, $optParams = []) 75 { 76 $params = ['parent' => $parent]; 77 $params = array_merge($params, $optParams); 78 return $this->call('list', [$params], GoogleCloudDialogflowCxV3ListTestCaseResultsResponse::class); 79 } 80} 81 82// Adding a class alias for backwards compatibility with the previous class name. 83class_alias(ProjectsLocationsAgentsTestCasesResults::class, 'Google_Service_Dialogflow_Resource_ProjectsLocationsAgentsTestCasesResults'); 84