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\GoogleCloudRunV2ExportImageRequest;
|
---|
21 | use Google\Service\CloudRun\GoogleCloudRunV2ExportImageResponse;
|
---|
22 | use Google\Service\CloudRun\GoogleCloudRunV2Metadata;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "locations" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $runService = new Google\Service\CloudRun(...);
|
---|
29 | * $locations = $runService->projects_locations;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocations extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Export image for a given resource. (locations.exportImage)
|
---|
36 | *
|
---|
37 | * @param string $name Required. The name of the resource of which image
|
---|
38 | * metadata should be exported. Format: `projects/{project_id_or_number}/locatio
|
---|
39 | * ns/{location}/services/{service}/revisions/{revision}` for Revision `projects
|
---|
40 | * /{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution
|
---|
41 | * }` for Execution
|
---|
42 | * @param GoogleCloudRunV2ExportImageRequest $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | * @return GoogleCloudRunV2ExportImageResponse
|
---|
45 | * @throws \Google\Service\Exception
|
---|
46 | */
|
---|
47 | public function exportImage($name, GoogleCloudRunV2ExportImageRequest $postBody, $optParams = [])
|
---|
48 | {
|
---|
49 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
50 | $params = array_merge($params, $optParams);
|
---|
51 | return $this->call('exportImage', [$params], GoogleCloudRunV2ExportImageResponse::class);
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * Export image metadata for a given resource. (locations.exportImageMetadata)
|
---|
55 | *
|
---|
56 | * @param string $name Required. The name of the resource of which image
|
---|
57 | * metadata should be exported. Format: `projects/{project_id_or_number}/locatio
|
---|
58 | * ns/{location}/services/{service}/revisions/{revision}` for Revision `projects
|
---|
59 | * /{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution
|
---|
60 | * }` for Execution
|
---|
61 | * @param array $optParams Optional parameters.
|
---|
62 | * @return GoogleCloudRunV2Metadata
|
---|
63 | * @throws \Google\Service\Exception
|
---|
64 | */
|
---|
65 | public function exportImageMetadata($name, $optParams = [])
|
---|
66 | {
|
---|
67 | $params = ['name' => $name];
|
---|
68 | $params = array_merge($params, $optParams);
|
---|
69 | return $this->call('exportImageMetadata', [$params], GoogleCloudRunV2Metadata::class);
|
---|
70 | }
|
---|
71 | /**
|
---|
72 | * Export generated customer metadata for a given resource.
|
---|
73 | * (locations.exportMetadata)
|
---|
74 | *
|
---|
75 | * @param string $name Required. The name of the resource of which metadata
|
---|
76 | * should be exported. Format:
|
---|
77 | * `projects/{project_id_or_number}/locations/{location}/services/{service}` for
|
---|
78 | * Service `projects/{project_id_or_number}/locations/{location}/services/{servi
|
---|
79 | * ce}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locat
|
---|
80 | * ions/{location}/jobs/{job}/executions/{execution}` for Execution
|
---|
81 | * @param array $optParams Optional parameters.
|
---|
82 | * @return GoogleCloudRunV2Metadata
|
---|
83 | * @throws \Google\Service\Exception
|
---|
84 | */
|
---|
85 | public function exportMetadata($name, $optParams = [])
|
---|
86 | {
|
---|
87 | $params = ['name' => $name];
|
---|
88 | $params = array_merge($params, $optParams);
|
---|
89 | return $this->call('exportMetadata', [$params], GoogleCloudRunV2Metadata::class);
|
---|
90 | }
|
---|
91 | /**
|
---|
92 | * Export generated customer metadata for a given project.
|
---|
93 | * (locations.exportProjectMetadata)
|
---|
94 | *
|
---|
95 | * @param string $name Required. The name of the project of which metadata
|
---|
96 | * should be exported. Format:
|
---|
97 | * `projects/{project_id_or_number}/locations/{location}` for Project in a given
|
---|
98 | * location.
|
---|
99 | * @param array $optParams Optional parameters.
|
---|
100 | * @return GoogleCloudRunV2Metadata
|
---|
101 | * @throws \Google\Service\Exception
|
---|
102 | */
|
---|
103 | public function exportProjectMetadata($name, $optParams = [])
|
---|
104 | {
|
---|
105 | $params = ['name' => $name];
|
---|
106 | $params = array_merge($params, $optParams);
|
---|
107 | return $this->call('exportProjectMetadata', [$params], GoogleCloudRunV2Metadata::class);
|
---|
108 | }
|
---|
109 | }
|
---|
110 |
|
---|
111 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
112 | class_alias(ProjectsLocations::class, 'Google_Service_CloudRun_Resource_ProjectsLocations');
|
---|