[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\CloudDeploy\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\CloudDeploy\AdvanceRolloutRequest;
|
---|
| 21 | use Google\Service\CloudDeploy\AdvanceRolloutResponse;
|
---|
| 22 | use Google\Service\CloudDeploy\ApproveRolloutRequest;
|
---|
| 23 | use Google\Service\CloudDeploy\ApproveRolloutResponse;
|
---|
| 24 | use Google\Service\CloudDeploy\CancelRolloutRequest;
|
---|
| 25 | use Google\Service\CloudDeploy\CancelRolloutResponse;
|
---|
| 26 | use Google\Service\CloudDeploy\IgnoreJobRequest;
|
---|
| 27 | use Google\Service\CloudDeploy\IgnoreJobResponse;
|
---|
| 28 | use Google\Service\CloudDeploy\ListRolloutsResponse;
|
---|
| 29 | use Google\Service\CloudDeploy\Operation;
|
---|
| 30 | use Google\Service\CloudDeploy\RetryJobRequest;
|
---|
| 31 | use Google\Service\CloudDeploy\RetryJobResponse;
|
---|
| 32 | use Google\Service\CloudDeploy\Rollout;
|
---|
| 33 |
|
---|
| 34 | /**
|
---|
| 35 | * The "rollouts" collection of methods.
|
---|
| 36 | * Typical usage is:
|
---|
| 37 | * <code>
|
---|
| 38 | * $clouddeployService = new Google\Service\CloudDeploy(...);
|
---|
| 39 | * $rollouts = $clouddeployService->projects_locations_deliveryPipelines_releases_rollouts;
|
---|
| 40 | * </code>
|
---|
| 41 | */
|
---|
| 42 | class ProjectsLocationsDeliveryPipelinesReleasesRollouts extends \Google\Service\Resource
|
---|
| 43 | {
|
---|
| 44 | /**
|
---|
| 45 | * Advances a Rollout in a given project and location. (rollouts.advance)
|
---|
| 46 | *
|
---|
| 47 | * @param string $name Required. Name of the Rollout. Format is `projects/{proje
|
---|
| 48 | * ct}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{relea
|
---|
| 49 | * se}/rollouts/{rollout}`.
|
---|
| 50 | * @param AdvanceRolloutRequest $postBody
|
---|
| 51 | * @param array $optParams Optional parameters.
|
---|
| 52 | * @return AdvanceRolloutResponse
|
---|
| 53 | * @throws \Google\Service\Exception
|
---|
| 54 | */
|
---|
| 55 | public function advance($name, AdvanceRolloutRequest $postBody, $optParams = [])
|
---|
| 56 | {
|
---|
| 57 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 58 | $params = array_merge($params, $optParams);
|
---|
| 59 | return $this->call('advance', [$params], AdvanceRolloutResponse::class);
|
---|
| 60 | }
|
---|
| 61 | /**
|
---|
| 62 | * Approves a Rollout. (rollouts.approve)
|
---|
| 63 | *
|
---|
| 64 | * @param string $name Required. Name of the Rollout. Format is `projects/{proje
|
---|
| 65 | * ct}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{relea
|
---|
| 66 | * se}/rollouts/{rollout}`.
|
---|
| 67 | * @param ApproveRolloutRequest $postBody
|
---|
| 68 | * @param array $optParams Optional parameters.
|
---|
| 69 | * @return ApproveRolloutResponse
|
---|
| 70 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function approve($name, ApproveRolloutRequest $postBody, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('approve', [$params], ApproveRolloutResponse::class);
|
---|
| 77 | }
|
---|
| 78 | /**
|
---|
| 79 | * Cancels a Rollout in a given project and location. (rollouts.cancel)
|
---|
| 80 | *
|
---|
| 81 | * @param string $name Required. Name of the Rollout. Format is `projects/{proje
|
---|
| 82 | * ct}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{relea
|
---|
| 83 | * se}/rollouts/{rollout}`.
|
---|
| 84 | * @param CancelRolloutRequest $postBody
|
---|
| 85 | * @param array $optParams Optional parameters.
|
---|
| 86 | * @return CancelRolloutResponse
|
---|
| 87 | * @throws \Google\Service\Exception
|
---|
| 88 | */
|
---|
| 89 | public function cancel($name, CancelRolloutRequest $postBody, $optParams = [])
|
---|
| 90 | {
|
---|
| 91 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 92 | $params = array_merge($params, $optParams);
|
---|
| 93 | return $this->call('cancel', [$params], CancelRolloutResponse::class);
|
---|
| 94 | }
|
---|
| 95 | /**
|
---|
| 96 | * Creates a new Rollout in a given project and location. (rollouts.create)
|
---|
| 97 | *
|
---|
| 98 | * @param string $parent Required. The parent collection in which the `Rollout`
|
---|
| 99 | * must be created. The format is `projects/{project_id}/locations/{location_nam
|
---|
| 100 | * e}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
|
---|
| 101 | * @param Rollout $postBody
|
---|
| 102 | * @param array $optParams Optional parameters.
|
---|
| 103 | *
|
---|
| 104 | * @opt_param string overrideDeployPolicy Optional. Deploy policies to override.
|
---|
| 105 | * Format is
|
---|
| 106 | * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
|
---|
| 107 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
| 108 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 109 | * server knows to ignore the request if it has already been completed. The
|
---|
| 110 | * server guarantees that for at least 60 minutes after the first request. For
|
---|
| 111 | * example, consider a situation where you make an initial request and the
|
---|
| 112 | * request times out. If you make the request again with the same request ID,
|
---|
| 113 | * the server can check if original operation with the same request ID was
|
---|
| 114 | * received, and if so, will ignore the second request. This prevents clients
|
---|
| 115 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
| 116 | * valid UUID with the exception that zero UUID is not supported
|
---|
| 117 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 118 | * @opt_param string rolloutId Required. ID of the `Rollout`.
|
---|
| 119 | * @opt_param string startingPhaseId Optional. The starting phase ID for the
|
---|
| 120 | * `Rollout`. If empty the `Rollout` will start at the first phase.
|
---|
| 121 | * @opt_param bool validateOnly Optional. If set to true, the request is
|
---|
| 122 | * validated and the user is provided with an expected result, but no actual
|
---|
| 123 | * change is made.
|
---|
| 124 | * @return Operation
|
---|
| 125 | * @throws \Google\Service\Exception
|
---|
| 126 | */
|
---|
| 127 | public function create($parent, Rollout $postBody, $optParams = [])
|
---|
| 128 | {
|
---|
| 129 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 130 | $params = array_merge($params, $optParams);
|
---|
| 131 | return $this->call('create', [$params], Operation::class);
|
---|
| 132 | }
|
---|
| 133 | /**
|
---|
| 134 | * Gets details of a single Rollout. (rollouts.get)
|
---|
| 135 | *
|
---|
| 136 | * @param string $name Required. Name of the `Rollout`. Format must be `projects
|
---|
| 137 | * /{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/rel
|
---|
| 138 | * eases/{release_name}/rollouts/{rollout_name}`.
|
---|
| 139 | * @param array $optParams Optional parameters.
|
---|
| 140 | * @return Rollout
|
---|
| 141 | * @throws \Google\Service\Exception
|
---|
| 142 | */
|
---|
| 143 | public function get($name, $optParams = [])
|
---|
| 144 | {
|
---|
| 145 | $params = ['name' => $name];
|
---|
| 146 | $params = array_merge($params, $optParams);
|
---|
| 147 | return $this->call('get', [$params], Rollout::class);
|
---|
| 148 | }
|
---|
| 149 | /**
|
---|
| 150 | * Ignores the specified Job in a Rollout. (rollouts.ignoreJob)
|
---|
| 151 | *
|
---|
| 152 | * @param string $rollout Required. Name of the Rollout. Format is `projects/{pr
|
---|
| 153 | * oject}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{re
|
---|
| 154 | * lease}/rollouts/{rollout}`.
|
---|
| 155 | * @param IgnoreJobRequest $postBody
|
---|
| 156 | * @param array $optParams Optional parameters.
|
---|
| 157 | * @return IgnoreJobResponse
|
---|
| 158 | * @throws \Google\Service\Exception
|
---|
| 159 | */
|
---|
| 160 | public function ignoreJob($rollout, IgnoreJobRequest $postBody, $optParams = [])
|
---|
| 161 | {
|
---|
| 162 | $params = ['rollout' => $rollout, 'postBody' => $postBody];
|
---|
| 163 | $params = array_merge($params, $optParams);
|
---|
| 164 | return $this->call('ignoreJob', [$params], IgnoreJobResponse::class);
|
---|
| 165 | }
|
---|
| 166 | /**
|
---|
| 167 | * Lists Rollouts in a given project and location.
|
---|
| 168 | * (rollouts.listProjectsLocationsDeliveryPipelinesReleasesRollouts)
|
---|
| 169 | *
|
---|
| 170 | * @param string $parent Required. The `Release` which owns this collection of
|
---|
| 171 | * `Rollout` objects.
|
---|
| 172 | * @param array $optParams Optional parameters.
|
---|
| 173 | *
|
---|
| 174 | * @opt_param string filter Optional. Filter rollouts to be returned. See
|
---|
| 175 | * https://google.aip.dev/160 for more details.
|
---|
| 176 | * @opt_param string orderBy Optional. Field to sort by. See
|
---|
| 177 | * https://google.aip.dev/132#ordering for more details.
|
---|
| 178 | * @opt_param int pageSize Optional. The maximum number of `Rollout` objects to
|
---|
| 179 | * return. The service may return fewer than this value. If unspecified, at most
|
---|
| 180 | * 50 `Rollout` objects will be returned. The maximum value is 1000; values
|
---|
| 181 | * above 1000 will be set to 1000.
|
---|
| 182 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
| 183 | * `ListRollouts` call. Provide this to retrieve the subsequent page. When
|
---|
| 184 | * paginating, all other provided parameters match the call that provided the
|
---|
| 185 | * page token.
|
---|
| 186 | * @return ListRolloutsResponse
|
---|
| 187 | * @throws \Google\Service\Exception
|
---|
| 188 | */
|
---|
| 189 | public function listProjectsLocationsDeliveryPipelinesReleasesRollouts($parent, $optParams = [])
|
---|
| 190 | {
|
---|
| 191 | $params = ['parent' => $parent];
|
---|
| 192 | $params = array_merge($params, $optParams);
|
---|
| 193 | return $this->call('list', [$params], ListRolloutsResponse::class);
|
---|
| 194 | }
|
---|
| 195 | /**
|
---|
| 196 | * Retries the specified Job in a Rollout. (rollouts.retryJob)
|
---|
| 197 | *
|
---|
| 198 | * @param string $rollout Required. Name of the Rollout. Format is `projects/{pr
|
---|
| 199 | * oject}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{re
|
---|
| 200 | * lease}/rollouts/{rollout}`.
|
---|
| 201 | * @param RetryJobRequest $postBody
|
---|
| 202 | * @param array $optParams Optional parameters.
|
---|
| 203 | * @return RetryJobResponse
|
---|
| 204 | * @throws \Google\Service\Exception
|
---|
| 205 | */
|
---|
| 206 | public function retryJob($rollout, RetryJobRequest $postBody, $optParams = [])
|
---|
| 207 | {
|
---|
| 208 | $params = ['rollout' => $rollout, 'postBody' => $postBody];
|
---|
| 209 | $params = array_merge($params, $optParams);
|
---|
| 210 | return $this->call('retryJob', [$params], RetryJobResponse::class);
|
---|
| 211 | }
|
---|
| 212 | }
|
---|
| 213 |
|
---|
| 214 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 215 | class_alias(ProjectsLocationsDeliveryPipelinesReleasesRollouts::class, 'Google_Service_CloudDeploy_Resource_ProjectsLocationsDeliveryPipelinesReleasesRollouts');
|
---|