source: vendor/google/apiclient-services/src/CloudDeploy/Resource/ProjectsLocationsDeliveryPipelines.php

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

Upload project files

  • Property mode set to 100644
File size: 14.0 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\CloudDeploy\Resource;
19
20use Google\Service\CloudDeploy\DeliveryPipeline;
21use Google\Service\CloudDeploy\ListDeliveryPipelinesResponse;
22use Google\Service\CloudDeploy\Operation;
23use Google\Service\CloudDeploy\Policy;
24use Google\Service\CloudDeploy\RollbackTargetRequest;
25use Google\Service\CloudDeploy\RollbackTargetResponse;
26use Google\Service\CloudDeploy\SetIamPolicyRequest;
27use Google\Service\CloudDeploy\TestIamPermissionsRequest;
28use Google\Service\CloudDeploy\TestIamPermissionsResponse;
29
30/**
31 * The "deliveryPipelines" collection of methods.
32 * Typical usage is:
33 * <code>
34 * $clouddeployService = new Google\Service\CloudDeploy(...);
35 * $deliveryPipelines = $clouddeployService->projects_locations_deliveryPipelines;
36 * </code>
37 */
38class ProjectsLocationsDeliveryPipelines extends \Google\Service\Resource
39{
40 /**
41 * Creates a new DeliveryPipeline in a given project and location.
42 * (deliveryPipelines.create)
43 *
44 * @param string $parent Required. The parent collection in which the
45 * `DeliveryPipeline` must be created. The format is
46 * `projects/{project_id}/locations/{location_name}`.
47 * @param DeliveryPipeline $postBody
48 * @param array $optParams Optional parameters.
49 *
50 * @opt_param string deliveryPipelineId Required. ID of the `DeliveryPipeline`.
51 * @opt_param string requestId Optional. A request ID to identify requests.
52 * Specify a unique request ID so that if you must retry your request, the
53 * server knows to ignore the request if it has already been completed. The
54 * server guarantees that for at least 60 minutes after the first request. For
55 * example, consider a situation where you make an initial request and the
56 * request times out. If you make the request again with the same request ID,
57 * the server can check if original operation with the same request ID was
58 * received, and if so, will ignore the second request. This prevents clients
59 * from accidentally creating duplicate commitments. The request ID must be a
60 * valid UUID with the exception that zero UUID is not supported
61 * (00000000-0000-0000-0000-000000000000).
62 * @opt_param bool validateOnly Optional. If set to true, the request is
63 * validated and the user is provided with an expected result, but no actual
64 * change is made.
65 * @return Operation
66 * @throws \Google\Service\Exception
67 */
68 public function create($parent, DeliveryPipeline $postBody, $optParams = [])
69 {
70 $params = ['parent' => $parent, 'postBody' => $postBody];
71 $params = array_merge($params, $optParams);
72 return $this->call('create', [$params], Operation::class);
73 }
74 /**
75 * Deletes a single DeliveryPipeline. (deliveryPipelines.delete)
76 *
77 * @param string $name Required. The name of the `DeliveryPipeline` to delete.
78 * The format is `projects/{project_id}/locations/{location_name}/deliveryPipeli
79 * nes/{pipeline_name}`.
80 * @param array $optParams Optional parameters.
81 *
82 * @opt_param bool allowMissing Optional. If set to true, then deleting an
83 * already deleted or non-existing `DeliveryPipeline` will succeed.
84 * @opt_param string etag Optional. This checksum is computed by the server
85 * based on the value of other fields, and may be sent on update and delete
86 * requests to ensure the client has an up-to-date value before proceeding.
87 * @opt_param bool force Optional. If set to true, all child resources under
88 * this pipeline will also be deleted. Otherwise, the request will only work if
89 * the pipeline has no child resources.
90 * @opt_param string requestId Optional. A request ID to identify requests.
91 * Specify a unique request ID so that if you must retry your request, the
92 * server knows to ignore the request if it has already been completed. The
93 * server guarantees that for at least 60 minutes after the first request. For
94 * example, consider a situation where you make an initial request and the
95 * request times out. If you make the request again with the same request ID,
96 * the server can check if original operation with the same request ID was
97 * received, and if so, will ignore the second request. This prevents clients
98 * from accidentally creating duplicate commitments. The request ID must be a
99 * valid UUID with the exception that zero UUID is not supported
100 * (00000000-0000-0000-0000-000000000000).
101 * @opt_param bool validateOnly Optional. If set, validate the request and
102 * preview the review, but do not actually post it.
103 * @return Operation
104 * @throws \Google\Service\Exception
105 */
106 public function delete($name, $optParams = [])
107 {
108 $params = ['name' => $name];
109 $params = array_merge($params, $optParams);
110 return $this->call('delete', [$params], Operation::class);
111 }
112 /**
113 * Gets details of a single DeliveryPipeline. (deliveryPipelines.get)
114 *
115 * @param string $name Required. Name of the `DeliveryPipeline`. Format must be
116 * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_
117 * name}`.
118 * @param array $optParams Optional parameters.
119 * @return DeliveryPipeline
120 * @throws \Google\Service\Exception
121 */
122 public function get($name, $optParams = [])
123 {
124 $params = ['name' => $name];
125 $params = array_merge($params, $optParams);
126 return $this->call('get', [$params], DeliveryPipeline::class);
127 }
128 /**
129 * Gets the access control policy for a resource. Returns an empty policy if the
130 * resource exists and does not have a policy set.
131 * (deliveryPipelines.getIamPolicy)
132 *
133 * @param string $resource REQUIRED: The resource for which the policy is being
134 * requested. See [Resource
135 * names](https://cloud.google.com/apis/design/resource_names) for the
136 * appropriate value for this field.
137 * @param array $optParams Optional parameters.
138 *
139 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
140 * version that will be used to format the policy. Valid values are 0, 1, and 3.
141 * Requests specifying an invalid value will be rejected. Requests for policies
142 * with any conditional role bindings must specify version 3. Policies with no
143 * conditional role bindings may specify any valid value or leave the field
144 * unset. The policy in the response might use the policy version that you
145 * specified, or it might use a lower policy version. For example, if you
146 * specify version 3, but the policy has no conditional role bindings, the
147 * response uses version 1. To learn which resources support conditions in their
148 * IAM policies, see the [IAM
149 * documentation](https://cloud.google.com/iam/help/conditions/resource-
150 * policies).
151 * @return Policy
152 * @throws \Google\Service\Exception
153 */
154 public function getIamPolicy($resource, $optParams = [])
155 {
156 $params = ['resource' => $resource];
157 $params = array_merge($params, $optParams);
158 return $this->call('getIamPolicy', [$params], Policy::class);
159 }
160 /**
161 * Lists DeliveryPipelines in a given project and location.
162 * (deliveryPipelines.listProjectsLocationsDeliveryPipelines)
163 *
164 * @param string $parent Required. The parent, which owns this collection of
165 * pipelines. Format must be `projects/{project_id}/locations/{location_name}`.
166 * @param array $optParams Optional parameters.
167 *
168 * @opt_param string filter Filter pipelines to be returned. See
169 * https://google.aip.dev/160 for more details.
170 * @opt_param string orderBy Field to sort by. See
171 * https://google.aip.dev/132#ordering for more details.
172 * @opt_param int pageSize The maximum number of pipelines to return. The
173 * service may return fewer than this value. If unspecified, at most 50
174 * pipelines will be returned. The maximum value is 1000; values above 1000 will
175 * be set to 1000.
176 * @opt_param string pageToken A page token, received from a previous
177 * `ListDeliveryPipelines` call. Provide this to retrieve the subsequent page.
178 * When paginating, all other provided parameters match the call that provided
179 * the page token.
180 * @return ListDeliveryPipelinesResponse
181 * @throws \Google\Service\Exception
182 */
183 public function listProjectsLocationsDeliveryPipelines($parent, $optParams = [])
184 {
185 $params = ['parent' => $parent];
186 $params = array_merge($params, $optParams);
187 return $this->call('list', [$params], ListDeliveryPipelinesResponse::class);
188 }
189 /**
190 * Updates the parameters of a single DeliveryPipeline.
191 * (deliveryPipelines.patch)
192 *
193 * @param string $name Optional. Name of the `DeliveryPipeline`. Format is `proj
194 * ects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}`.
195 * The `deliveryPipeline` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`
196 * @param DeliveryPipeline $postBody
197 * @param array $optParams Optional parameters.
198 *
199 * @opt_param bool allowMissing Optional. If set to true, updating a
200 * `DeliveryPipeline` that does not exist will result in the creation of a new
201 * `DeliveryPipeline`.
202 * @opt_param string requestId Optional. A request ID to identify requests.
203 * Specify a unique request ID so that if you must retry your request, the
204 * server knows to ignore the request if it has already been completed. The
205 * server guarantees that for at least 60 minutes after the first request. For
206 * example, consider a situation where you make an initial request and the
207 * request times out. If you make the request again with the same request ID,
208 * the server can check if original operation with the same request ID was
209 * received, and if so, will ignore the second request. This prevents clients
210 * from accidentally creating duplicate commitments. The request ID must be a
211 * valid UUID with the exception that zero UUID is not supported
212 * (00000000-0000-0000-0000-000000000000).
213 * @opt_param string updateMask Required. Field mask is used to specify the
214 * fields to be overwritten by the update in the `DeliveryPipeline` resource.
215 * The fields specified in the update_mask are relative to the resource, not the
216 * full request. A field will be overwritten if it's in the mask. If the user
217 * doesn't provide a mask then all fields are overwritten.
218 * @opt_param bool validateOnly Optional. If set to true, the request is
219 * validated and the user is provided with an expected result, but no actual
220 * change is made.
221 * @return Operation
222 * @throws \Google\Service\Exception
223 */
224 public function patch($name, DeliveryPipeline $postBody, $optParams = [])
225 {
226 $params = ['name' => $name, 'postBody' => $postBody];
227 $params = array_merge($params, $optParams);
228 return $this->call('patch', [$params], Operation::class);
229 }
230 /**
231 * Creates a `Rollout` to roll back the specified target.
232 * (deliveryPipelines.rollbackTarget)
233 *
234 * @param string $name Required. The `DeliveryPipeline` for which the rollback
235 * `Rollout` must be created. The format is `projects/{project_id}/locations/{lo
236 * cation_name}/deliveryPipelines/{pipeline_name}`.
237 * @param RollbackTargetRequest $postBody
238 * @param array $optParams Optional parameters.
239 * @return RollbackTargetResponse
240 * @throws \Google\Service\Exception
241 */
242 public function rollbackTarget($name, RollbackTargetRequest $postBody, $optParams = [])
243 {
244 $params = ['name' => $name, 'postBody' => $postBody];
245 $params = array_merge($params, $optParams);
246 return $this->call('rollbackTarget', [$params], RollbackTargetResponse::class);
247 }
248 /**
249 * Sets the access control policy on the specified resource. Replaces any
250 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
251 * `PERMISSION_DENIED` errors. (deliveryPipelines.setIamPolicy)
252 *
253 * @param string $resource REQUIRED: The resource for which the policy is being
254 * specified. See [Resource
255 * names](https://cloud.google.com/apis/design/resource_names) for the
256 * appropriate value for this field.
257 * @param SetIamPolicyRequest $postBody
258 * @param array $optParams Optional parameters.
259 * @return Policy
260 * @throws \Google\Service\Exception
261 */
262 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
263 {
264 $params = ['resource' => $resource, 'postBody' => $postBody];
265 $params = array_merge($params, $optParams);
266 return $this->call('setIamPolicy', [$params], Policy::class);
267 }
268 /**
269 * Returns permissions that a caller has on the specified resource. If the
270 * resource does not exist, this will return an empty set of permissions, not a
271 * `NOT_FOUND` error. Note: This operation is designed to be used for building
272 * permission-aware UIs and command-line tools, not for authorization checking.
273 * This operation may "fail open" without warning.
274 * (deliveryPipelines.testIamPermissions)
275 *
276 * @param string $resource REQUIRED: The resource for which the policy detail is
277 * being requested. See [Resource
278 * names](https://cloud.google.com/apis/design/resource_names) for the
279 * appropriate value for this field.
280 * @param TestIamPermissionsRequest $postBody
281 * @param array $optParams Optional parameters.
282 * @return TestIamPermissionsResponse
283 * @throws \Google\Service\Exception
284 */
285 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
286 {
287 $params = ['resource' => $resource, 'postBody' => $postBody];
288 $params = array_merge($params, $optParams);
289 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
290 }
291}
292
293// Adding a class alias for backwards compatibility with the previous class name.
294class_alias(ProjectsLocationsDeliveryPipelines::class, 'Google_Service_CloudDeploy_Resource_ProjectsLocationsDeliveryPipelines');
Note: See TracBrowser for help on using the repository browser.