[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\CancelCutoverJobRequest;
|
---|
| 21 | use Google\Service\VMMigrationService\CutoverJob;
|
---|
| 22 | use Google\Service\VMMigrationService\ListCutoverJobsResponse;
|
---|
| 23 | use Google\Service\VMMigrationService\Operation;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "cutoverJobs" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $vmmigrationService = new Google\Service\VMMigrationService(...);
|
---|
| 30 | * $cutoverJobs = $vmmigrationService->projects_locations_sources_migratingVms_cutoverJobs;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class ProjectsLocationsSourcesMigratingVmsCutoverJobs extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Initiates the cancellation of a running cutover job. (cutoverJobs.cancel)
|
---|
| 37 | *
|
---|
| 38 | * @param string $name Required. The cutover job id
|
---|
| 39 | * @param CancelCutoverJobRequest $postBody
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | * @return Operation
|
---|
| 42 | * @throws \Google\Service\Exception
|
---|
| 43 | */
|
---|
| 44 | public function cancel($name, CancelCutoverJobRequest $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 | * Initiates a Cutover of a specific migrating VM. The returned LRO is completed
|
---|
| 52 | * when the cutover job resource is created and the job is initiated.
|
---|
| 53 | * (cutoverJobs.create)
|
---|
| 54 | *
|
---|
| 55 | * @param string $parent Required. The Cutover's parent.
|
---|
| 56 | * @param CutoverJob $postBody
|
---|
| 57 | * @param array $optParams Optional parameters.
|
---|
| 58 | *
|
---|
| 59 | * @opt_param string cutoverJobId Required. The cutover job identifier.
|
---|
| 60 | * @opt_param string requestId A request ID to identify requests. Specify a
|
---|
| 61 | * unique request ID so that if you must retry your request, the server will
|
---|
| 62 | * know to ignore the request if it has already been completed. The server will
|
---|
| 63 | * guarantee that for at least 60 minutes since the first request. For example,
|
---|
| 64 | * consider a situation where you make an initial request and the request times
|
---|
| 65 | * out. If you make the request again with the same request ID, the server can
|
---|
| 66 | * check if original operation with the same request ID was received, and if so,
|
---|
| 67 | * will ignore the second request. This prevents clients from accidentally
|
---|
| 68 | * creating duplicate commitments. The request ID must be a valid UUID with the
|
---|
| 69 | * exception that zero UUID is not supported
|
---|
| 70 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 71 | * @return Operation
|
---|
| 72 | * @throws \Google\Service\Exception
|
---|
| 73 | */
|
---|
| 74 | public function create($parent, CutoverJob $postBody, $optParams = [])
|
---|
| 75 | {
|
---|
| 76 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 77 | $params = array_merge($params, $optParams);
|
---|
| 78 | return $this->call('create', [$params], Operation::class);
|
---|
| 79 | }
|
---|
| 80 | /**
|
---|
| 81 | * Gets details of a single CutoverJob. (cutoverJobs.get)
|
---|
| 82 | *
|
---|
| 83 | * @param string $name Required. The name of the CutoverJob.
|
---|
| 84 | * @param array $optParams Optional parameters.
|
---|
| 85 | * @return CutoverJob
|
---|
| 86 | * @throws \Google\Service\Exception
|
---|
| 87 | */
|
---|
| 88 | public function get($name, $optParams = [])
|
---|
| 89 | {
|
---|
| 90 | $params = ['name' => $name];
|
---|
| 91 | $params = array_merge($params, $optParams);
|
---|
| 92 | return $this->call('get', [$params], CutoverJob::class);
|
---|
| 93 | }
|
---|
| 94 | /**
|
---|
| 95 | * Lists the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs are
|
---|
| 96 | * listed. (cutoverJobs.listProjectsLocationsSourcesMigratingVmsCutoverJobs)
|
---|
| 97 | *
|
---|
| 98 | * @param string $parent Required. The parent, which owns this collection of
|
---|
| 99 | * migrating VMs.
|
---|
| 100 | * @param array $optParams Optional parameters.
|
---|
| 101 | *
|
---|
| 102 | * @opt_param string filter Optional. The filter request.
|
---|
| 103 | * @opt_param string orderBy Optional. the order by fields for the result.
|
---|
| 104 | * @opt_param int pageSize Optional. The maximum number of cutover jobs to
|
---|
| 105 | * return. The service may return fewer than this value. If unspecified, at most
|
---|
| 106 | * 500 cutover jobs will be returned. The maximum value is 1000; values above
|
---|
| 107 | * 1000 will be coerced to 1000.
|
---|
| 108 | * @opt_param string pageToken Required. A page token, received from a previous
|
---|
| 109 | * `ListCutoverJobs` call. Provide this to retrieve the subsequent page. When
|
---|
| 110 | * paginating, all other parameters provided to `ListCutoverJobs` must match the
|
---|
| 111 | * call that provided the page token.
|
---|
| 112 | * @return ListCutoverJobsResponse
|
---|
| 113 | * @throws \Google\Service\Exception
|
---|
| 114 | */
|
---|
| 115 | public function listProjectsLocationsSourcesMigratingVmsCutoverJobs($parent, $optParams = [])
|
---|
| 116 | {
|
---|
| 117 | $params = ['parent' => $parent];
|
---|
| 118 | $params = array_merge($params, $optParams);
|
---|
| 119 | return $this->call('list', [$params], ListCutoverJobsResponse::class);
|
---|
| 120 | }
|
---|
| 121 | }
|
---|
| 122 |
|
---|
| 123 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 124 | class_alias(ProjectsLocationsSourcesMigratingVmsCutoverJobs::class, 'Google_Service_VMMigrationService_Resource_ProjectsLocationsSourcesMigratingVmsCutoverJobs');
|
---|