Skip to content

Commit 29037ff

Browse files
Regenerate vmmigration client (googleapis#6646)
1 parent aa7d253 commit 29037ff

File tree

5 files changed

+147
-0
lines changed

5 files changed

+147
-0
lines changed

src/VMMigrationService.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,16 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
670670
'required' => true,
671671
],
672672
],
673+
],'extendMigration' => [
674+
'path' => 'v1/{+migratingVm}:extendMigration',
675+
'httpMethod' => 'POST',
676+
'parameters' => [
677+
'migratingVm' => [
678+
'location' => 'path',
679+
'type' => 'string',
680+
'required' => true,
681+
],
682+
],
673683
],'finalizeMigration' => [
674684
'path' => 'v1/{+migratingVm}:finalizeMigration',
675685
'httpMethod' => 'POST',

src/VMMigrationService/Expiration.php

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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;
19+
20+
class Expiration extends \Google\Model
21+
{
22+
/**
23+
* @var string
24+
*/
25+
public $expireTime;
26+
/**
27+
* @var bool
28+
*/
29+
public $extendable;
30+
/**
31+
* @var int
32+
*/
33+
public $extensionCount;
34+
35+
/**
36+
* @param string
37+
*/
38+
public function setExpireTime($expireTime)
39+
{
40+
$this->expireTime = $expireTime;
41+
}
42+
/**
43+
* @return string
44+
*/
45+
public function getExpireTime()
46+
{
47+
return $this->expireTime;
48+
}
49+
/**
50+
* @param bool
51+
*/
52+
public function setExtendable($extendable)
53+
{
54+
$this->extendable = $extendable;
55+
}
56+
/**
57+
* @return bool
58+
*/
59+
public function getExtendable()
60+
{
61+
return $this->extendable;
62+
}
63+
/**
64+
* @param int
65+
*/
66+
public function setExtensionCount($extensionCount)
67+
{
68+
$this->extensionCount = $extensionCount;
69+
}
70+
/**
71+
* @return int
72+
*/
73+
public function getExtensionCount()
74+
{
75+
return $this->extensionCount;
76+
}
77+
}
78+
79+
// Adding a class alias for backwards compatibility with the previous class name.
80+
class_alias(Expiration::class, 'Google_Service_VMMigrationService_Expiration');
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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;
19+
20+
class ExtendMigrationRequest extends \Google\Model
21+
{
22+
}
23+
24+
// Adding a class alias for backwards compatibility with the previous class name.
25+
class_alias(ExtendMigrationRequest::class, 'Google_Service_VMMigrationService_ExtendMigrationRequest');

src/VMMigrationService/MigratingVm.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class MigratingVm extends \Google\Collection
4646
public $displayName;
4747
protected $errorType = Status::class;
4848
protected $errorDataType = '';
49+
protected $expirationType = Expiration::class;
50+
protected $expirationDataType = '';
4951
/**
5052
* @var string
5153
*/
@@ -227,6 +229,20 @@ public function getError()
227229
{
228230
return $this->error;
229231
}
232+
/**
233+
* @param Expiration
234+
*/
235+
public function setExpiration(Expiration $expiration)
236+
{
237+
$this->expiration = $expiration;
238+
}
239+
/**
240+
* @return Expiration
241+
*/
242+
public function getExpiration()
243+
{
244+
return $this->expiration;
245+
}
230246
/**
231247
* @param string
232248
*/

src/VMMigrationService/Resource/ProjectsLocationsSourcesMigratingVms.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
namespace Google\Service\VMMigrationService\Resource;
1919

20+
use Google\Service\VMMigrationService\ExtendMigrationRequest;
2021
use Google\Service\VMMigrationService\FinalizeMigrationRequest;
2122
use Google\Service\VMMigrationService\ListMigratingVmsResponse;
2223
use Google\Service\VMMigrationService\MigratingVm;
@@ -77,6 +78,21 @@ public function delete($name, $optParams = [])
7778
$params = array_merge($params, $optParams);
7879
return $this->call('delete', [$params], Operation::class);
7980
}
81+
/**
82+
* Extend the migrating VM time to live. (migratingVms.extendMigration)
83+
*
84+
* @param string $migratingVm Required. The name of the MigratingVm.
85+
* @param ExtendMigrationRequest $postBody
86+
* @param array $optParams Optional parameters.
87+
* @return Operation
88+
* @throws \Google\Service\Exception
89+
*/
90+
public function extendMigration($migratingVm, ExtendMigrationRequest $postBody, $optParams = [])
91+
{
92+
$params = ['migratingVm' => $migratingVm, 'postBody' => $postBody];
93+
$params = array_merge($params, $optParams);
94+
return $this->call('extendMigration', [$params], Operation::class);
95+
}
8096
/**
8197
* Marks a migration as completed, deleting migration resources that are no
8298
* longer being used. Only applicable after cutover is done.

0 commit comments

Comments
 (0)