[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\ToolResults\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\ToolResults\ListScreenshotClustersResponse;
|
---|
| 21 | use Google\Service\ToolResults\ScreenshotCluster;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "clusters" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $toolresultsService = new Google\Service\ToolResults(...);
|
---|
| 28 | * $clusters = $toolresultsService->projects_histories_executions_clusters;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class ProjectsHistoriesExecutionsClusters extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Retrieves a single screenshot cluster by its ID (clusters.get)
|
---|
| 35 | *
|
---|
| 36 | * @param string $projectId A Project id. Required.
|
---|
| 37 | * @param string $historyId A History id. Required.
|
---|
| 38 | * @param string $executionId An Execution id. Required.
|
---|
| 39 | * @param string $clusterId A Cluster id Required.
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | * @return ScreenshotCluster
|
---|
| 42 | * @throws \Google\Service\Exception
|
---|
| 43 | */
|
---|
| 44 | public function get($projectId, $historyId, $executionId, $clusterId, $optParams = [])
|
---|
| 45 | {
|
---|
| 46 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId, 'clusterId' => $clusterId];
|
---|
| 47 | $params = array_merge($params, $optParams);
|
---|
| 48 | return $this->call('get', [$params], ScreenshotCluster::class);
|
---|
| 49 | }
|
---|
| 50 | /**
|
---|
| 51 | * Lists Screenshot Clusters Returns the list of screenshot clusters
|
---|
| 52 | * corresponding to an execution. Screenshot clusters are created after the
|
---|
| 53 | * execution is finished. Clusters are created from a set of screenshots.
|
---|
| 54 | * Between any two screenshots, a matching score is calculated based off their
|
---|
| 55 | * metadata that determines how similar they are. Screenshots are placed in the
|
---|
| 56 | * cluster that has screens which have the highest matching scores.
|
---|
| 57 | * (clusters.listProjectsHistoriesExecutionsClusters)
|
---|
| 58 | *
|
---|
| 59 | * @param string $projectId A Project id. Required.
|
---|
| 60 | * @param string $historyId A History id. Required.
|
---|
| 61 | * @param string $executionId An Execution id. Required.
|
---|
| 62 | * @param array $optParams Optional parameters.
|
---|
| 63 | * @return ListScreenshotClustersResponse
|
---|
| 64 | * @throws \Google\Service\Exception
|
---|
| 65 | */
|
---|
| 66 | public function listProjectsHistoriesExecutionsClusters($projectId, $historyId, $executionId, $optParams = [])
|
---|
| 67 | {
|
---|
| 68 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId];
|
---|
| 69 | $params = array_merge($params, $optParams);
|
---|
| 70 | return $this->call('list', [$params], ListScreenshotClustersResponse::class);
|
---|
| 71 | }
|
---|
| 72 | }
|
---|
| 73 |
|
---|
| 74 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 75 | class_alias(ProjectsHistoriesExecutionsClusters::class, 'Google_Service_ToolResults_Resource_ProjectsHistoriesExecutionsClusters');
|
---|