Skip to content

Commit 0e240f1

Browse files
feat: add upgrade appliance method, update other methods (#53)
* feat: Rename product feat: API updates PiperOrigin-RevId: 461817256 Source-Link: googleapis/googleapis@215f812 Source-Link: googleapis/googleapis-gen@89d4421 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODlkNDQyMTBhNDE4ZjUxOWM1MGI3OGJmMmI2YmJlMjExOWZlYTUyMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 643ef92 commit 0e240f1

17 files changed

+6608
-3346
lines changed

packages/google-cloud-vmmigration/protos/google/cloud/vmmigration/v1/vmmigration.proto

+446-201
Large diffs are not rendered by default.

packages/google-cloud-vmmigration/protos/protos.d.ts

+652-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-vmmigration/protos/protos.js

+4,679-3,011
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-vmmigration/protos/protos.json

+239-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata.google.cloud.vmmigration.v1.json

+54-2
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,50 @@
687687
}
688688
}
689689
},
690+
{
691+
"regionTag": "vmmigration_v1_generated_VmMigration_UpgradeAppliance_async",
692+
"title": "VmMigration upgradeAppliance Sample",
693+
"origin": "API_DEFINITION",
694+
"description": " Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.",
695+
"canonical": true,
696+
"file": "vm_migration.upgrade_appliance.js",
697+
"language": "JAVASCRIPT",
698+
"segments": [
699+
{
700+
"start": 25,
701+
"end": 65,
702+
"type": "FULL"
703+
}
704+
],
705+
"clientMethod": {
706+
"shortName": "UpgradeAppliance",
707+
"fullName": "google.cloud.vmmigration.v1.VmMigration.UpgradeAppliance",
708+
"async": true,
709+
"parameters": [
710+
{
711+
"name": "datacenter_connector",
712+
"type": "TYPE_STRING"
713+
},
714+
{
715+
"name": "request_id",
716+
"type": "TYPE_STRING"
717+
}
718+
],
719+
"resultType": ".google.longrunning.Operation",
720+
"client": {
721+
"shortName": "VmMigrationClient",
722+
"fullName": "google.cloud.vmmigration.v1.VmMigrationClient"
723+
},
724+
"method": {
725+
"shortName": "UpgradeAppliance",
726+
"fullName": "google.cloud.vmmigration.v1.VmMigration.UpgradeAppliance",
727+
"service": {
728+
"shortName": "VmMigration",
729+
"fullName": "google.cloud.vmmigration.v1.VmMigration"
730+
}
731+
}
732+
}
733+
},
690734
{
691735
"regionTag": "vmmigration_v1_generated_VmMigration_CreateMigratingVm_async",
692736
"title": "VmMigration createMigratingVm Sample",
@@ -750,7 +794,7 @@
750794
"segments": [
751795
{
752796
"start": 25,
753-
"end": 75,
797+
"end": 79,
754798
"type": "FULL"
755799
}
756800
],
@@ -778,6 +822,10 @@
778822
{
779823
"name": "order_by",
780824
"type": "TYPE_STRING"
825+
},
826+
{
827+
"name": "view",
828+
"type": ".google.cloud.vmmigration.v1.MigratingVmView"
781829
}
782830
],
783831
"resultType": ".google.cloud.vmmigration.v1.ListMigratingVmsResponse",
@@ -806,7 +854,7 @@
806854
"segments": [
807855
{
808856
"start": 25,
809-
"end": 50,
857+
"end": 54,
810858
"type": "FULL"
811859
}
812860
],
@@ -818,6 +866,10 @@
818866
{
819867
"name": "name",
820868
"type": "TYPE_STRING"
869+
},
870+
{
871+
"name": "view",
872+
"type": ".google.cloud.vmmigration.v1.MigratingVmView"
821873
}
822874
],
823875
"resultType": ".google.cloud.vmmigration.v1.MigratingVm",

