From 671aeb761b271e81b535f39877e287f2df59e9af Mon Sep 17 00:00:00 2001 From: dpebot Date: Thu, 27 Sep 2018 04:15:23 -0700 Subject: [PATCH] Re-generate library using /synth.py --- .circleci/npm-install-retry.js | 2 +- .kokoro/presubmit/node8/samples-test.cfg | 7 ++++ .kokoro/presubmit/node8/system-test.cfg | 7 ++++ .kokoro/samples-test.sh | 7 ++++ .kokoro/system-test.sh | 2 + src/v1beta1/asset_service_client.js | 40 +++++++++---------- .../cloud/asset/v1beta1/doc_asset_service.js | 14 +++---- .../google/cloud/asset/v1beta1/doc_assets.js | 8 ++-- src/v1beta1/doc/google/iam/v1/doc_policy.js | 8 ++-- .../doc/google/longrunning/doc_operations.js | 12 +++--- src/v1beta1/doc/google/protobuf/doc_any.js | 2 +- src/v1beta1/doc/google/protobuf/doc_struct.js | 8 ++-- .../doc/google/protobuf/doc_timestamp.js | 2 +- src/v1beta1/doc/google/rpc/doc_status.js | 2 +- 14 files changed, 72 insertions(+), 49 deletions(-) create mode 100644 .kokoro/presubmit/node8/samples-test.cfg create mode 100644 .kokoro/presubmit/node8/system-test.cfg diff --git a/.circleci/npm-install-retry.js b/.circleci/npm-install-retry.js index ae3220d7..3240aa2c 100755 --- a/.circleci/npm-install-retry.js +++ b/.circleci/npm-install-retry.js @@ -6,7 +6,7 @@ let spawn = require('child_process').spawn; //USE: ./index.js [... NPM ARGS] // -let timeout = process.argv[2] || 60000; +let timeout = process.argv[2] || process.env.NPM_INSTALL_TIMEOUT || 60000; let attempts = process.argv[3] || 3; let args = process.argv.slice(4); if (args.length === 0) { diff --git a/.kokoro/presubmit/node8/samples-test.cfg b/.kokoro/presubmit/node8/samples-test.cfg new file mode 100644 index 00000000..21a92121 --- /dev/null +++ b/.kokoro/presubmit/node8/samples-test.cfg @@ -0,0 +1,7 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-asset/.kokoro/samples-test.sh" +} diff --git a/.kokoro/presubmit/node8/system-test.cfg b/.kokoro/presubmit/node8/system-test.cfg new file mode 100644 index 00000000..7b9b84aa --- /dev/null +++ b/.kokoro/presubmit/node8/system-test.cfg @@ -0,0 +1,7 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-asset/.kokoro/system-test.sh" +} diff --git a/.kokoro/samples-test.sh b/.kokoro/samples-test.sh index 76edbbbb..5a81ec01 100755 --- a/.kokoro/samples-test.sh +++ b/.kokoro/samples-test.sh @@ -24,6 +24,13 @@ export GCLOUD_PROJECT=long-door-651 cd $(dirname $0)/.. +# Run a pre-test hook, if a pre-samples-test.sh is in the project +if [ -f .kokoro/pre-samples-test.sh ]; then + set +x + . .kokoro/pre-samples-test.sh + set -x +fi + npm install # Install and link samples diff --git a/.kokoro/system-test.sh b/.kokoro/system-test.sh index a954b794..fd8f0b63 100755 --- a/.kokoro/system-test.sh +++ b/.kokoro/system-test.sh @@ -26,7 +26,9 @@ cd $(dirname $0)/.. # Run a pre-test hook, if a pre-system-test.sh is in the project if [ -f .kokoro/pre-system-test.sh ]; then + set +x . .kokoro/pre-system-test.sh + set -x fi npm install diff --git a/src/v1beta1/asset_service_client.js b/src/v1beta1/asset_service_client.js index c1c1fd40..9a7efa6d 100644 --- a/src/v1beta1/asset_service_client.js +++ b/src/v1beta1/asset_service_client.js @@ -259,13 +259,13 @@ class AssetServiceClient { * * const asset = require('asset.v1beta1'); * - * var client = new asset.v1beta1.AssetServiceClient({ + * const client = new asset.v1beta1.AssetServiceClient({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); - * var outputConfig = {}; - * var request = { + * const formattedParent = client.projectPath('[PROJECT]'); + * const outputConfig = {}; + * const request = { * parent: formattedParent, * outputConfig: outputConfig, * }; @@ -273,29 +273,29 @@ class AssetServiceClient { * // Handle the operation using the promise pattern. * client.exportAssets(request) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { * // The final result of the operation. - * var result = responses[0]; + * const result = responses[0]; * * // The metadata value of the completed operation. - * var metadata = responses[1]; + * const metadata = responses[1]; * * // The response of the api call returning the complete operation. - * var finalApiResponse = responses[2]; + * const finalApiResponse = responses[2]; * }) * .catch(err => { * console.error(err); * }); * - * var formattedParent = client.projectPath('[PROJECT]'); - * var outputConfig = {}; - * var request = { + * const formattedParent = client.projectPath('[PROJECT]'); + * const outputConfig = {}; + * const request = { * parent: formattedParent, * outputConfig: outputConfig, * }; @@ -303,8 +303,8 @@ class AssetServiceClient { * // Handle the operation using the event emitter pattern. * client.exportAssets(request) * .then(responses => { - * var operation = responses[0]; - * var initialApiResponse = responses[1]; + * const operation = responses[0]; + * const initialApiResponse = responses[1]; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. @@ -383,21 +383,21 @@ class AssetServiceClient { * * const asset = require('asset.v1beta1'); * - * var client = new asset.v1beta1.AssetServiceClient({ + * const client = new asset.v1beta1.AssetServiceClient({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); - * var contentType = 'CONTENT_TYPE_UNSPECIFIED'; - * var readTimeWindow = {}; - * var request = { + * const formattedParent = client.projectPath('[PROJECT]'); + * const contentType = 'CONTENT_TYPE_UNSPECIFIED'; + * const readTimeWindow = {}; + * const request = { * parent: formattedParent, * contentType: contentType, * readTimeWindow: readTimeWindow, * }; * client.batchGetAssetsHistory(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { diff --git a/src/v1beta1/doc/google/cloud/asset/v1beta1/doc_asset_service.js b/src/v1beta1/doc/google/cloud/asset/v1beta1/doc_asset_service.js index b6f25fb1..93a2fb93 100644 --- a/src/v1beta1/doc/google/cloud/asset/v1beta1/doc_asset_service.js +++ b/src/v1beta1/doc/google/cloud/asset/v1beta1/doc_asset_service.js @@ -52,7 +52,7 @@ * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.ExportAssetsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/asset_service.proto} */ -var ExportAssetsRequest = { +const ExportAssetsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -76,7 +76,7 @@ var ExportAssetsRequest = { * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.ExportAssetsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/asset_service.proto} */ -var ExportAssetsResponse = { +const ExportAssetsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -113,7 +113,7 @@ var ExportAssetsResponse = { * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/asset_service.proto} */ -var BatchGetAssetsHistoryRequest = { +const BatchGetAssetsHistoryRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -129,7 +129,7 @@ var BatchGetAssetsHistoryRequest = { * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/asset_service.proto} */ -var BatchGetAssetsHistoryResponse = { +const BatchGetAssetsHistoryResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -145,7 +145,7 @@ var BatchGetAssetsHistoryResponse = { * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.OutputConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/asset_service.proto} */ -var OutputConfig = { +const OutputConfig = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -162,7 +162,7 @@ var OutputConfig = { * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.GcsDestination definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/asset_service.proto} */ -var GcsDestination = { +const GcsDestination = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -172,7 +172,7 @@ var GcsDestination = { * @enum {number} * @memberof google.cloud.asset.v1beta1 */ -var ContentType = { +const ContentType = { /** * Unspecified content type. diff --git a/src/v1beta1/doc/google/cloud/asset/v1beta1/doc_assets.js b/src/v1beta1/doc/google/cloud/asset/v1beta1/doc_assets.js index 7214e651..7a84f8bc 100644 --- a/src/v1beta1/doc/google/cloud/asset/v1beta1/doc_assets.js +++ b/src/v1beta1/doc/google/cloud/asset/v1beta1/doc_assets.js @@ -36,7 +36,7 @@ * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.TemporalAsset definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/assets.proto} */ -var TemporalAsset = { +const TemporalAsset = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -58,7 +58,7 @@ var TemporalAsset = { * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.TimeWindow definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/assets.proto} */ -var TimeWindow = { +const TimeWindow = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -90,7 +90,7 @@ var TimeWindow = { * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.Asset definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/assets.proto} */ -var Asset = { +const Asset = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -139,6 +139,6 @@ var Asset = { * @memberof google.cloud.asset.v1beta1 * @see [google.cloud.asset.v1beta1.Resource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/asset/v1beta1/assets.proto} */ -var Resource = { +const Resource = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/src/v1beta1/doc/google/iam/v1/doc_policy.js b/src/v1beta1/doc/google/iam/v1/doc_policy.js index 0163cf59..59fca188 100644 --- a/src/v1beta1/doc/google/iam/v1/doc_policy.js +++ b/src/v1beta1/doc/google/iam/v1/doc_policy.js @@ -74,7 +74,7 @@ * @memberof google.iam.v1 * @see [google.iam.v1.Policy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} */ -var Policy = { +const Policy = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -113,7 +113,7 @@ var Policy = { * @memberof google.iam.v1 * @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} */ -var Binding = { +const Binding = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -129,7 +129,7 @@ var Binding = { * @memberof google.iam.v1 * @see [google.iam.v1.PolicyDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} */ -var PolicyDelta = { +const PolicyDelta = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -157,6 +157,6 @@ var PolicyDelta = { * @memberof google.iam.v1 * @see [google.iam.v1.BindingDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} */ -var BindingDelta = { +const BindingDelta = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/src/v1beta1/doc/google/longrunning/doc_operations.js b/src/v1beta1/doc/google/longrunning/doc_operations.js index 79ef6344..4af5d7d3 100644 --- a/src/v1beta1/doc/google/longrunning/doc_operations.js +++ b/src/v1beta1/doc/google/longrunning/doc_operations.js @@ -58,7 +58,7 @@ * @memberof google.longrunning * @see [google.longrunning.Operation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var Operation = { +const Operation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -72,7 +72,7 @@ var Operation = { * @memberof google.longrunning * @see [google.longrunning.GetOperationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var GetOperationRequest = { +const GetOperationRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -95,7 +95,7 @@ var GetOperationRequest = { * @memberof google.longrunning * @see [google.longrunning.ListOperationsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var ListOperationsRequest = { +const ListOperationsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -114,7 +114,7 @@ var ListOperationsRequest = { * @memberof google.longrunning * @see [google.longrunning.ListOperationsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var ListOperationsResponse = { +const ListOperationsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -128,7 +128,7 @@ var ListOperationsResponse = { * @memberof google.longrunning * @see [google.longrunning.CancelOperationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var CancelOperationRequest = { +const CancelOperationRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -142,6 +142,6 @@ var CancelOperationRequest = { * @memberof google.longrunning * @see [google.longrunning.DeleteOperationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} */ -var DeleteOperationRequest = { +const DeleteOperationRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/src/v1beta1/doc/google/protobuf/doc_any.js b/src/v1beta1/doc/google/protobuf/doc_any.js index c5c5bbaf..3accb1fc 100644 --- a/src/v1beta1/doc/google/protobuf/doc_any.js +++ b/src/v1beta1/doc/google/protobuf/doc_any.js @@ -131,6 +131,6 @@ * @memberof google.protobuf * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} */ -var Any = { +const Any = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/src/v1beta1/doc/google/protobuf/doc_struct.js b/src/v1beta1/doc/google/protobuf/doc_struct.js index efcd8ac5..ddf7e5c9 100644 --- a/src/v1beta1/doc/google/protobuf/doc_struct.js +++ b/src/v1beta1/doc/google/protobuf/doc_struct.js @@ -32,7 +32,7 @@ * @memberof google.protobuf * @see [google.protobuf.Struct definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ -var Struct = { +const Struct = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -72,7 +72,7 @@ var Struct = { * @memberof google.protobuf * @see [google.protobuf.Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ -var Value = { +const Value = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -90,7 +90,7 @@ var Value = { * @memberof google.protobuf * @see [google.protobuf.ListValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ -var ListValue = { +const ListValue = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -103,7 +103,7 @@ var ListValue = { * @enum {number} * @memberof google.protobuf */ -var NullValue = { +const NullValue = { /** * Null value. diff --git a/src/v1beta1/doc/google/protobuf/doc_timestamp.js b/src/v1beta1/doc/google/protobuf/doc_timestamp.js index 51d8f40f..1ebe2e6e 100644 --- a/src/v1beta1/doc/google/protobuf/doc_timestamp.js +++ b/src/v1beta1/doc/google/protobuf/doc_timestamp.js @@ -110,6 +110,6 @@ * @memberof google.protobuf * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} */ -var Timestamp = { +const Timestamp = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/src/v1beta1/doc/google/rpc/doc_status.js b/src/v1beta1/doc/google/rpc/doc_status.js index 7122f168..13cfcab1 100644 --- a/src/v1beta1/doc/google/rpc/doc_status.js +++ b/src/v1beta1/doc/google/rpc/doc_status.js @@ -87,6 +87,6 @@ * @memberof google.rpc * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} */ -var Status = { +const Status = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file