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\VMMigrationService\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\VMMigrationService\CancelImageImportJobRequest;
|
---|
21 | use Google\Service\VMMigrationService\ImageImportJob;
|
---|
22 | use Google\Service\VMMigrationService\ListImageImportJobsResponse;
|
---|
23 | use Google\Service\VMMigrationService\Operation;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "imageImportJobs" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $vmmigrationService = new Google\Service\VMMigrationService(...);
|
---|
30 | * $imageImportJobs = $vmmigrationService->projects_locations_imageImports_imageImportJobs;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class ProjectsLocationsImageImportsImageImportJobs extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Initiates the cancellation of a running clone job. (imageImportJobs.cancel)
|
---|
37 | *
|
---|
38 | * @param string $name Required. The image import job id.
|
---|
39 | * @param CancelImageImportJobRequest $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | * @return Operation
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function cancel($name, CancelImageImportJobRequest $postBody, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('cancel', [$params], Operation::class);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Gets details of a single ImageImportJob. (imageImportJobs.get)
|
---|
52 | *
|
---|
53 | * @param string $name Required. The ImageImportJob name.
|
---|
54 | * @param array $optParams Optional parameters.
|
---|
55 | * @return ImageImportJob
|
---|
56 | * @throws \Google\Service\Exception
|
---|
57 | */
|
---|
58 | public function get($name, $optParams = [])
|
---|
59 | {
|
---|
60 | $params = ['name' => $name];
|
---|
61 | $params = array_merge($params, $optParams);
|
---|
62 | return $this->call('get', [$params], ImageImportJob::class);
|
---|
63 | }
|
---|
64 | /**
|
---|
65 | * Lists ImageImportJobs in a given project.
|
---|
66 | * (imageImportJobs.listProjectsLocationsImageImportsImageImportJobs)
|
---|
67 | *
|
---|
68 | * @param string $parent Required. The parent, which owns this collection of
|
---|
69 | * targets.
|
---|
70 | * @param array $optParams Optional parameters.
|
---|
71 | *
|
---|
72 | * @opt_param string filter Optional. The filter request (according to AIP-160).
|
---|
73 | * @opt_param string orderBy Optional. The order by fields for the result
|
---|
74 | * (according to AIP-132). Currently ordering is only possible by "name" field.
|
---|
75 | * @opt_param int pageSize Optional. The maximum number of targets to return.
|
---|
76 | * The service may return fewer than this value. If unspecified, at most 500
|
---|
77 | * targets will be returned. The maximum value is 1000; values above 1000 will
|
---|
78 | * be coerced to 1000.
|
---|
79 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
80 | * `ListImageImportJobs` call. Provide this to retrieve the subsequent page.
|
---|
81 | * When paginating, all other parameters provided to `ListImageImportJobs` must
|
---|
82 | * match the call that provided the page token.
|
---|
83 | * @return ListImageImportJobsResponse
|
---|
84 | * @throws \Google\Service\Exception
|
---|
85 | */
|
---|
86 | public function listProjectsLocationsImageImportsImageImportJobs($parent, $optParams = [])
|
---|
87 | {
|
---|
88 | $params = ['parent' => $parent];
|
---|
89 | $params = array_merge($params, $optParams);
|
---|
90 | return $this->call('list', [$params], ListImageImportJobsResponse::class);
|
---|
91 | }
|
---|
92 | }
|
---|
93 |
|
---|
94 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
95 | class_alias(ProjectsLocationsImageImportsImageImportJobs::class, 'Google_Service_VMMigrationService_Resource_ProjectsLocationsImageImportsImageImportJobs');
|
---|