packages/google-cloud-vmmigration/samples/generated/v1/vm_migration.create_utilization_report.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ function main(parent, utilizationReport, utilizationReportId) {
3434
*/
3535
// const utilizationReport = {}
3636
/**
37-
* Required. The ID to use for the report, which will become the final component of
38-
* the reports's resource name.
37+
* Required. The ID to use for the report, which will become the final
38+
* component of the reports's resource name.
3939
* This value maximum length is 63 characters, and valid characters
4040
* are /[a-z][0-9]-/. It must start with an english letter and must not
4141
* end with a hyphen.

packages/google-cloud-vmmigration/samples/generated/v1/vm_migration.get_migrating_vm.js

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ function main(name) {
2929
* Required. The name of the MigratingVm.
3030
*/
3131
// const name = 'abc123'
32+
/**
33+
* Optional. The level of details of the migrating VM.
34+
*/
35+
// const view = {}
3236

3337
// Imports the Vmmigration library
3438
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

packages/google-cloud-vmmigration/samples/generated/v1/vm_migration.list_clone_jobs.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ function main(parent, pageToken) {
3030
*/
3131
// const parent = 'abc123'
3232
/**
33-
* Optional. The maximum number of clone jobs to return. The service may return
34-
* fewer than this value. If unspecified, at most 500 clone jobs will be
35-
* returned. The maximum value is 1000; values above 1000 will be coerced to
36-
* 1000.
33+
* Optional. The maximum number of clone jobs to return. The service may
34+
* return fewer than this value. If unspecified, at most 500 clone jobs will
35+
* be returned. The maximum value is 1000; values above 1000 will be coerced
36+
* to 1000.
3737
*/
3838
// const pageSize = 1234
3939
/**

packages/google-cloud-vmmigration/samples/generated/v1/vm_migration.list_cutover_jobs.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ function main(parent, pageToken) {
3030
*/
3131
// const parent = 'abc123'
3232
/**
33-
* Optional. The maximum number of cutover jobs to return. The service may return
34-
* fewer than this value. If unspecified, at most 500 cutover jobs will be
35-
* returned. The maximum value is 1000; values above 1000 will be coerced to
36-
* 1000.
33+
* Optional. The maximum number of cutover jobs to return. The service may
34+
* return fewer than this value. If unspecified, at most 500 cutover jobs will
35+
* be returned. The maximum value is 1000; values above 1000 will be coerced
36+
* to 1000.
3737
*/
3838
// const pageSize = 1234
3939
/**

packages/google-cloud-vmmigration/samples/generated/v1/vm_migration.list_datacenter_connectors.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ function main(parent, pageToken) {
3030
*/
3131
// const parent = 'abc123'
3232
/**
33-
* Optional. The maximum number of connectors to return. The service may return
34-
* fewer than this value. If unspecified, at most 500 sources will be
33+
* Optional. The maximum number of connectors to return. The service may
34+
* return fewer than this value. If unspecified, at most 500 sources will be
3535
* returned. The maximum value is 1000; values above 1000 will be coerced to
3636
* 1000.
3737
*/
3838
// const pageSize = 1234
3939
/**
40-
* Required. A page token, received from a previous `ListDatacenterConnectors` call.
41-
* Provide this to retrieve the subsequent page.
40+
* Required. A page token, received from a previous `ListDatacenterConnectors`
41+
* call. Provide this to retrieve the subsequent page.
4242
* When paginating, all other parameters provided to
4343
* `ListDatacenterConnectors` must match the call that provided the page
4444
* token.

packages/google-cloud-vmmigration/samples/generated/v1/vm_migration.list_migrating_vms.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ function main(parent, pageToken) {
3030
*/
3131
// const parent = 'abc123'
3232
/**
33-
* Optional. The maximum number of migrating VMs to return. The service may return
34-
* fewer than this value. If unspecified, at most 500 migrating VMs will be
35-
* returned. The maximum value is 1000; values above 1000 will be coerced to
36-
* 1000.
33+
* Optional. The maximum number of migrating VMs to return. The service may
34+
* return fewer than this value. If unspecified, at most 500 migrating VMs
35+
* will be returned. The maximum value is 1000; values above 1000 will be
36+
* coerced to 1000.
3737
*/
3838
// const pageSize = 1234
3939
/**
@@ -51,6 +51,10 @@ function main(parent, pageToken) {
5151
* Optional. the order by fields for the result.
5252
*/
5353
// const orderBy = 'abc123'
54+
/**
55+
* Optional. The level of details of each migrating VM.
56+
*/
57+
// const view = {}
5458

5559
// Imports the Vmmigration library
5660
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

packages/google-cloud-vmmigration/samples/generated/v1/vm_migration.list_utilization_reports.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ function main(parent, pageToken) {
4242
*/
4343
// const pageSize = 1234
4444
/**
45-
* Required. A page token, received from a previous `ListUtilizationReports` call.
46-
* Provide this to retrieve the subsequent page.
45+
* Required. A page token, received from a previous `ListUtilizationReports`
46+
* call. Provide this to retrieve the subsequent page.
4747
* When paginating, all other parameters provided to `ListUtilizationReports`
4848
* must match the call that provided the page token.
4949
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(datacenterConnector) {
24+
// [START vmmigration_v1_generated_VmMigration_UpgradeAppliance_async]
25+
/**
26+
* TODO(developer): Uncomment these variables before running the sample.
27+
*/
28+
/**
29+
* Required. The DatacenterConnector name.
30+
*/
31+
// const datacenterConnector = 'abc123'
32+
/**
33+
* A request ID to identify requests. Specify a unique request ID
34+
* so that if you must retry your request, the server will know to ignore
35+
* the request if it has already been completed. The server will guarantee
36+
* that for at least 60 minutes after the first request.
37+
* For example, consider a situation where you make an initial request and t
38+
* he request times out. If you make the request again with the same request
39+
* ID, the server can check if original operation with the same request ID
40+
* was received, and if so, will ignore the second request. This prevents
41+
* clients from accidentally creating duplicate commitments.
42+
* The request ID must be a valid UUID with the exception that zero UUID is
43+
* not supported (00000000-0000-0000-0000-000000000000).
44+
*/
45+
// const requestId = 'abc123'
46+
47+
// Imports the Vmmigration library
48+
const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;
49+
50+
// Instantiates a client
51+
const vmmigrationClient = new VmMigrationClient();
52+
53+
async function callUpgradeAppliance() {
54+
// Construct request
55+
const request = {
56+
datacenterConnector,
57+
};
58+
59+
// Run request
60+
const [operation] = await vmmigrationClient.upgradeAppliance(request);
61+
const [response] = await operation.promise();
62+
console.log(response);
63+
}
64+
65+
callUpgradeAppliance();
66+
// [END vmmigration_v1_generated_VmMigration_UpgradeAppliance_async]
67+
}
68+
69+
process.on('unhandledRejection', err => {
70+
console.error(err.message);
71+
process.exitCode = 1;
72+
});
73+
main(...process.argv.slice(2));

packages/google-cloud-vmmigration/src/v1/gapic_metadata.json

+10
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@
9090
"deleteDatacenterConnector"
9191
]
9292
},
93+
"UpgradeAppliance": {
94+
"methods": [
95+
"upgradeAppliance"
96+
]
97+
},
9398
"CreateMigratingVm": {
9499
"methods": [
95100
"createMigratingVm"
@@ -326,6 +331,11 @@
326331
"deleteDatacenterConnector"
327332
]
328333
},
334+
"UpgradeAppliance": {
335+
"methods": [
336+
"upgradeAppliance"
337+
]
338+
},
329339
"CreateMigratingVm": {
330340
"methods": [
331341
"createMigratingVm"

0 commit comments

Comments
 (0)