[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\Integrations\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaCancelExecutionRequest;
|
---|
| 21 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaCancelExecutionResponse;
|
---|
| 22 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaDownloadExecutionResponse;
|
---|
| 23 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaExecution;
|
---|
| 24 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaListExecutionsResponse;
|
---|
| 25 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaReplayExecutionRequest;
|
---|
| 26 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaReplayExecutionResponse;
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * The "executions" collection of methods.
|
---|
| 30 | * Typical usage is:
|
---|
| 31 | * <code>
|
---|
| 32 | * $integrationsService = new Google\Service\Integrations(...);
|
---|
| 33 | * $executions = $integrationsService->projects_locations_integrations_executions;
|
---|
| 34 | * </code>
|
---|
| 35 | */
|
---|
| 36 | class ProjectsLocationsIntegrationsExecutions extends \Google\Service\Resource
|
---|
| 37 | {
|
---|
| 38 | /**
|
---|
| 39 | * Cancellation of an execution and associated sub-executions. This will not
|
---|
| 40 | * cancel an IN_PROCESS or completed(SUCCESSFUL, FAILED or CANCELLED)
|
---|
| 41 | * executions. (executions.cancel)
|
---|
| 42 | *
|
---|
| 43 | * @param string $name Required. The execution resource name. Format: projects/{
|
---|
| 44 | * gcp_project_id}/locations/{location}/products/{product}/integrations/{integra
|
---|
| 45 | * tion_id}/executions/{execution_id}
|
---|
| 46 | * @param GoogleCloudIntegrationsV1alphaCancelExecutionRequest $postBody
|
---|
| 47 | * @param array $optParams Optional parameters.
|
---|
| 48 | * @return GoogleCloudIntegrationsV1alphaCancelExecutionResponse
|
---|
| 49 | * @throws \Google\Service\Exception
|
---|
| 50 | */
|
---|
| 51 | public function cancel($name, GoogleCloudIntegrationsV1alphaCancelExecutionRequest $postBody, $optParams = [])
|
---|
| 52 | {
|
---|
| 53 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 54 | $params = array_merge($params, $optParams);
|
---|
| 55 | return $this->call('cancel', [$params], GoogleCloudIntegrationsV1alphaCancelExecutionResponse::class);
|
---|
| 56 | }
|
---|
| 57 | /**
|
---|
| 58 | * Download the execution. (executions.download)
|
---|
| 59 | *
|
---|
| 60 | * @param string $name Required. The execution resource name. Format: projects/{
|
---|
| 61 | * gcp_project_id}/locations/{location}/products/{product}/integrations/{integra
|
---|
| 62 | * tion_id}/executions/{execution_id}
|
---|
| 63 | * @param array $optParams Optional parameters.
|
---|
| 64 | * @return GoogleCloudIntegrationsV1alphaDownloadExecutionResponse
|
---|
| 65 | * @throws \Google\Service\Exception
|
---|
| 66 | */
|
---|
| 67 | public function download($name, $optParams = [])
|
---|
| 68 | {
|
---|
| 69 | $params = ['name' => $name];
|
---|
| 70 | $params = array_merge($params, $optParams);
|
---|
| 71 | return $this->call('download', [$params], GoogleCloudIntegrationsV1alphaDownloadExecutionResponse::class);
|
---|
| 72 | }
|
---|
| 73 | /**
|
---|
| 74 | * Get an execution in the specified project. (executions.get)
|
---|
| 75 | *
|
---|
| 76 | * @param string $name Required. The execution resource name. Format: projects/{
|
---|
| 77 | * gcp_project_id}/locations/{location}/products/{product}/integrations/{integra
|
---|
| 78 | * tion_id}/executions/{execution_id}
|
---|
| 79 | * @param array $optParams Optional parameters.
|
---|
| 80 | * @return GoogleCloudIntegrationsV1alphaExecution
|
---|
| 81 | * @throws \Google\Service\Exception
|
---|
| 82 | */
|
---|
| 83 | public function get($name, $optParams = [])
|
---|
| 84 | {
|
---|
| 85 | $params = ['name' => $name];
|
---|
| 86 | $params = array_merge($params, $optParams);
|
---|
| 87 | return $this->call('get', [$params], GoogleCloudIntegrationsV1alphaExecution::class);
|
---|
| 88 | }
|
---|
| 89 | /**
|
---|
| 90 | * Lists the results of all the integration executions. The response includes
|
---|
| 91 | * the same information as the [execution
|
---|
| 92 | * log](https://cloud.google.com/application-integration/docs/viewing-logs) in
|
---|
| 93 | * the Integration UI. (executions.listProjectsLocationsIntegrationsExecutions)
|
---|
| 94 | *
|
---|
| 95 | * @param string $parent Required. The parent resource name of the integration
|
---|
| 96 | * execution.
|
---|
| 97 | * @param array $optParams Optional parameters.
|
---|
| 98 | *
|
---|
| 99 | * @opt_param string filter Optional. Standard filter field, we support
|
---|
| 100 | * filtering on following fields: workflow_name: the name of the integration.
|
---|
| 101 | * CreateTimestamp: the execution created time. event_execution_state: the state
|
---|
| 102 | * of the executions. execution_id: the id of the execution. trigger_id: the id
|
---|
| 103 | * of the trigger. parameter_type: the type of the parameters involved in the
|
---|
| 104 | * execution. All fields support for EQUALS, in additional: CreateTimestamp
|
---|
| 105 | * support for LESS_THAN, GREATER_THAN ParameterType support for HAS For
|
---|
| 106 | * example: "parameter_type" HAS \"string\" Also supports operators like AND,
|
---|
| 107 | * OR, NOT For example, trigger_id=\"id1\" AND workflow_name=\"testWorkflow\"
|
---|
| 108 | * @opt_param string filterParams.customFilter Optional user-provided custom
|
---|
| 109 | * filter.
|
---|
| 110 | * @opt_param string filterParams.endTime End timestamp.
|
---|
| 111 | * @opt_param string filterParams.eventStatuses List of possible event statuses.
|
---|
| 112 | * @opt_param string filterParams.executionId Execution id.
|
---|
| 113 | * @opt_param string filterParams.parameterKey Param key. DEPRECATED. User
|
---|
| 114 | * parameter_pair_key instead.
|
---|
| 115 | * @opt_param string filterParams.parameterPairKey Param key in the key value
|
---|
| 116 | * pair filter.
|
---|
| 117 | * @opt_param string filterParams.parameterPairValue Param value in the key
|
---|
| 118 | * value pair filter.
|
---|
| 119 | * @opt_param string filterParams.parameterType Param type.
|
---|
| 120 | * @opt_param string filterParams.parameterValue Param value. DEPRECATED. User
|
---|
| 121 | * parameter_pair_value instead.
|
---|
| 122 | * @opt_param string filterParams.startTime Start timestamp.
|
---|
| 123 | * @opt_param string filterParams.taskStatuses List of possible task statuses.
|
---|
| 124 | * @opt_param string filterParams.workflowName Workflow name.
|
---|
| 125 | * @opt_param string orderBy Optional. The results would be returned in order
|
---|
| 126 | * you specified here. Currently supporting "create_time".
|
---|
| 127 | * @opt_param int pageSize Optional. The size of entries in the response.
|
---|
| 128 | * @opt_param string pageToken Optional. The token returned in the previous
|
---|
| 129 | * response.
|
---|
| 130 | * @opt_param string readMask Optional. View mask for the response data. If set,
|
---|
| 131 | * only the field specified will be returned as part of the result. If not set,
|
---|
| 132 | * all fields in Execution will be filled and returned. Supported fields:
|
---|
| 133 | * trigger_id execution_method create_time update_time execution_details
|
---|
| 134 | * execution_details.state execution_details.execution_snapshots
|
---|
| 135 | * execution_details.attempt_stats
|
---|
| 136 | * execution_details.event_execution_snapshots_size request_parameters
|
---|
| 137 | * cloud_logging_details snapshot_number replay_info
|
---|
| 138 | * @opt_param bool refreshAcl Optional. If true, the service will use the most
|
---|
| 139 | * recent acl information to list event execution infos and renew the acl cache.
|
---|
| 140 | * Note that fetching the most recent acl is synchronous, so it will increase
|
---|
| 141 | * RPC call latency.
|
---|
| 142 | * @opt_param bool snapshotMetadataWithoutParams Optional. If true, the service
|
---|
| 143 | * will provide execution info with snapshot metadata only i.e. without event
|
---|
| 144 | * parameters.
|
---|
| 145 | * @opt_param bool truncateParams Optional. If true, the service will truncate
|
---|
| 146 | * the params to only keep the first 1000 characters of string params and empty
|
---|
| 147 | * the executions in order to make response smaller. Only works for UI and when
|
---|
| 148 | * the params fields are not filtered out.
|
---|
| 149 | * @return GoogleCloudIntegrationsV1alphaListExecutionsResponse
|
---|
| 150 | * @throws \Google\Service\Exception
|
---|
| 151 | */
|
---|
| 152 | public function listProjectsLocationsIntegrationsExecutions($parent, $optParams = [])
|
---|
| 153 | {
|
---|
| 154 | $params = ['parent' => $parent];
|
---|
| 155 | $params = array_merge($params, $optParams);
|
---|
| 156 | return $this->call('list', [$params], GoogleCloudIntegrationsV1alphaListExecutionsResponse::class);
|
---|
| 157 | }
|
---|
| 158 | /**
|
---|
| 159 | * Re-execute an existing execution, with same request parameters and execution
|
---|
| 160 | * strategy. (executions.replay)
|
---|
| 161 | *
|
---|
| 162 | * @param string $name Required. Next ID: 5 The execution resource name. Format:
|
---|
| 163 | * projects/{gcp_project_id}/locations/{location}/integrations/{integration}/exe
|
---|
| 164 | * cutions/{execution_id}
|
---|
| 165 | * @param GoogleCloudIntegrationsV1alphaReplayExecutionRequest $postBody
|
---|
| 166 | * @param array $optParams Optional parameters.
|
---|
| 167 | * @return GoogleCloudIntegrationsV1alphaReplayExecutionResponse
|
---|
| 168 | * @throws \Google\Service\Exception
|
---|
| 169 | */
|
---|
| 170 | public function replay($name, GoogleCloudIntegrationsV1alphaReplayExecutionRequest $postBody, $optParams = [])
|
---|
| 171 | {
|
---|
| 172 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 173 | $params = array_merge($params, $optParams);
|
---|
| 174 | return $this->call('replay', [$params], GoogleCloudIntegrationsV1alphaReplayExecutionResponse::class);
|
---|
| 175 | }
|
---|
| 176 | }
|
---|
| 177 |
|
---|
| 178 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 179 | class_alias(ProjectsLocationsIntegrationsExecutions::class, 'Google_Service_Integrations_Resource_ProjectsLocationsIntegrationsExecutions');
|
---|