source: vendor/google/apiclient-services/src/Eventarc/Resource/ProjectsLocationsPipelines.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 9.7 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\Eventarc\Resource;
19
20use Google\Service\Eventarc\GoogleLongrunningOperation;
21use Google\Service\Eventarc\ListPipelinesResponse;
22use Google\Service\Eventarc\Pipeline;
23use Google\Service\Eventarc\Policy;
24use Google\Service\Eventarc\SetIamPolicyRequest;
25use Google\Service\Eventarc\TestIamPermissionsRequest;
26use Google\Service\Eventarc\TestIamPermissionsResponse;
27
28/**
29 * The "pipelines" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $eventarcService = new Google\Service\Eventarc(...);
33 * $pipelines = $eventarcService->projects_locations_pipelines;
34 * </code>
35 */
36class ProjectsLocationsPipelines extends \Google\Service\Resource
37{
38 /**
39 * Create a new Pipeline in a particular project and location.
40 * (pipelines.create)
41 *
42 * @param string $parent Required. The parent collection in which to add this
43 * pipeline.
44 * @param Pipeline $postBody
45 * @param array $optParams Optional parameters.
46 *
47 * @opt_param string pipelineId Required. The user-provided ID to be assigned to
48 * the Pipeline.
49 * @opt_param bool validateOnly Optional. If set, validate the request and
50 * preview the review, but do not post it.
51 * @return GoogleLongrunningOperation
52 * @throws \Google\Service\Exception
53 */
54 public function create($parent, Pipeline $postBody, $optParams = [])
55 {
56 $params = ['parent' => $parent, 'postBody' => $postBody];
57 $params = array_merge($params, $optParams);
58 return $this->call('create', [$params], GoogleLongrunningOperation::class);
59 }
60 /**
61 * Delete a single pipeline. (pipelines.delete)
62 *
63 * @param string $name Required. The name of the Pipeline to be deleted.
64 * @param array $optParams Optional parameters.
65 *
66 * @opt_param bool allowMissing Optional. If set to true, and the Pipeline is
67 * not found, the request will succeed but no action will be taken on the
68 * server.
69 * @opt_param string etag Optional. If provided, the Pipeline will only be
70 * deleted if the etag matches the current etag on the resource.
71 * @opt_param bool validateOnly Optional. If set, validate the request and
72 * preview the review, but do not post it.
73 * @return GoogleLongrunningOperation
74 * @throws \Google\Service\Exception
75 */
76 public function delete($name, $optParams = [])
77 {
78 $params = ['name' => $name];
79 $params = array_merge($params, $optParams);
80 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
81 }
82 /**
83 * Get a single Pipeline. (pipelines.get)
84 *
85 * @param string $name Required. The name of the pipeline to get.
86 * @param array $optParams Optional parameters.
87 * @return Pipeline
88 * @throws \Google\Service\Exception
89 */
90 public function get($name, $optParams = [])
91 {
92 $params = ['name' => $name];
93 $params = array_merge($params, $optParams);
94 return $this->call('get', [$params], Pipeline::class);
95 }
96 /**
97 * Gets the access control policy for a resource. Returns an empty policy if the
98 * resource exists and does not have a policy set. (pipelines.getIamPolicy)
99 *
100 * @param string $resource REQUIRED: The resource for which the policy is being
101 * requested. See [Resource
102 * names](https://cloud.google.com/apis/design/resource_names) for the
103 * appropriate value for this field.
104 * @param array $optParams Optional parameters.
105 *
106 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
107 * version that will be used to format the policy. Valid values are 0, 1, and 3.
108 * Requests specifying an invalid value will be rejected. Requests for policies
109 * with any conditional role bindings must specify version 3. Policies with no
110 * conditional role bindings may specify any valid value or leave the field
111 * unset. The policy in the response might use the policy version that you
112 * specified, or it might use a lower policy version. For example, if you
113 * specify version 3, but the policy has no conditional role bindings, the
114 * response uses version 1. To learn which resources support conditions in their
115 * IAM policies, see the [IAM
116 * documentation](https://cloud.google.com/iam/help/conditions/resource-
117 * policies).
118 * @return Policy
119 * @throws \Google\Service\Exception
120 */
121 public function getIamPolicy($resource, $optParams = [])
122 {
123 $params = ['resource' => $resource];
124 $params = array_merge($params, $optParams);
125 return $this->call('getIamPolicy', [$params], Policy::class);
126 }
127 /**
128 * List pipelines. (pipelines.listProjectsLocationsPipelines)
129 *
130 * @param string $parent Required. The parent collection to list pipelines on.
131 * @param array $optParams Optional parameters.
132 *
133 * @opt_param string filter Optional. The filter field that the list request
134 * will filter on. Possible filters are described in https://google.aip.dev/160.
135 * @opt_param string orderBy Optional. The sorting order of the resources
136 * returned. Value should be a comma-separated list of fields. The default
137 * sorting order is ascending. To specify descending order for a field, append a
138 * `desc` suffix; for example: `name desc, update_time`.
139 * @opt_param int pageSize Optional. The maximum number of results to return on
140 * each page. Note: The service may send fewer.
141 * @opt_param string pageToken Optional. The page token; provide the value from
142 * the `next_page_token` field in a previous call to retrieve the subsequent
143 * page. When paginating, all other parameters provided must match the previous
144 * call that provided the page token.
145 * @return ListPipelinesResponse
146 * @throws \Google\Service\Exception
147 */
148 public function listProjectsLocationsPipelines($parent, $optParams = [])
149 {
150 $params = ['parent' => $parent];
151 $params = array_merge($params, $optParams);
152 return $this->call('list', [$params], ListPipelinesResponse::class);
153 }
154 /**
155 * Update a single pipeline. (pipelines.patch)
156 *
157 * @param string $name Identifier. The resource name of the Pipeline. Must be
158 * unique within the location of the project and must be in
159 * `projects/{project}/locations/{location}/pipelines/{pipeline}` format.
160 * @param Pipeline $postBody
161 * @param array $optParams Optional parameters.
162 *
163 * @opt_param bool allowMissing Optional. If set to true, and the Pipeline is
164 * not found, a new Pipeline will be created. In this situation, `update_mask`
165 * is ignored.
166 * @opt_param string updateMask Optional. The fields to be updated; only fields
167 * explicitly provided are updated. If no field mask is provided, all provided
168 * fields in the request are updated. To update all fields, provide a field mask
169 * of "*".
170 * @opt_param bool validateOnly Optional. If set, validate the request and
171 * preview the review, but do not post it.
172 * @return GoogleLongrunningOperation
173 * @throws \Google\Service\Exception
174 */
175 public function patch($name, Pipeline $postBody, $optParams = [])
176 {
177 $params = ['name' => $name, 'postBody' => $postBody];
178 $params = array_merge($params, $optParams);
179 return $this->call('patch', [$params], GoogleLongrunningOperation::class);
180 }
181 /**
182 * Sets the access control policy on the specified resource. Replaces any
183 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
184 * `PERMISSION_DENIED` errors. (pipelines.setIamPolicy)
185 *
186 * @param string $resource REQUIRED: The resource for which the policy is being
187 * specified. See [Resource
188 * names](https://cloud.google.com/apis/design/resource_names) for the
189 * appropriate value for this field.
190 * @param SetIamPolicyRequest $postBody
191 * @param array $optParams Optional parameters.
192 * @return Policy
193 * @throws \Google\Service\Exception
194 */
195 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
196 {
197 $params = ['resource' => $resource, 'postBody' => $postBody];
198 $params = array_merge($params, $optParams);
199 return $this->call('setIamPolicy', [$params], Policy::class);
200 }
201 /**
202 * Returns permissions that a caller has on the specified resource. If the
203 * resource does not exist, this will return an empty set of permissions, not a
204 * `NOT_FOUND` error. Note: This operation is designed to be used for building
205 * permission-aware UIs and command-line tools, not for authorization checking.
206 * This operation may "fail open" without warning.
207 * (pipelines.testIamPermissions)
208 *
209 * @param string $resource REQUIRED: The resource for which the policy detail is
210 * being requested. See [Resource
211 * names](https://cloud.google.com/apis/design/resource_names) for the
212 * appropriate value for this field.
213 * @param TestIamPermissionsRequest $postBody
214 * @param array $optParams Optional parameters.
215 * @return TestIamPermissionsResponse
216 * @throws \Google\Service\Exception
217 */
218 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
219 {
220 $params = ['resource' => $resource, 'postBody' => $postBody];
221 $params = array_merge($params, $optParams);
222 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
223 }
224}
225
226// Adding a class alias for backwards compatibility with the previous class name.
227class_alias(ProjectsLocationsPipelines::class, 'Google_Service_Eventarc_Resource_ProjectsLocationsPipelines');
Note: See TracBrowser for help on using the repository browser.