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