Skip to content

Commit

Permalink
build: use fully qualified request type name in tests (#786)
Browse files Browse the repository at this point in the history
* feat: accept google-gax instance as a parameter

Please see the documentation of the client constructor for details.

PiperOrigin-RevId: 470332808

Source-Link: googleapis/googleapis@d4a2367

Source-Link: googleapis/googleapis-gen@e97a1ac
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix: use _gaxModule when accessing gax for bundling

PiperOrigin-RevId: 470911839

Source-Link: googleapis/googleapis@3527566

Source-Link: googleapis/googleapis-gen@f16a1d2
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: Update Compute Engine API to revision 20220831 (#729)

Source-Link: googleapis/googleapis@63c3007

Source-Link: googleapis/googleapis-gen@b658223
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY1ODIyMzFhZTdiN2Y1Y2QxOGY3ZDE0MmM2NTQyMTc3M2NjYTVkZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: use gapic-generator-typescript v2.17.0

PiperOrigin-RevId: 474338479

Source-Link: googleapis/googleapis@d5d35e0

Source-Link: googleapis/googleapis-gen@efcd3f9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* test: use fully qualified request type name in tests

PiperOrigin-RevId: 475685359

Source-Link: googleapis/googleapis@7a12973

Source-Link: googleapis/googleapis-gen@370c729
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9

* 🦉 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>
Co-authored-by: Alexander Fenster <[email protected]>
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 22, 2022
1 parent 29543d4 commit 419d09b
Show file tree
Hide file tree
Showing 224 changed files with 85,988 additions and 38,454 deletions.

Large diffs are not rendered by default.

4,033 changes: 4,033 additions & 0 deletions packages/google-cloud-compute/protos/protos.d.ts

Large diffs are not rendered by default.

14,020 changes: 12,082 additions & 1,938 deletions packages/google-cloud-compute/protos/protos.js

Large diffs are not rendered by default.

2,522 changes: 2,190 additions & 332 deletions packages/google-cloud-compute/protos/protos.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(project, region, regionSetLabelsRequestResource, resource) {
// [START compute_v1_generated_Addresses_SetLabels_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Project ID for this request.
*/
// const project = 'my-project'
/**
* The region for this request.
*/
// const region = 'us-central1'
/**
* The body resource for this request
*/
// const regionSetLabelsRequestResource = {}
/**
* An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Name or id of the resource for this request.
*/
// const resource = 'abc123'

// Imports the Compute library
const {AddressesClient} = require('@google-cloud/compute').v1;

// Instantiates a client
const computeClient = new AddressesClient();

async function callSetLabels() {
// Construct request
const request = {
project,
region,
regionSetLabelsRequestResource,
resource,
};

// Run request
const response = await computeClient.setLabels(request);
console.log(response);
}

callSetLabels();
// [END compute_v1_generated_Addresses_SetLabels_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(project, resource) {
// [START compute_v1_generated_BackendServices_GetIamPolicy_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Requested IAM Policy version.
*/
// const optionsRequestedPolicyVersion = 1234
/**
* Project ID for this request.
*/
// const project = 'my-project'
/**
* Name or id of the resource for this request.
*/
// const resource = 'abc123'

// Imports the Compute library
const {BackendServicesClient} = require('@google-cloud/compute').v1;

// Instantiates a client
const computeClient = new BackendServicesClient();

async function callGetIamPolicy() {
// Construct request
const request = {
project,
resource,
};

// Run request
const response = await computeClient.getIamPolicy(request);
console.log(response);
}

callGetIamPolicy();
// [END compute_v1_generated_BackendServices_GetIamPolicy_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(globalSetPolicyRequestResource, project, resource) {
// [START compute_v1_generated_BackendServices_SetIamPolicy_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The body resource for this request
*/
// const globalSetPolicyRequestResource = {}
/**
* Project ID for this request.
*/
// const project = 'my-project'
/**
* Name or id of the resource for this request.
*/
// const resource = 'abc123'

// Imports the Compute library
const {BackendServicesClient} = require('@google-cloud/compute').v1;

// Instantiates a client
const computeClient = new BackendServicesClient();

async function callSetIamPolicy() {
// Construct request
const request = {
globalSetPolicyRequestResource,
project,
resource,
};

// Run request
const response = await computeClient.setIamPolicy(request);
console.log(response);
}

callSetIamPolicy();
// [END compute_v1_generated_BackendServices_SetIamPolicy_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(globalSetLabelsRequestResource, project, resource) {
// [START compute_v1_generated_GlobalAddresses_SetLabels_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The body resource for this request
*/
// const globalSetLabelsRequestResource = {}
/**
* Project ID for this request.
*/
// const project = 'my-project'
/**
* Name or id of the resource for this request.
*/
// const resource = 'abc123'

// Imports the Compute library
const {GlobalAddressesClient} = require('@google-cloud/compute').v1;

// Instantiates a client
const computeClient = new GlobalAddressesClient();

async function callSetLabels() {
// Construct request
const request = {
globalSetLabelsRequestResource,
project,
resource,
};

// Run request
const response = await computeClient.setLabels(request);
console.log(response);
}

callSetLabels();
// [END compute_v1_generated_GlobalAddresses_SetLabels_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(project, region, regionSetLabelsRequestResource, resource) {
// [START compute_v1_generated_InterconnectAttachments_SetLabels_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Project ID for this request.
*/
// const project = 'my-project'
/**
* The region for this request.
*/
// const region = 'us-central1'
/**
* The body resource for this request
*/
// const regionSetLabelsRequestResource = {}
/**
* An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Name or id of the resource for this request.
*/
// const resource = 'abc123'

// Imports the Compute library
const {InterconnectAttachmentsClient} = require('@google-cloud/compute').v1;

// Instantiates a client
const computeClient = new InterconnectAttachmentsClient();

async function callSetLabels() {
// Construct request
const request = {
project,
region,
regionSetLabelsRequestResource,
resource,
};

// Run request
const response = await computeClient.setLabels(request);
console.log(response);
}

callSetLabels();
// [END compute_v1_generated_InterconnectAttachments_SetLabels_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Loading

0 comments on commit 419d09b

Please sign in to comment.