source: vendor/google/apiclient-services/src/Datapipelines/Resource/ProjectsLocationsPipelines.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 9.2 KB
Line 
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
18namespace Google\Service\Datapipelines\Resource;
19
20use Google\Service\Datapipelines\GoogleCloudDatapipelinesV1ListPipelinesResponse;
21use Google\Service\Datapipelines\GoogleCloudDatapipelinesV1Pipeline;
22use Google\Service\Datapipelines\GoogleCloudDatapipelinesV1RunPipelineRequest;
23use Google\Service\Datapipelines\GoogleCloudDatapipelinesV1RunPipelineResponse;
24use Google\Service\Datapipelines\GoogleCloudDatapipelinesV1StopPipelineRequest;
25use Google\Service\Datapipelines\GoogleProtobufEmpty;
26
27/**
28 * The "pipelines" collection of methods.
29 * Typical usage is:
30 * <code>
31 * $datapipelinesService = new Google\Service\Datapipelines(...);
32 * $pipelines = $datapipelinesService->projects_locations_pipelines;
33 * </code>
34 */
35class ProjectsLocationsPipelines extends \Google\Service\Resource
36{
37 /**
38 * Creates a pipeline. For a batch pipeline, you can pass scheduler information.
39 * Data Pipelines uses the scheduler information to create an internal scheduler
40 * that runs jobs periodically. If the internal scheduler is not configured, you
41 * can use RunPipeline to run jobs. (pipelines.create)
42 *
43 * @param string $parent Required. The location name. For example:
44 * `projects/PROJECT_ID/locations/LOCATION_ID`.
45 * @param GoogleCloudDatapipelinesV1Pipeline $postBody
46 * @param array $optParams Optional parameters.
47 * @return GoogleCloudDatapipelinesV1Pipeline
48 * @throws \Google\Service\Exception
49 */
50 public function create($parent, GoogleCloudDatapipelinesV1Pipeline $postBody, $optParams = [])
51 {
52 $params = ['parent' => $parent, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('create', [$params], GoogleCloudDatapipelinesV1Pipeline::class);
55 }
56 /**
57 * Deletes a pipeline. If a scheduler job is attached to the pipeline, it will
58 * be deleted. (pipelines.delete)
59 *
60 * @param string $name Required. The pipeline name. For example:
61 * `projects/PROJECT_ID/locations/LOCATION_ID/pipelines/PIPELINE_ID`.
62 * @param array $optParams Optional parameters.
63 * @return GoogleProtobufEmpty
64 * @throws \Google\Service\Exception
65 */
66 public function delete($name, $optParams = [])
67 {
68 $params = ['name' => $name];
69 $params = array_merge($params, $optParams);
70 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
71 }
72 /**
73 * Looks up a single pipeline. Returns a "NOT_FOUND" error if no such pipeline
74 * exists. Returns a "FORBIDDEN" error if the caller doesn't have permission to
75 * access it. (pipelines.get)
76 *
77 * @param string $name Required. The pipeline name. For example:
78 * `projects/PROJECT_ID/locations/LOCATION_ID/pipelines/PIPELINE_ID`.
79 * @param array $optParams Optional parameters.
80 * @return GoogleCloudDatapipelinesV1Pipeline
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], GoogleCloudDatapipelinesV1Pipeline::class);
88 }
89 /**
90 * Lists pipelines. Returns a "FORBIDDEN" error if the caller doesn't have
91 * permission to access it. (pipelines.listProjectsLocationsPipelines)
92 *
93 * @param string $parent Required. The location name. For example:
94 * `projects/PROJECT_ID/locations/LOCATION_ID`.
95 * @param array $optParams Optional parameters.
96 *
97 * @opt_param string filter An expression for filtering the results of the
98 * request. If unspecified, all pipelines will be returned. Multiple filters can
99 * be applied and must be comma separated. Fields eligible for filtering are: +
100 * `type`: The type of the pipeline (streaming or batch). Allowed values are
101 * `ALL`, `BATCH`, and `STREAMING`. + `status`: The activity status of the
102 * pipeline. Allowed values are `ALL`, `ACTIVE`, `ARCHIVED`, and `PAUSED`. For
103 * example, to limit results to active batch processing pipelines:
104 * type:BATCH,status:ACTIVE
105 * @opt_param int pageSize The maximum number of entities to return. The service
106 * may return fewer than this value, even if there are additional pages. If
107 * unspecified, the max limit is yet to be determined by the backend
108 * implementation.
109 * @opt_param string pageToken A page token, received from a previous
110 * `ListPipelines` call. Provide this to retrieve the subsequent page. When
111 * paginating, all other parameters provided to `ListPipelines` must match the
112 * call that provided the page token.
113 * @return GoogleCloudDatapipelinesV1ListPipelinesResponse
114 * @throws \Google\Service\Exception
115 */
116 public function listProjectsLocationsPipelines($parent, $optParams = [])
117 {
118 $params = ['parent' => $parent];
119 $params = array_merge($params, $optParams);
120 return $this->call('list', [$params], GoogleCloudDatapipelinesV1ListPipelinesResponse::class);
121 }
122 /**
123 * Updates a pipeline. If successful, the updated Pipeline is returned. Returns
124 * `NOT_FOUND` if the pipeline doesn't exist. If UpdatePipeline does not return
125 * successfully, you can retry the UpdatePipeline request until you receive a
126 * successful response. (pipelines.patch)
127 *
128 * @param string $name The pipeline name. For example:
129 * `projects/PROJECT_ID/locations/LOCATION_ID/pipelines/PIPELINE_ID`. *
130 * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-),
131 * colons (:), and periods (.). For more information, see [Identifying
132 * projects](https://cloud.google.com/resource-manager/docs/creating-managing-
133 * projects#identifying_projects). * `LOCATION_ID` is the canonical ID for the
134 * pipeline's location. The list of available locations can be obtained by
135 * calling `google.cloud.location.Locations.ListLocations`. Note that the Data
136 * Pipelines service is not available in all regions. It depends on Cloud
137 * Scheduler, an App Engine application, so it's only available in [App Engine
138 * regions](https://cloud.google.com/about/locations#region). * `PIPELINE_ID` is
139 * the ID of the pipeline. Must be unique for the selected project and location.
140 * @param GoogleCloudDatapipelinesV1Pipeline $postBody
141 * @param array $optParams Optional parameters.
142 *
143 * @opt_param string updateMask The list of fields to be updated.
144 * @return GoogleCloudDatapipelinesV1Pipeline
145 * @throws \Google\Service\Exception
146 */
147 public function patch($name, GoogleCloudDatapipelinesV1Pipeline $postBody, $optParams = [])
148 {
149 $params = ['name' => $name, 'postBody' => $postBody];
150 $params = array_merge($params, $optParams);
151 return $this->call('patch', [$params], GoogleCloudDatapipelinesV1Pipeline::class);
152 }
153 /**
154 * Creates a job for the specified pipeline directly. You can use this method
155 * when the internal scheduler is not configured and you want to trigger the job
156 * directly or through an external system. Returns a "NOT_FOUND" error if the
157 * pipeline doesn't exist. Returns a "FORBIDDEN" error if the user doesn't have
158 * permission to access the pipeline or run jobs for the pipeline.
159 * (pipelines.run)
160 *
161 * @param string $name Required. The pipeline name. For example:
162 * `projects/PROJECT_ID/locations/LOCATION_ID/pipelines/PIPELINE_ID`.
163 * @param GoogleCloudDatapipelinesV1RunPipelineRequest $postBody
164 * @param array $optParams Optional parameters.
165 * @return GoogleCloudDatapipelinesV1RunPipelineResponse
166 * @throws \Google\Service\Exception
167 */
168 public function run($name, GoogleCloudDatapipelinesV1RunPipelineRequest $postBody, $optParams = [])
169 {
170 $params = ['name' => $name, 'postBody' => $postBody];
171 $params = array_merge($params, $optParams);
172 return $this->call('run', [$params], GoogleCloudDatapipelinesV1RunPipelineResponse::class);
173 }
174 /**
175 * Freezes pipeline execution permanently. If there's a corresponding scheduler
176 * entry, it's deleted, and the pipeline state is changed to "ARCHIVED".
177 * However, pipeline metadata is retained. (pipelines.stop)
178 *
179 * @param string $name Required. The pipeline name. For example:
180 * `projects/PROJECT_ID/locations/LOCATION_ID/pipelines/PIPELINE_ID`.
181 * @param GoogleCloudDatapipelinesV1StopPipelineRequest $postBody
182 * @param array $optParams Optional parameters.
183 * @return GoogleCloudDatapipelinesV1Pipeline
184 * @throws \Google\Service\Exception
185 */
186 public function stop($name, GoogleCloudDatapipelinesV1StopPipelineRequest $postBody, $optParams = [])
187 {
188 $params = ['name' => $name, 'postBody' => $postBody];
189 $params = array_merge($params, $optParams);
190 return $this->call('stop', [$params], GoogleCloudDatapipelinesV1Pipeline::class);
191 }
192}
193
194// Adding a class alias for backwards compatibility with the previous class name.
195class_alias(ProjectsLocationsPipelines::class, 'Google_Service_Datapipelines_Resource_ProjectsLocationsPipelines');
Note: See TracBrowser for help on using the repository browser.