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\DataprocMetastore\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\DataprocMetastore\ListMigrationExecutionsResponse;
|
---|
21 | use Google\Service\DataprocMetastore\MigrationExecution;
|
---|
22 | use Google\Service\DataprocMetastore\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "migrationExecutions" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $metastoreService = new Google\Service\DataprocMetastore(...);
|
---|
29 | * $migrationExecutions = $metastoreService->projects_locations_services_migrationExecutions;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsServicesMigrationExecutions extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Deletes a single migration execution. (migrationExecutions.delete)
|
---|
36 | *
|
---|
37 | * @param string $name Required. The relative resource name of the
|
---|
38 | * migrationExecution to delete, in the following form:projects/{project_number}
|
---|
39 | * /locations/{location_id}/services/{service_id}/migrationExecutions/{migration
|
---|
40 | * _execution_id}.
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string requestId Optional. A request ID. Specify a unique request
|
---|
44 | * ID to allow the server to ignore the request if it has completed. The server
|
---|
45 | * will ignore subsequent requests that provide a duplicate request ID for at
|
---|
46 | * least 60 minutes after the first request.For example, if an initial request
|
---|
47 | * times out, followed by another request with the same request ID, the server
|
---|
48 | * ignores the second request to prevent the creation of duplicate
|
---|
49 | * commitments.The request ID must be a valid UUID
|
---|
50 | * (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
|
---|
51 | * UUID (00000000-0000-0000-0000-000000000000) is not supported.
|
---|
52 | * @return Operation
|
---|
53 | * @throws \Google\Service\Exception
|
---|
54 | */
|
---|
55 | public function delete($name, $optParams = [])
|
---|
56 | {
|
---|
57 | $params = ['name' => $name];
|
---|
58 | $params = array_merge($params, $optParams);
|
---|
59 | return $this->call('delete', [$params], Operation::class);
|
---|
60 | }
|
---|
61 | /**
|
---|
62 | * Gets details of a single migration execution. (migrationExecutions.get)
|
---|
63 | *
|
---|
64 | * @param string $name Required. The relative resource name of the migration
|
---|
65 | * execution to retrieve, in the following form:projects/{project_number}/locati
|
---|
66 | * ons/{location_id}/services/{service_id}/migrationExecutions/{migration_execut
|
---|
67 | * ion_id}.
|
---|
68 | * @param array $optParams Optional parameters.
|
---|
69 | * @return MigrationExecution
|
---|
70 | * @throws \Google\Service\Exception
|
---|
71 | */
|
---|
72 | public function get($name, $optParams = [])
|
---|
73 | {
|
---|
74 | $params = ['name' => $name];
|
---|
75 | $params = array_merge($params, $optParams);
|
---|
76 | return $this->call('get', [$params], MigrationExecution::class);
|
---|
77 | }
|
---|
78 | /**
|
---|
79 | * Lists migration executions on a service.
|
---|
80 | * (migrationExecutions.listProjectsLocationsServicesMigrationExecutions)
|
---|
81 | *
|
---|
82 | * @param string $parent Required. The relative resource name of the service
|
---|
83 | * whose migration executions to list, in the following form:projects/{project_n
|
---|
84 | * umber}/locations/{location_id}/services/{service_id}/migrationExecutions.
|
---|
85 | * @param array $optParams Optional parameters.
|
---|
86 | *
|
---|
87 | * @opt_param string filter Optional. The filter to apply to list results.
|
---|
88 | * @opt_param string orderBy Optional. Specify the ordering of results as
|
---|
89 | * described in Sorting Order
|
---|
90 | * (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
|
---|
91 | * specified, the results will be sorted in the default order.
|
---|
92 | * @opt_param int pageSize Optional. The maximum number of migration executions
|
---|
93 | * to return. The response may contain less than the maximum number. If
|
---|
94 | * unspecified, no more than 500 migration executions are returned. The maximum
|
---|
95 | * value is 1000; values above 1000 are changed to 1000.
|
---|
96 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
97 | * DataprocMetastore.ListMigrationExecutions call. Provide this token to
|
---|
98 | * retrieve the subsequent page.To retrieve the first page, supply an empty page
|
---|
99 | * token.When paginating, other parameters provided to
|
---|
100 | * DataprocMetastore.ListMigrationExecutions must match the call that provided
|
---|
101 | * the page token.
|
---|
102 | * @return ListMigrationExecutionsResponse
|
---|
103 | * @throws \Google\Service\Exception
|
---|
104 | */
|
---|
105 | public function listProjectsLocationsServicesMigrationExecutions($parent, $optParams = [])
|
---|
106 | {
|
---|
107 | $params = ['parent' => $parent];
|
---|
108 | $params = array_merge($params, $optParams);
|
---|
109 | return $this->call('list', [$params], ListMigrationExecutionsResponse::class);
|
---|
110 | }
|
---|
111 | }
|
---|
112 |
|
---|
113 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
114 | class_alias(ProjectsLocationsServicesMigrationExecutions::class, 'Google_Service_DataprocMetastore_Resource_ProjectsLocationsServicesMigrationExecutions');
|
---|