[e3d4e0a] | 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\ImageImport;
|
---|
| 21 | use Google\Service\VMMigrationService\ListImageImportsResponse;
|
---|
| 22 | use Google\Service\VMMigrationService\Operation;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "imageImports" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $vmmigrationService = new Google\Service\VMMigrationService(...);
|
---|
| 29 | * $imageImports = $vmmigrationService->projects_locations_imageImports;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsImageImports extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a new ImageImport in a given project. (imageImports.create)
|
---|
| 36 | *
|
---|
| 37 | * @param string $parent Required. The ImageImport's parent.
|
---|
| 38 | * @param ImageImport $postBody
|
---|
| 39 | * @param array $optParams Optional parameters.
|
---|
| 40 | *
|
---|
| 41 | * @opt_param string imageImportId Required. The image import identifier. This
|
---|
| 42 | * value maximum length is 63 characters, and valid characters are /a-z-/. It
|
---|
| 43 | * must start with an english letter and must not end with a hyphen.
|
---|
| 44 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
| 45 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 46 | * server will know to ignore the request if it has already been completed. The
|
---|
| 47 | * server will guarantee that for at least 60 minutes since the first request.
|
---|
| 48 | * For example, consider a situation where you make an initial request and the
|
---|
| 49 | * request times out. If you make the request again with the same request ID,
|
---|
| 50 | * the server can check if original operation with the same request ID was
|
---|
| 51 | * received, and if so, will ignore the second request. This prevents clients
|
---|
| 52 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
| 53 | * valid UUID with the exception that zero UUID is not supported
|
---|
| 54 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 55 | * @return Operation
|
---|
| 56 | * @throws \Google\Service\Exception
|
---|
| 57 | */
|
---|
| 58 | public function create($parent, ImageImport $postBody, $optParams = [])
|
---|
| 59 | {
|
---|
| 60 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 61 | $params = array_merge($params, $optParams);
|
---|
| 62 | return $this->call('create', [$params], Operation::class);
|
---|
| 63 | }
|
---|
| 64 | /**
|
---|
| 65 | * Deletes a single ImageImport. (imageImports.delete)
|
---|
| 66 | *
|
---|
| 67 | * @param string $name Required. The ImageImport name.
|
---|
| 68 | * @param array $optParams Optional parameters.
|
---|
| 69 | *
|
---|
| 70 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
| 71 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 72 | * server will know to ignore the request if it has already been completed. The
|
---|
| 73 | * server will guarantee that for at least 60 minutes after the first request.
|
---|
| 74 | * For example, consider a situation where you make an initial request and t he
|
---|
| 75 | * request times out. If you make the request again with the same request ID,
|
---|
| 76 | * the server can check if original operation with the same request ID was
|
---|
| 77 | * received, and if so, will ignore the second request. This prevents clients
|
---|
| 78 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
| 79 | * valid UUID with the exception that zero UUID is not supported
|
---|
| 80 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 81 | * @return Operation
|
---|
| 82 | * @throws \Google\Service\Exception
|
---|
| 83 | */
|
---|
| 84 | public function delete($name, $optParams = [])
|
---|
| 85 | {
|
---|
| 86 | $params = ['name' => $name];
|
---|
| 87 | $params = array_merge($params, $optParams);
|
---|
| 88 | return $this->call('delete', [$params], Operation::class);
|
---|
| 89 | }
|
---|
| 90 | /**
|
---|
| 91 | * Gets details of a single ImageImport. (imageImports.get)
|
---|
| 92 | *
|
---|
| 93 | * @param string $name Required. The ImageImport name.
|
---|
| 94 | * @param array $optParams Optional parameters.
|
---|
| 95 | * @return ImageImport
|
---|
| 96 | * @throws \Google\Service\Exception
|
---|
| 97 | */
|
---|
| 98 | public function get($name, $optParams = [])
|
---|
| 99 | {
|
---|
| 100 | $params = ['name' => $name];
|
---|
| 101 | $params = array_merge($params, $optParams);
|
---|
| 102 | return $this->call('get', [$params], ImageImport::class);
|
---|
| 103 | }
|
---|
| 104 | /**
|
---|
| 105 | * Lists ImageImports in a given project.
|
---|
| 106 | * (imageImports.listProjectsLocationsImageImports)
|
---|
| 107 | *
|
---|
| 108 | * @param string $parent Required. The parent, which owns this collection of
|
---|
| 109 | * targets.
|
---|
| 110 | * @param array $optParams Optional parameters.
|
---|
| 111 | *
|
---|
| 112 | * @opt_param string filter Optional. The filter request (according to AIP-160).
|
---|
| 113 | * @opt_param string orderBy Optional. The order by fields for the result
|
---|
| 114 | * (according to AIP-132). Currently ordering is only possible by "name" field.
|
---|
| 115 | * @opt_param int pageSize Optional. The maximum number of targets to return.
|
---|
| 116 | * The service may return fewer than this value. If unspecified, at most 500
|
---|
| 117 | * targets will be returned. The maximum value is 1000; values above 1000 will
|
---|
| 118 | * be coerced to 1000.
|
---|
| 119 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
| 120 | * `ListImageImports` call. Provide this to retrieve the subsequent page. When
|
---|
| 121 | * paginating, all other parameters provided to `ListImageImports` must match
|
---|
| 122 | * the call that provided the page token.
|
---|
| 123 | * @return ListImageImportsResponse
|
---|
| 124 | * @throws \Google\Service\Exception
|
---|
| 125 | */
|
---|
| 126 | public function listProjectsLocationsImageImports($parent, $optParams = [])
|
---|
| 127 | {
|
---|
| 128 | $params = ['parent' => $parent];
|
---|
| 129 | $params = array_merge($params, $optParams);
|
---|
| 130 | return $this->call('list', [$params], ListImageImportsResponse::class);
|
---|
| 131 | }
|
---|
| 132 | }
|
---|
| 133 |
|
---|
| 134 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 135 | class_alias(ProjectsLocationsImageImports::class, 'Google_Service_VMMigrationService_Resource_ProjectsLocationsImageImports');
|
---|