source: vendor/google/apiclient-services/src/CloudDeploy/Resource/ProjectsLocationsDeliveryPipelinesAutomations.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\CloudDeploy\Resource;
19
20use Google\Service\CloudDeploy\Automation;
21use Google\Service\CloudDeploy\ListAutomationsResponse;
22use Google\Service\CloudDeploy\Operation;
23
24/**
25 * The "automations" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $clouddeployService = new Google\Service\CloudDeploy(...);
29 * $automations = $clouddeployService->projects_locations_deliveryPipelines_automations;
30 * </code>
31 */
32class ProjectsLocationsDeliveryPipelinesAutomations extends \Google\Service\Resource
33{
34 /**
35 * Creates a new Automation in a given project and location.
36 * (automations.create)
37 *
38 * @param string $parent Required. The parent collection in which the
39 * `Automation` must be created. The format is `projects/{project_id}/locations/
40 * {location_name}/deliveryPipelines/{pipeline_name}`.
41 * @param Automation $postBody
42 * @param array $optParams Optional parameters.
43 *
44 * @opt_param string automationId Required. ID of the `Automation`.
45 * @opt_param string requestId Optional. A request ID to identify requests.
46 * Specify a unique request ID so that if you must retry your request, the
47 * server knows to ignore the request if it has already been completed. The
48 * server guarantees that for at least 60 minutes after the first request. For
49 * example, consider a situation where you make an initial request and the
50 * request times out. If you make the request again with the same request ID,
51 * the server can check if original operation with the same request ID was
52 * received, and if so, will ignore the second request. This prevents clients
53 * from accidentally creating duplicate commitments. The request ID must be a
54 * valid UUID with the exception that zero UUID is not supported
55 * (00000000-0000-0000-0000-000000000000).
56 * @opt_param bool validateOnly Optional. If set to true, the request is
57 * validated and the user is provided with an expected result, but no actual
58 * change is made.
59 * @return Operation
60 * @throws \Google\Service\Exception
61 */
62 public function create($parent, Automation $postBody, $optParams = [])
63 {
64 $params = ['parent' => $parent, 'postBody' => $postBody];
65 $params = array_merge($params, $optParams);
66 return $this->call('create', [$params], Operation::class);
67 }
68 /**
69 * Deletes a single Automation resource. (automations.delete)
70 *
71 * @param string $name Required. The name of the `Automation` to delete. The
72 * format is `projects/{project_id}/locations/{location_name}/deliveryPipelines/
73 * {pipeline_name}/automations/{automation_name}`.
74 * @param array $optParams Optional parameters.
75 *
76 * @opt_param bool allowMissing Optional. If set to true, then deleting an
77 * already deleted or non-existing `Automation` will succeed.
78 * @opt_param string etag Optional. The weak etag of the request. This checksum
79 * is computed by the server based on the value of other fields, and may be sent
80 * on update and delete requests to ensure the client has an up-to-date value
81 * before proceeding.
82 * @opt_param string requestId Optional. A request ID to identify requests.
83 * Specify a unique request ID so that if you must retry your request, the
84 * server knows to ignore the request if it has already been completed. The
85 * server guarantees that for at least 60 minutes after the first request. For
86 * example, consider a situation where you make an initial request and the
87 * request times out. If you make the request again with the same request ID,
88 * the server can check if original operation with the same request ID was
89 * received, and if so, will ignore the second request. This prevents clients
90 * from accidentally creating duplicate commitments. The request ID must be a
91 * valid UUID with the exception that zero UUID is not supported
92 * (00000000-0000-0000-0000-000000000000).
93 * @opt_param bool validateOnly Optional. If set, validate the request and
94 * verify whether the resource exists, but do not actually post it.
95 * @return Operation
96 * @throws \Google\Service\Exception
97 */
98 public function delete($name, $optParams = [])
99 {
100 $params = ['name' => $name];
101 $params = array_merge($params, $optParams);
102 return $this->call('delete', [$params], Operation::class);
103 }
104 /**
105 * Gets details of a single Automation. (automations.get)
106 *
107 * @param string $name Required. Name of the `Automation`. Format must be `proje
108 * cts/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/
109 * automations/{automation_name}`.
110 * @param array $optParams Optional parameters.
111 * @return Automation
112 * @throws \Google\Service\Exception
113 */
114 public function get($name, $optParams = [])
115 {
116 $params = ['name' => $name];
117 $params = array_merge($params, $optParams);
118 return $this->call('get', [$params], Automation::class);
119 }
120 /**
121 * Lists Automations in a given project and location.
122 * (automations.listProjectsLocationsDeliveryPipelinesAutomations)
123 *
124 * @param string $parent Required. The parent `Delivery Pipeline`, which owns
125 * this collection of automations. Format must be `projects/{project_id}/locatio
126 * ns/{location_name}/deliveryPipelines/{pipeline_name}`.
127 * @param array $optParams Optional parameters.
128 *
129 * @opt_param string filter Filter automations to be returned. All fields can be
130 * used in the filter.
131 * @opt_param string orderBy Field to sort by.
132 * @opt_param int pageSize The maximum number of automations to return. The
133 * service may return fewer than this value. If unspecified, at most 50
134 * automations will be returned. The maximum value is 1000; values above 1000
135 * will be set to 1000.
136 * @opt_param string pageToken A page token, received from a previous
137 * `ListAutomations` call. Provide this to retrieve the subsequent page. When
138 * paginating, all other provided parameters match the call that provided the
139 * page token.
140 * @return ListAutomationsResponse
141 * @throws \Google\Service\Exception
142 */
143 public function listProjectsLocationsDeliveryPipelinesAutomations($parent, $optParams = [])
144 {
145 $params = ['parent' => $parent];
146 $params = array_merge($params, $optParams);
147 return $this->call('list', [$params], ListAutomationsResponse::class);
148 }
149 /**
150 * Updates the parameters of a single Automation resource. (automations.patch)
151 *
152 * @param string $name Output only. Name of the `Automation`. Format is `project
153 * s/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automa
154 * tions/{automation}`.
155 * @param Automation $postBody
156 * @param array $optParams Optional parameters.
157 *
158 * @opt_param bool allowMissing Optional. If set to true, updating a
159 * `Automation` that does not exist will result in the creation of a new
160 * `Automation`.
161 * @opt_param string requestId Optional. A request ID to identify requests.
162 * Specify a unique request ID so that if you must retry your request, the
163 * server knows to ignore the request if it has already been completed. The
164 * server guarantees that for at least 60 minutes after the first request. For
165 * example, consider a situation where you make an initial request and the
166 * request times out. If you make the request again with the same request ID,
167 * the server can check if original operation with the same request ID was
168 * received, and if so, will ignore the second request. This prevents clients
169 * from accidentally creating duplicate commitments. The request ID must be a
170 * valid UUID with the exception that zero UUID is not supported
171 * (00000000-0000-0000-0000-000000000000).
172 * @opt_param string updateMask Required. Field mask is used to specify the
173 * fields to be overwritten by the update in the `Automation` resource. The
174 * fields specified in the update_mask are relative to the resource, not the
175 * full request. A field will be overwritten if it's in the mask. If the user
176 * doesn't provide a mask then all fields are overwritten.
177 * @opt_param bool validateOnly Optional. If set to true, the request is
178 * validated and the user is provided with an expected result, but no actual
179 * change is made.
180 * @return Operation
181 * @throws \Google\Service\Exception
182 */
183 public function patch($name, Automation $postBody, $optParams = [])
184 {
185 $params = ['name' => $name, 'postBody' => $postBody];
186 $params = array_merge($params, $optParams);
187 return $this->call('patch', [$params], Operation::class);
188 }
189}
190
191// Adding a class alias for backwards compatibility with the previous class name.
192class_alias(ProjectsLocationsDeliveryPipelinesAutomations::class, 'Google_Service_CloudDeploy_Resource_ProjectsLocationsDeliveryPipelinesAutomations');
Note: See TracBrowser for help on using the repository browser.