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\CloudRun\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudRun\GoogleCloudRunV2ExportStatusResponse;
|
---|
21 | use Google\Service\CloudRun\GoogleCloudRunV2ListRevisionsResponse;
|
---|
22 | use Google\Service\CloudRun\GoogleCloudRunV2Revision;
|
---|
23 | use Google\Service\CloudRun\GoogleLongrunningOperation;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "revisions" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $runService = new Google\Service\CloudRun(...);
|
---|
30 | * $revisions = $runService->projects_locations_services_revisions;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class ProjectsLocationsServicesRevisions extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Deletes a Revision. (revisions.delete)
|
---|
37 | *
|
---|
38 | * @param string $name Required. The name of the Revision to delete. Format: pro
|
---|
39 | * jects/{project}/locations/{location}/services/{service}/revisions/{revision}
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | *
|
---|
42 | * @opt_param string etag A system-generated fingerprint for this version of the
|
---|
43 | * resource. This may be used to detect modification conflict during updates.
|
---|
44 | * @opt_param bool validateOnly Indicates that the request should be validated
|
---|
45 | * without actually deleting any resources.
|
---|
46 | * @return GoogleLongrunningOperation
|
---|
47 | * @throws \Google\Service\Exception
|
---|
48 | */
|
---|
49 | public function delete($name, $optParams = [])
|
---|
50 | {
|
---|
51 | $params = ['name' => $name];
|
---|
52 | $params = array_merge($params, $optParams);
|
---|
53 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
54 | }
|
---|
55 | /**
|
---|
56 | * Read the status of an image export operation. (revisions.exportStatus)
|
---|
57 | *
|
---|
58 | * @param string $name Required. The name of the resource of which image export
|
---|
59 | * operation status has to be fetched. Format: `projects/{project_id_or_number}/
|
---|
60 | * locations/{location}/services/{service}/revisions/{revision}` for Revision `p
|
---|
61 | * rojects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{ex
|
---|
62 | * ecution}` for Execution
|
---|
63 | * @param string $operationId Required. The operation id returned from
|
---|
64 | * ExportImage.
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | * @return GoogleCloudRunV2ExportStatusResponse
|
---|
67 | * @throws \Google\Service\Exception
|
---|
68 | */
|
---|
69 | public function exportStatus($name, $operationId, $optParams = [])
|
---|
70 | {
|
---|
71 | $params = ['name' => $name, 'operationId' => $operationId];
|
---|
72 | $params = array_merge($params, $optParams);
|
---|
73 | return $this->call('exportStatus', [$params], GoogleCloudRunV2ExportStatusResponse::class);
|
---|
74 | }
|
---|
75 | /**
|
---|
76 | * Gets information about a Revision. (revisions.get)
|
---|
77 | *
|
---|
78 | * @param string $name Required. The full name of the Revision. Format: projects
|
---|
79 | * /{project}/locations/{location}/services/{service}/revisions/{revision}
|
---|
80 | * @param array $optParams Optional parameters.
|
---|
81 | * @return GoogleCloudRunV2Revision
|
---|
82 | * @throws \Google\Service\Exception
|
---|
83 | */
|
---|
84 | public function get($name, $optParams = [])
|
---|
85 | {
|
---|
86 | $params = ['name' => $name];
|
---|
87 | $params = array_merge($params, $optParams);
|
---|
88 | return $this->call('get', [$params], GoogleCloudRunV2Revision::class);
|
---|
89 | }
|
---|
90 | /**
|
---|
91 | * Lists Revisions from a given Service, or from a given location. Results are
|
---|
92 | * sorted by creation time, descending.
|
---|
93 | * (revisions.listProjectsLocationsServicesRevisions)
|
---|
94 | *
|
---|
95 | * @param string $parent Required. The Service from which the Revisions should
|
---|
96 | * be listed. To list all Revisions across Services, use "-" instead of Service
|
---|
97 | * name. Format: projects/{project}/locations/{location}/services/{service}
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | *
|
---|
100 | * @opt_param int pageSize Maximum number of revisions to return in this call.
|
---|
101 | * @opt_param string pageToken A page token received from a previous call to
|
---|
102 | * ListRevisions. All other parameters must match.
|
---|
103 | * @opt_param bool showDeleted If true, returns deleted (but unexpired)
|
---|
104 | * resources along with active ones.
|
---|
105 | * @return GoogleCloudRunV2ListRevisionsResponse
|
---|
106 | * @throws \Google\Service\Exception
|
---|
107 | */
|
---|
108 | public function listProjectsLocationsServicesRevisions($parent, $optParams = [])
|
---|
109 | {
|
---|
110 | $params = ['parent' => $parent];
|
---|
111 | $params = array_merge($params, $optParams);
|
---|
112 | return $this->call('list', [$params], GoogleCloudRunV2ListRevisionsResponse::class);
|
---|
113 | }
|
---|
114 | }
|
---|
115 |
|
---|
116 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
117 | class_alias(ProjectsLocationsServicesRevisions::class, 'Google_Service_CloudRun_Resource_ProjectsLocationsServicesRevisions');
|
---|