[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\ListStepAccessibilityClustersResponse;
|
---|
| 21 | use Google\Service\ToolResults\ListStepsResponse;
|
---|
| 22 | use Google\Service\ToolResults\PerfMetricsSummary;
|
---|
| 23 | use Google\Service\ToolResults\PublishXunitXmlFilesRequest;
|
---|
| 24 | use Google\Service\ToolResults\Step;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "steps" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $toolresultsService = new Google\Service\ToolResults(...);
|
---|
| 31 | * $steps = $toolresultsService->projects_histories_executions_steps;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class ProjectsHistoriesExecutionsSteps extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Lists accessibility clusters for a given Step May return any of the following
|
---|
| 38 | * canonical error codes: - PERMISSION_DENIED - if the user is not authorized to
|
---|
| 39 | * read project - INVALID_ARGUMENT - if the request is malformed -
|
---|
| 40 | * FAILED_PRECONDITION - if an argument in the request happens to be invalid;
|
---|
| 41 | * e.g. if the locale format is incorrect - NOT_FOUND - if the containing Step
|
---|
| 42 | * does not exist (steps.accessibilityClusters)
|
---|
| 43 | *
|
---|
| 44 | * @param string $name A full resource name of the step. For example,
|
---|
| 45 | * projects/my-project/histories/bh.1234567890abcdef/executions/
|
---|
| 46 | * 1234567890123456789/steps/bs.1234567890abcdef Required.
|
---|
| 47 | * @param array $optParams Optional parameters.
|
---|
| 48 | *
|
---|
| 49 | * @opt_param string locale The accepted format is the canonical Unicode format
|
---|
| 50 | * with hyphen as a delimiter. Language must be lowercase, Language Script -
|
---|
| 51 | * Capitalized, Region - UPPERCASE. See
|
---|
| 52 | * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier for details.
|
---|
| 53 | * Required.
|
---|
| 54 | * @return ListStepAccessibilityClustersResponse
|
---|
| 55 | * @throws \Google\Service\Exception
|
---|
| 56 | */
|
---|
| 57 | public function accessibilityClusters($name, $optParams = [])
|
---|
| 58 | {
|
---|
| 59 | $params = ['name' => $name];
|
---|
| 60 | $params = array_merge($params, $optParams);
|
---|
| 61 | return $this->call('accessibilityClusters', [$params], ListStepAccessibilityClustersResponse::class);
|
---|
| 62 | }
|
---|
| 63 | /**
|
---|
| 64 | * Creates a Step. The returned Step will have the id set. May return any of the
|
---|
| 65 | * following canonical error codes: - PERMISSION_DENIED - if the user is not
|
---|
| 66 | * authorized to write to project - INVALID_ARGUMENT - if the request is
|
---|
| 67 | * malformed - FAILED_PRECONDITION - if the step is too large (more than 10Mib)
|
---|
| 68 | * - NOT_FOUND - if the containing Execution does not exist (steps.create)
|
---|
| 69 | *
|
---|
| 70 | * @param string $projectId Required. A Project id.
|
---|
| 71 | * @param string $historyId Required. A History id.
|
---|
| 72 | * @param string $executionId Required. An Execution id.
|
---|
| 73 | * @param Step $postBody
|
---|
| 74 | * @param array $optParams Optional parameters.
|
---|
| 75 | *
|
---|
| 76 | * @opt_param string requestId A unique request ID for server to detect
|
---|
| 77 | * duplicated requests. For example, a UUID. Optional, but strongly recommended.
|
---|
| 78 | * @return Step
|
---|
| 79 | * @throws \Google\Service\Exception
|
---|
| 80 | */
|
---|
| 81 | public function create($projectId, $historyId, $executionId, Step $postBody, $optParams = [])
|
---|
| 82 | {
|
---|
| 83 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId, 'postBody' => $postBody];
|
---|
| 84 | $params = array_merge($params, $optParams);
|
---|
| 85 | return $this->call('create', [$params], Step::class);
|
---|
| 86 | }
|
---|
| 87 | /**
|
---|
| 88 | * Gets a Step. May return any of the following canonical error codes: -
|
---|
| 89 | * PERMISSION_DENIED - if the user is not authorized to read project -
|
---|
| 90 | * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step does
|
---|
| 91 | * not exist (steps.get)
|
---|
| 92 | *
|
---|
| 93 | * @param string $projectId A Project id. Required.
|
---|
| 94 | * @param string $historyId A History id. Required.
|
---|
| 95 | * @param string $executionId A Execution id. Required.
|
---|
| 96 | * @param string $stepId A Step id. Required.
|
---|
| 97 | * @param array $optParams Optional parameters.
|
---|
| 98 | * @return Step
|
---|
| 99 | * @throws \Google\Service\Exception
|
---|
| 100 | */
|
---|
| 101 | public function get($projectId, $historyId, $executionId, $stepId, $optParams = [])
|
---|
| 102 | {
|
---|
| 103 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId, 'stepId' => $stepId];
|
---|
| 104 | $params = array_merge($params, $optParams);
|
---|
| 105 | return $this->call('get', [$params], Step::class);
|
---|
| 106 | }
|
---|
| 107 | /**
|
---|
| 108 | * Retrieves a PerfMetricsSummary. May return any of the following error
|
---|
| 109 | * code(s): - NOT_FOUND - The specified PerfMetricsSummary does not exist
|
---|
| 110 | * (steps.getPerfMetricsSummary)
|
---|
| 111 | *
|
---|
| 112 | * @param string $projectId The cloud project
|
---|
| 113 | * @param string $historyId A tool results history ID.
|
---|
| 114 | * @param string $executionId A tool results execution ID.
|
---|
| 115 | * @param string $stepId A tool results step ID.
|
---|
| 116 | * @param array $optParams Optional parameters.
|
---|
| 117 | * @return PerfMetricsSummary
|
---|
| 118 | * @throws \Google\Service\Exception
|
---|
| 119 | */
|
---|
| 120 | public function getPerfMetricsSummary($projectId, $historyId, $executionId, $stepId, $optParams = [])
|
---|
| 121 | {
|
---|
| 122 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId, 'stepId' => $stepId];
|
---|
| 123 | $params = array_merge($params, $optParams);
|
---|
| 124 | return $this->call('getPerfMetricsSummary', [$params], PerfMetricsSummary::class);
|
---|
| 125 | }
|
---|
| 126 | /**
|
---|
| 127 | * Lists Steps for a given Execution. The steps are sorted by creation_time in
|
---|
| 128 | * descending order. The step_id key will be used to order the steps with the
|
---|
| 129 | * same creation_time. May return any of the following canonical error codes: -
|
---|
| 130 | * PERMISSION_DENIED - if the user is not authorized to read project -
|
---|
| 131 | * INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an
|
---|
| 132 | * argument in the request happens to be invalid; e.g. if an attempt is made to
|
---|
| 133 | * list the children of a nonexistent Step - NOT_FOUND - if the containing
|
---|
| 134 | * Execution does not exist (steps.listProjectsHistoriesExecutionsSteps)
|
---|
| 135 | *
|
---|
| 136 | * @param string $projectId A Project id. Required.
|
---|
| 137 | * @param string $historyId A History id. Required.
|
---|
| 138 | * @param string $executionId A Execution id. Required.
|
---|
| 139 | * @param array $optParams Optional parameters.
|
---|
| 140 | *
|
---|
| 141 | * @opt_param int pageSize The maximum number of Steps to fetch. Default value:
|
---|
| 142 | * 25. The server will use this default if the field is not set or has a value
|
---|
| 143 | * of 0. Optional.
|
---|
| 144 | * @opt_param string pageToken A continuation token to resume the query at the
|
---|
| 145 | * next item. Optional.
|
---|
| 146 | * @return ListStepsResponse
|
---|
| 147 | * @throws \Google\Service\Exception
|
---|
| 148 | */
|
---|
| 149 | public function listProjectsHistoriesExecutionsSteps($projectId, $historyId, $executionId, $optParams = [])
|
---|
| 150 | {
|
---|
| 151 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId];
|
---|
| 152 | $params = array_merge($params, $optParams);
|
---|
| 153 | return $this->call('list', [$params], ListStepsResponse::class);
|
---|
| 154 | }
|
---|
| 155 | /**
|
---|
| 156 | * Updates an existing Step with the supplied partial entity. May return any of
|
---|
| 157 | * the following canonical error codes: - PERMISSION_DENIED - if the user is not
|
---|
| 158 | * authorized to write project - INVALID_ARGUMENT - if the request is malformed
|
---|
| 159 | * - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try
|
---|
| 160 | * to upload a duplicate xml file), if the updated step is too large (more than
|
---|
| 161 | * 10Mib) - NOT_FOUND - if the containing Execution does not exist (steps.patch)
|
---|
| 162 | *
|
---|
| 163 | * @param string $projectId A Project id. Required.
|
---|
| 164 | * @param string $historyId A History id. Required.
|
---|
| 165 | * @param string $executionId A Execution id. Required.
|
---|
| 166 | * @param string $stepId A Step id. Required.
|
---|
| 167 | * @param Step $postBody
|
---|
| 168 | * @param array $optParams Optional parameters.
|
---|
| 169 | *
|
---|
| 170 | * @opt_param string requestId A unique request ID for server to detect
|
---|
| 171 | * duplicated requests. For example, a UUID. Optional, but strongly recommended.
|
---|
| 172 | * @return Step
|
---|
| 173 | * @throws \Google\Service\Exception
|
---|
| 174 | */
|
---|
| 175 | public function patch($projectId, $historyId, $executionId, $stepId, Step $postBody, $optParams = [])
|
---|
| 176 | {
|
---|
| 177 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId, 'stepId' => $stepId, 'postBody' => $postBody];
|
---|
| 178 | $params = array_merge($params, $optParams);
|
---|
| 179 | return $this->call('patch', [$params], Step::class);
|
---|
| 180 | }
|
---|
| 181 | /**
|
---|
| 182 | * Publish xml files to an existing Step. May return any of the following
|
---|
| 183 | * canonical error codes: - PERMISSION_DENIED - if the user is not authorized to
|
---|
| 184 | * write project - INVALID_ARGUMENT - if the request is malformed -
|
---|
| 185 | * FAILED_PRECONDITION - if the requested state transition is illegal, e.g. try
|
---|
| 186 | * to upload a duplicate xml file or a file too large. - NOT_FOUND - if the
|
---|
| 187 | * containing Execution does not exist (steps.publishXunitXmlFiles)
|
---|
| 188 | *
|
---|
| 189 | * @param string $projectId A Project id. Required.
|
---|
| 190 | * @param string $historyId A History id. Required.
|
---|
| 191 | * @param string $executionId A Execution id. Required.
|
---|
| 192 | * @param string $stepId A Step id. Note: This step must include a
|
---|
| 193 | * TestExecutionStep. Required.
|
---|
| 194 | * @param PublishXunitXmlFilesRequest $postBody
|
---|
| 195 | * @param array $optParams Optional parameters.
|
---|
| 196 | * @return Step
|
---|
| 197 | * @throws \Google\Service\Exception
|
---|
| 198 | */
|
---|
| 199 | public function publishXunitXmlFiles($projectId, $historyId, $executionId, $stepId, PublishXunitXmlFilesRequest $postBody, $optParams = [])
|
---|
| 200 | {
|
---|
| 201 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId, 'stepId' => $stepId, 'postBody' => $postBody];
|
---|
| 202 | $params = array_merge($params, $optParams);
|
---|
| 203 | return $this->call('publishXunitXmlFiles', [$params], Step::class);
|
---|
| 204 | }
|
---|
| 205 | }
|
---|
| 206 |
|
---|
| 207 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 208 | class_alias(ProjectsHistoriesExecutionsSteps::class, 'Google_Service_ToolResults_Resource_ProjectsHistoriesExecutionsSteps');
|
---|