[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\Script\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Script\ListScriptProcessesResponse;
|
---|
| 21 | use Google\Service\Script\ListUserProcessesResponse;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "processes" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $scriptService = new Google\Service\Script(...);
|
---|
| 28 | * $processes = $scriptService->processes;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class Processes extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * List information about processes made by or on behalf of a user, such as
|
---|
| 35 | * process type and current status. (processes.listProcesses)
|
---|
| 36 | *
|
---|
| 37 | * @param array $optParams Optional parameters.
|
---|
| 38 | *
|
---|
| 39 | * @opt_param int pageSize The maximum number of returned processes per page of
|
---|
| 40 | * results. Defaults to 50.
|
---|
| 41 | * @opt_param string pageToken The token for continuing a previous list request
|
---|
| 42 | * on the next page. This should be set to the value of `nextPageToken` from a
|
---|
| 43 | * previous response.
|
---|
| 44 | * @opt_param string userProcessFilter.deploymentId Optional field used to limit
|
---|
| 45 | * returned processes to those originating from projects with a specific
|
---|
| 46 | * deployment ID.
|
---|
| 47 | * @opt_param string userProcessFilter.endTime Optional field used to limit
|
---|
| 48 | * returned processes to those that completed on or before the given timestamp.
|
---|
| 49 | * @opt_param string userProcessFilter.functionName Optional field used to limit
|
---|
| 50 | * returned processes to those originating from a script function with the given
|
---|
| 51 | * function name.
|
---|
| 52 | * @opt_param string userProcessFilter.projectName Optional field used to limit
|
---|
| 53 | * returned processes to those originating from projects with project names
|
---|
| 54 | * containing a specific string.
|
---|
| 55 | * @opt_param string userProcessFilter.scriptId Optional field used to limit
|
---|
| 56 | * returned processes to those originating from projects with a specific script
|
---|
| 57 | * ID.
|
---|
| 58 | * @opt_param string userProcessFilter.startTime Optional field used to limit
|
---|
| 59 | * returned processes to those that were started on or after the given
|
---|
| 60 | * timestamp.
|
---|
| 61 | * @opt_param string userProcessFilter.statuses Optional field used to limit
|
---|
| 62 | * returned processes to those having one of the specified process statuses.
|
---|
| 63 | * @opt_param string userProcessFilter.types Optional field used to limit
|
---|
| 64 | * returned processes to those having one of the specified process types.
|
---|
| 65 | * @opt_param string userProcessFilter.userAccessLevels Optional field used to
|
---|
| 66 | * limit returned processes to those having one of the specified user access
|
---|
| 67 | * levels.
|
---|
| 68 | * @return ListUserProcessesResponse
|
---|
| 69 | * @throws \Google\Service\Exception
|
---|
| 70 | */
|
---|
| 71 | public function listProcesses($optParams = [])
|
---|
| 72 | {
|
---|
| 73 | $params = [];
|
---|
| 74 | $params = array_merge($params, $optParams);
|
---|
| 75 | return $this->call('list', [$params], ListUserProcessesResponse::class);
|
---|
| 76 | }
|
---|
| 77 | /**
|
---|
| 78 | * List information about a script's executed processes, such as process type
|
---|
| 79 | * and current status. (processes.listScriptProcesses)
|
---|
| 80 | *
|
---|
| 81 | * @param array $optParams Optional parameters.
|
---|
| 82 | *
|
---|
| 83 | * @opt_param int pageSize The maximum number of returned processes per page of
|
---|
| 84 | * results. Defaults to 50.
|
---|
| 85 | * @opt_param string pageToken The token for continuing a previous list request
|
---|
| 86 | * on the next page. This should be set to the value of `nextPageToken` from a
|
---|
| 87 | * previous response.
|
---|
| 88 | * @opt_param string scriptId The script ID of the project whose processes are
|
---|
| 89 | * listed.
|
---|
| 90 | * @opt_param string scriptProcessFilter.deploymentId Optional field used to
|
---|
| 91 | * limit returned processes to those originating from projects with a specific
|
---|
| 92 | * deployment ID.
|
---|
| 93 | * @opt_param string scriptProcessFilter.endTime Optional field used to limit
|
---|
| 94 | * returned processes to those that completed on or before the given timestamp.
|
---|
| 95 | * @opt_param string scriptProcessFilter.functionName Optional field used to
|
---|
| 96 | * limit returned processes to those originating from a script function with the
|
---|
| 97 | * given function name.
|
---|
| 98 | * @opt_param string scriptProcessFilter.startTime Optional field used to limit
|
---|
| 99 | * returned processes to those that were started on or after the given
|
---|
| 100 | * timestamp.
|
---|
| 101 | * @opt_param string scriptProcessFilter.statuses Optional field used to limit
|
---|
| 102 | * returned processes to those having one of the specified process statuses.
|
---|
| 103 | * @opt_param string scriptProcessFilter.types Optional field used to limit
|
---|
| 104 | * returned processes to those having one of the specified process types.
|
---|
| 105 | * @opt_param string scriptProcessFilter.userAccessLevels Optional field used to
|
---|
| 106 | * limit returned processes to those having one of the specified user access
|
---|
| 107 | * levels.
|
---|
| 108 | * @return ListScriptProcessesResponse
|
---|
| 109 | * @throws \Google\Service\Exception
|
---|
| 110 | */
|
---|
| 111 | public function listScriptProcesses($optParams = [])
|
---|
| 112 | {
|
---|
| 113 | $params = [];
|
---|
| 114 | $params = array_merge($params, $optParams);
|
---|
| 115 | return $this->call('listScriptProcesses', [$params], ListScriptProcessesResponse::class);
|
---|
| 116 | }
|
---|
| 117 | }
|
---|
| 118 |
|
---|
| 119 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 120 | class_alias(Processes::class, 'Google_Service_Script_Resource_Processes');
|
---|