[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\Environment;
|
---|
| 21 | use Google\Service\ToolResults\ListEnvironmentsResponse;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "environments" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $toolresultsService = new Google\Service\ToolResults(...);
|
---|
| 28 | * $environments = $toolresultsService->projects_histories_executions_environments;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class ProjectsHistoriesExecutionsEnvironments extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Gets an Environment. May return any of the following canonical error codes: -
|
---|
| 35 | * PERMISSION_DENIED - if the user is not authorized to read project -
|
---|
| 36 | * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
|
---|
| 37 | * Environment does not exist (environments.get)
|
---|
| 38 | *
|
---|
| 39 | * @param string $projectId Required. A Project id.
|
---|
| 40 | * @param string $historyId Required. A History id.
|
---|
| 41 | * @param string $executionId Required. An Execution id.
|
---|
| 42 | * @param string $environmentId Required. An Environment id.
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | * @return Environment
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function get($projectId, $historyId, $executionId, $environmentId, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId, 'environmentId' => $environmentId];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('get', [$params], Environment::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Lists Environments for a given Execution. The Environments are sorted by
|
---|
| 55 | * display name. May return any of the following canonical error codes: -
|
---|
| 56 | * PERMISSION_DENIED - if the user is not authorized to read project -
|
---|
| 57 | * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
|
---|
| 58 | * containing Execution does not exist
|
---|
| 59 | * (environments.listProjectsHistoriesExecutionsEnvironments)
|
---|
| 60 | *
|
---|
| 61 | * @param string $projectId Required. A Project id.
|
---|
| 62 | * @param string $historyId Required. A History id.
|
---|
| 63 | * @param string $executionId Required. An Execution id.
|
---|
| 64 | * @param array $optParams Optional parameters.
|
---|
| 65 | *
|
---|
| 66 | * @opt_param int pageSize The maximum number of Environments to fetch. Default
|
---|
| 67 | * value: 25. The server will use this default if the field is not set or has a
|
---|
| 68 | * value of 0.
|
---|
| 69 | * @opt_param string pageToken A continuation token to resume the query at the
|
---|
| 70 | * next item.
|
---|
| 71 | * @return ListEnvironmentsResponse
|
---|
| 72 | * @throws \Google\Service\Exception
|
---|
| 73 | */
|
---|
| 74 | public function listProjectsHistoriesExecutionsEnvironments($projectId, $historyId, $executionId, $optParams = [])
|
---|
| 75 | {
|
---|
| 76 | $params = ['projectId' => $projectId, 'historyId' => $historyId, 'executionId' => $executionId];
|
---|
| 77 | $params = array_merge($params, $optParams);
|
---|
| 78 | return $this->call('list', [$params], ListEnvironmentsResponse::class);
|
---|
| 79 | }
|
---|
| 80 | }
|
---|
| 81 |
|
---|
| 82 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 83 | class_alias(ProjectsHistoriesExecutionsEnvironments::class, 'Google_Service_ToolResults_Resource_ProjectsHistoriesExecutionsEnvironments');
|
---|