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\MigrationCenterAPI\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\MigrationCenterAPI\ImportDataFile;
|
---|
21 | use Google\Service\MigrationCenterAPI\ListImportDataFilesResponse;
|
---|
22 | use Google\Service\MigrationCenterAPI\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "importDataFiles" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $migrationcenterService = new Google\Service\MigrationCenterAPI(...);
|
---|
29 | * $importDataFiles = $migrationcenterService->projects_locations_importJobs_importDataFiles;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsImportJobsImportDataFiles extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates an import data file. (importDataFiles.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. Name of the parent of the ImportDataFile.
|
---|
38 | * @param ImportDataFile $postBody
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | *
|
---|
41 | * @opt_param string importDataFileId Required. The ID of the new data file.
|
---|
42 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
43 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
44 | * the server will know to ignore the request if it has already been completed.
|
---|
45 | * The server will guarantee that for at least 60 minutes since the first
|
---|
46 | * request. For example, consider a situation where you make an initial request
|
---|
47 | * and the request times out. If you make the request again with the same
|
---|
48 | * request ID, the server can check if original operation with the same request
|
---|
49 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
50 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
51 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
52 | * (00000000-0000-0000-0000-000000000000).
|
---|
53 | * @return Operation
|
---|
54 | * @throws \Google\Service\Exception
|
---|
55 | */
|
---|
56 | public function create($parent, ImportDataFile $postBody, $optParams = [])
|
---|
57 | {
|
---|
58 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
59 | $params = array_merge($params, $optParams);
|
---|
60 | return $this->call('create', [$params], Operation::class);
|
---|
61 | }
|
---|
62 | /**
|
---|
63 | * Delete an import data file. (importDataFiles.delete)
|
---|
64 | *
|
---|
65 | * @param string $name Required. Name of the ImportDataFile to delete.
|
---|
66 | * @param array $optParams Optional parameters.
|
---|
67 | *
|
---|
68 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
69 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
70 | * the server will know to ignore the request if it has already been completed.
|
---|
71 | * The server will guarantee that for at least 60 minutes after the first
|
---|
72 | * request. For example, consider a situation where you make an initial request
|
---|
73 | * and the request times out. If you make the request again with the same
|
---|
74 | * request ID, the server can check if original operation with the same request
|
---|
75 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
76 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
77 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
78 | * (00000000-0000-0000-0000-000000000000).
|
---|
79 | * @return Operation
|
---|
80 | * @throws \Google\Service\Exception
|
---|
81 | */
|
---|
82 | public function delete($name, $optParams = [])
|
---|
83 | {
|
---|
84 | $params = ['name' => $name];
|
---|
85 | $params = array_merge($params, $optParams);
|
---|
86 | return $this->call('delete', [$params], Operation::class);
|
---|
87 | }
|
---|
88 | /**
|
---|
89 | * Gets an import data file. (importDataFiles.get)
|
---|
90 | *
|
---|
91 | * @param string $name Required. Name of the ImportDataFile.
|
---|
92 | * @param array $optParams Optional parameters.
|
---|
93 | * @return ImportDataFile
|
---|
94 | * @throws \Google\Service\Exception
|
---|
95 | */
|
---|
96 | public function get($name, $optParams = [])
|
---|
97 | {
|
---|
98 | $params = ['name' => $name];
|
---|
99 | $params = array_merge($params, $optParams);
|
---|
100 | return $this->call('get', [$params], ImportDataFile::class);
|
---|
101 | }
|
---|
102 | /**
|
---|
103 | * List import data files.
|
---|
104 | * (importDataFiles.listProjectsLocationsImportJobsImportDataFiles)
|
---|
105 | *
|
---|
106 | * @param string $parent Required. Name of the parent of the `ImportDataFiles`
|
---|
107 | * resource.
|
---|
108 | * @param array $optParams Optional parameters.
|
---|
109 | *
|
---|
110 | * @opt_param string filter Filtering results.
|
---|
111 | * @opt_param string orderBy Field to sort by. See
|
---|
112 | * https://google.aip.dev/132#ordering for more details.
|
---|
113 | * @opt_param int pageSize The maximum number of data files to return. The
|
---|
114 | * service may return fewer than this value. If unspecified, at most 500 data
|
---|
115 | * files will be returned. The maximum value is 1000; values above 1000 will be
|
---|
116 | * coerced to 1000.
|
---|
117 | * @opt_param string pageToken A page token, received from a previous
|
---|
118 | * `ListImportDataFiles` call. Provide this to retrieve the subsequent page.
|
---|
119 | * When paginating, all other parameters provided to `ListImportDataFiles` must
|
---|
120 | * match the call that provided the page token.
|
---|
121 | * @return ListImportDataFilesResponse
|
---|
122 | * @throws \Google\Service\Exception
|
---|
123 | */
|
---|
124 | public function listProjectsLocationsImportJobsImportDataFiles($parent, $optParams = [])
|
---|
125 | {
|
---|
126 | $params = ['parent' => $parent];
|
---|
127 | $params = array_merge($params, $optParams);
|
---|
128 | return $this->call('list', [$params], ListImportDataFilesResponse::class);
|
---|
129 | }
|
---|
130 | }
|
---|
131 |
|
---|
132 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
133 | class_alias(ProjectsLocationsImportJobsImportDataFiles::class, 'Google_Service_MigrationCenterAPI_Resource_ProjectsLocationsImportJobsImportDataFiles');
|
---|