diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7eb1366cf5db..642af919ab0e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -15,3 +15,4 @@ /handwritten/bigquery-storage @googleapis/bigquery-team /handwritten/pubsub @googleapis/pubsub-team /handwritten/bigtable @googleapis/bigtable-team +/core/packages/google-auth-library-nodejs @googleapis/aion-team diff --git a/.github/scripts/package.json b/.github/scripts/package.json index b932784c1a70..e7b5938e5528 100644 --- a/.github/scripts/package.json +++ b/.github/scripts/package.json @@ -18,6 +18,6 @@ "devDependencies": { "@octokit/rest": "^19.0.0", "mocha": "^10.0.0", - "sinon": "^21.0.0" + "sinon": "21.0.3" } } diff --git a/.github/workflows/system-tests-against-emulator.yaml b/.github/workflows/system-tests-against-emulator.yaml index 797c7f958c61..fc74ff8c4987 100644 --- a/.github/workflows/system-tests-against-emulator.yaml +++ b/.github/workflows/system-tests-against-emulator.yaml @@ -31,4 +31,4 @@ # working-directory: handwritten/spanner # env: # SPANNER_EMULATOR_HOST: localhost:9010 -# GCLOUD_PROJECT: emulator-test-project +# GCLOUD_PROJECT: emulator-test-project \ No newline at end of file diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 995336ff3f4e..1899f69267eb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -19,7 +19,7 @@ "core/precise-date": "5.0.0", "core/projectify": "5.0.0", "core/promisify": "5.0.0", - "handwritten/bigquery": "8.2.0", + "handwritten/bigquery": "8.3.0", "handwritten/bigquery-storage": "5.1.0", "handwritten/bigtable": "6.5.0", "handwritten/cloud-profiler": "6.0.4", @@ -30,7 +30,7 @@ "handwritten/logging-bunyan": "5.1.1", "handwritten/logging-winston": "6.0.1", "handwritten/pubsub": "5.3.0", - "handwritten/spanner": "8.6.0", + "handwritten/spanner": "8.7.0", "handwritten/storage": "7.19.0", "packages/gapic-node-processing": "0.1.7", "packages/google-ads-admanager": "0.5.0", @@ -50,7 +50,7 @@ "packages/google-chat": "0.23.0", "packages/google-cloud-accessapproval": "4.2.1", "packages/google-cloud-advisorynotifications": "2.2.1", - "packages/google-cloud-aiplatform": "6.5.0", + "packages/google-cloud-aiplatform": "6.6.0", "packages/google-cloud-alloydb": "2.5.0", "packages/google-cloud-apigateway": "4.2.1", "packages/google-cloud-apigeeconnect": "4.2.1", @@ -75,7 +75,7 @@ "packages/google-cloud-bigquery-datapolicies": "2.3.1", "packages/google-cloud-bigquery-datatransfer": "5.1.2", "packages/google-cloud-bigquery-migration": "2.1.1", - "packages/google-cloud-bigquery-reservation": "4.3.0", + "packages/google-cloud-bigquery-reservation": "4.4.0", "packages/google-cloud-billing": "5.1.1", "packages/google-cloud-billing-budgets": "6.1.1", "packages/google-cloud-binaryauthorization": "4.4.0", @@ -90,7 +90,7 @@ "packages/google-cloud-commerce-consumer-procurement": "0.7.1", "packages/google-cloud-compute": "6.9.0", "packages/google-cloud-confidentialcomputing": "2.2.2", - "packages/google-cloud-config": "0.11.1", + "packages/google-cloud-config": "0.12.0", "packages/google-cloud-configdelivery": "0.1.1", "packages/google-cloud-connectors": "0.5.1", "packages/google-cloud-contactcenterinsights": "4.1.1", @@ -100,7 +100,7 @@ "packages/google-cloud-dataform": "2.2.1", "packages/google-cloud-datafusion": "4.1.1", "packages/google-cloud-datalabeling": "5.1.1", - "packages/google-cloud-dataplex": "5.4.0", + "packages/google-cloud-dataplex": "5.5.0", "packages/google-cloud-dataproc": "6.3.0", "packages/google-cloud-dataqna": "4.1.1", "packages/google-cloud-datastream": "4.3.1", @@ -134,7 +134,7 @@ "packages/google-cloud-ids": "4.2.1", "packages/google-cloud-iot": "5.2.1", "packages/google-cloud-kms": "5.4.0", - "packages/google-cloud-kms-inventory": "2.5.0", + "packages/google-cloud-kms-inventory": "2.6.0", "packages/google-cloud-language": "7.2.1", "packages/google-cloud-licensemanager": "0.1.1", "packages/google-cloud-lifesciences": "4.2.1", @@ -200,7 +200,7 @@ "packages/google-cloud-texttospeech": "6.4.0", "packages/google-cloud-tpu": "4.1.1", "packages/google-cloud-translate": "9.4.0", - "packages/google-cloud-vectorsearch": "0.5.0", + "packages/google-cloud-vectorsearch": "0.6.0", "packages/google-cloud-video-livestream": "2.2.1", "packages/google-cloud-video-stitcher": "3.2.1", "packages/google-cloud-video-transcoder": "4.4.1", diff --git a/changelog.json b/changelog.json index 2a77ae4fb155..2fd8c4e71c49 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,299 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "fix", + "sha": "4c8239955def8cf8f8915ff4254eae70b2abed31", + "message": "trigger release", + "issues": [], + "scope": "spanner" + }, + { + "type": "fix", + "sha": "2280f7aeab96b9911efc3673dd084e3d9f831d9b", + "message": "type conflict between @sinonjs/fake-timers and @types/sinonjs__fake-timers", + "issues": [], + "scope": "spanner" + }, + { + "type": "fix", + "sha": "6d513f93d0126198b4eb3867c4f5809422e467fe", + "message": "resolve type conflicts between @types/sinon and @sinonjs/fake-timers", + "issues": [], + "scope": "spanner" + }, + { + "type": "fix", + "sha": "4d597690ad90f9cf7c3c2aa9611029beaa599703", + "message": "enable afe_connectivity_error_count metric", + "issues": [ + "7964" + ], + "scope": "spanner" + }, + { + "type": "fix", + "sha": "16971e7ab08a54cfc1b57b17ee75800aa1dcedee", + "message": "override gcp-metadata to resolve punycode deprecation](https://github.com/googleapis/google-cloud-node/pull/7815#top)", + "issues": [], + "scope": "spanner" + }, + { + "type": "fix", + "sha": "01d1d9e8f89d6ad79da8b1c790e13eab176e932f", + "message": "override gcp-metadata to resolve punycode deprecation](https://github.com/googleapis/google-cloud-node/pull/7815#top)", + "issues": [], + "scope": "spanner" + }, + { + "type": "fix", + "sha": "c717550789a731c629003908acd713c44f170c23", + "message": "override gcp-metadata to resolve punycode deprecation](https://github.com/googleapis/google-cloud-node/pull/7815#top)", + "issues": [], + "scope": "spanner" + }, + { + "type": "feat", + "sha": "f1650a8095cbe6023a9b23aa3264f7f19edaba19", + "message": "add SI, adapt, split point related proto", + "issues": [ + "2527" + ] + }, + { + "type": "feat", + "sha": "184684f669f97835af88ac9d4101320732d65683", + "message": "include cache updates into the ResultSet response", + "issues": [ + "2519" + ], + "scope": "spanner" + } + ], + "version": "8.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/spanner", + "id": "d844e87e-e75b-4513-950c-1fe8eeda719d", + "createTime": "2026-04-14T23:04:28.521Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "7fad2f6e2ef0b16ab87a92ae471136fe6f2655ef", + "message": "Unblock the releases on Node Bigquery", + "issues": [ + "7946" + ] + }, + { + "type": "feat", + "sha": "e500d4077065529fbdee4be565434a34b6643c09", + "message": "Allow the user to ask for skipping parsing rows when querying", + "issues": [ + "7848" + ], + "scope": "bigquery" + } + ], + "version": "8.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery", + "id": "95c0b159-cdba-4b27-9c19-e99b2535868f", + "createTime": "2026-04-09T15:40:48.837Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "460e654682993b5d0e9b20ef12e92f40d106ecf9", + "message": "[vectorsearch] Added CMEK support", + "issues": [ + "8033" + ] + } + ], + "version": "0.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/vectorsearch", + "id": "6c5dba96-2dd9-4edd-961f-19ff6f2dc679", + "createTime": "2026-04-14T18:40:56.396Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "71be7d38a621ddbb5435115132aa98167a9231d3", + "message": "[inventory] support external-μ in the Digest", + "issues": [ + "8015" + ] + } + ], + "version": "2.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/kms-inventory", + "id": "e91661b3-84a1-4540-b481-7239b885c156", + "createTime": "2026-04-14T18:40:56.378Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c75e5b6c00aff1eda45f1ea0ca0e71bd72748452", + "message": "[dataplex] Allow Data Documentation DataScans to support BigQuery Dataset resources in addition to BigQuery table resources", + "issues": [ + "8012" + ] + } + ], + "version": "5.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataplex", + "id": "176d035c-22d8-4e16-88e2-3d7ff10a953e", + "createTime": "2026-04-14T18:40:56.362Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "3879a1647ec14adfe6296a4afc5f270bb2a0bc5c", + "message": "[config] adding DeploymentGroups, you can now manage deployment of multiple module root dependencies in a single DAG", + "issues": [ + "7994" + ] + } + ], + "version": "0.12.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/config", + "id": "811e3c11-2e02-4503-b9ac-5371a8bbc8b9", + "createTime": "2026-04-14T18:40:56.347Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "4e5f42cae475b0529fb3a10df609b3a52a25eadf", + "message": "[bigquery-reservation] add principal field to BigQuery Reservation Assignment", + "issues": [ + "8042" + ] + } + ], + "version": "4.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-reservation", + "id": "cca9dfa9-9b12-4798-9226-f8183afeeee1", + "createTime": "2026-04-14T18:40:56.327Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add new `embed_content_config` to message `EmbedContentRequest`", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add new `embed_content_config` to message `EmbedContentRequest`", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Update the schema proto for the RagChunk with file_id and chunk_id to align with the vertex_rag_data.proto", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "RagMetadata and RagDataSchema concepts and Batch API definitions added for Preview", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add raw_event field to event proto v1", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add custom session id field to create session v1", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add custom memory id field to create memory v1beta1", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add raw_event field to event proto v1beta1", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add custom session id field to create session v1beta1", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add AskContexts and AsyncRetrieveContexts APIs to VertexRagService", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add AskContexts and AsyncRetrieveContexts APIs to VertexRagService", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "A new field `evaluation_run` is added to message `.google.cloud.aiplatform.v1beta1.EvaluateDatasetRun`", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "A new field `inference_generation_config` is added to message `.google.cloud.aiplatform.v1beta1.EvaluationConfig`", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add image_spec to Reasoning Engine public protos", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add image_spec to Reasoning Engine public protos", + "issues": [] + }, + { + "type": "feat", + "sha": "adee1ec57fc5feb09ae46d1c6103367e697094d7", + "message": "Add transcription fields to Session Service", + "issues": [] + } + ], + "version": "6.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "98c38b26-e4f0-46cb-99f0-f06ca01c7835", + "createTime": "2026-04-14T18:40:56.307Z" + }, { "changes": [ { @@ -69783,5 +70076,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2026-04-13T20:17:24.690Z" + "updateTime": "2026-04-14T23:04:28.521Z" } \ No newline at end of file diff --git a/containers/node-bootstrap-container/package.json b/containers/node-bootstrap-container/package.json index 7fbda8a1242f..30acde7e95a3 100644 --- a/containers/node-bootstrap-container/package.json +++ b/containers/node-bootstrap-container/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "mocha": "^9.0.0", - "sinon": "^21.0.0", + "sinon": "21.0.3", "snap-shot-it": "^7.9.6" } } diff --git a/core/packages/gax/package.json b/core/packages/gax/package.json index 962c63af7bf5..dd67e50253a0 100644 --- a/core/packages/gax/package.json +++ b/core/packages/gax/package.json @@ -52,7 +52,7 @@ "pdfmake": "^0.2.18", "proxyquire": "^2.1.3", "pumpify": "^2.0.1", - "sinon": "^21.0.0", + "sinon": "21.0.3", "stream-events": "^1.0.5", "ts-loader": "^9.5.2", "typescript": "5.8.3", diff --git a/core/packages/gaxios/package.json b/core/packages/gaxios/package.json index 072a2992a4bd..1c368af76698 100644 --- a/core/packages/gaxios/package.json +++ b/core/packages/gaxios/package.json @@ -90,7 +90,7 @@ "null-loader": "^4.0.1", "pack-n-play": "^4.0.0", "puppeteer": "^24.0.0", - "sinon": "^21.0.0", + "sinon": "21.0.3", "stream-browserify": "^3.0.0", "tmp": "0.2.5", "ts-loader": "^9.5.2", diff --git a/core/packages/gcp-metadata/package.json b/core/packages/gcp-metadata/package.json index 556f71700175..98ecf340e6d4 100644 --- a/core/packages/gcp-metadata/package.json +++ b/core/packages/gcp-metadata/package.json @@ -66,7 +66,7 @@ "mocha": "^11.1.0", "ncp": "^2.0.0", "nock": "^14.0.5", - "sinon": "^21.0.0", + "sinon": "21.0.3", "tmp": "0.2.5", "typescript": "5.8.3" }, diff --git a/core/packages/google-auth-library-nodejs/package.json b/core/packages/google-auth-library-nodejs/package.json index f75093f5d5fa..635b9febbb1e 100644 --- a/core/packages/google-auth-library-nodejs/package.json +++ b/core/packages/google-auth-library-nodejs/package.json @@ -58,7 +58,7 @@ "nock": "^14.0.5", "null-loader": "^4.0.1", "puppeteer": "^24.0.0", - "sinon": "^21.0.0", + "sinon": "21.0.3", "ts-loader": "^9.5.2", "typescript": "5.8.3", "webpack": "^5.97.1", diff --git a/core/packages/logging-utils/package.json b/core/packages/logging-utils/package.json index 21992279a3e9..c8d2e21821da 100644 --- a/core/packages/logging-utils/package.json +++ b/core/packages/logging-utils/package.json @@ -35,7 +35,7 @@ "c8": "^10.1.3", "gts": "^6.0.2", "mocha": "^11.1.0", - "sinon": "^21.0.0", + "sinon": "21.0.3", "typescript": "5.8.3" }, "bugs": { diff --git a/core/packages/nodejs-googleapis-common/package.json b/core/packages/nodejs-googleapis-common/package.json index 4017ff096613..35af48643cff 100644 --- a/core/packages/nodejs-googleapis-common/package.json +++ b/core/packages/nodejs-googleapis-common/package.json @@ -82,7 +82,7 @@ "path-to-regexp": "^6.0.0", "proxyquire": "^2.1.3", "puppeteer": "^24.0.0", - "sinon": "^21.0.0", + "sinon": "21.0.3", "tmp": "0.2.5", "ts-loader": "^9.5.2", "typescript": "5.8.3", diff --git a/core/packages/nodejs-proto-files/package.json b/core/packages/nodejs-proto-files/package.json index eb8cfa622efd..0b775456103b 100644 --- a/core/packages/nodejs-proto-files/package.json +++ b/core/packages/nodejs-proto-files/package.json @@ -63,7 +63,7 @@ "linkinator": "^6.1.2", "mocha": "^11.1.0", "proxyquire": "^2.1.3", - "sinon": "^21.0.0", + "sinon": "21.0.3", "typescript": "5.8.3" }, "homepage": "https://github.com/googleapis/google-cloud-node-core/tree/main/packages/nodejs-proto-files" diff --git a/handwritten/bigquery-storage/package.json b/handwritten/bigquery-storage/package.json index a095062f6e3f..83a62a5ed7bd 100644 --- a/handwritten/bigquery-storage/package.json +++ b/handwritten/bigquery-storage/package.json @@ -63,7 +63,7 @@ "null-loader": "^4.0.1", "pack-n-play": "^4.0.0", "path-to-regexp": "^8.2.0", - "sinon": "^21.0.0", + "sinon": "21.0.3", "ts-loader": "^9.5.2", "typescript": "^5.8.2", "uuid": "^11.1.0", diff --git a/handwritten/bigquery/CHANGELOG.md b/handwritten/bigquery/CHANGELOG.md index ca9535258ba6..f5a26a41d759 100644 --- a/handwritten/bigquery/CHANGELOG.md +++ b/handwritten/bigquery/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/@google-cloud/bigquery?activeTab=versions +## [8.3.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-v8.2.0...bigquery-v8.3.0) (2026-04-09) + + +### Features + +* **bigquery:** Allow the user to ask for skipping parsing rows when querying ([#7848](https://github.com/googleapis/google-cloud-node/issues/7848)) ([e500d40](https://github.com/googleapis/google-cloud-node/commit/e500d4077065529fbdee4be565434a34b6643c09)) + + +### Bug Fixes + +* Unblock the releases on Node Bigquery ([#7946](https://github.com/googleapis/google-cloud-node/issues/7946)) ([7fad2f6](https://github.com/googleapis/google-cloud-node/commit/7fad2f6e2ef0b16ab87a92ae471136fe6f2655ef)) + ## [8.2.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-v8.1.1...bigquery-v8.2.0) (2026-02-19) diff --git a/handwritten/bigquery/owlbot.py b/handwritten/bigquery/owlbot.py index 8a8ba78a8355..4193886d7c7c 100644 --- a/handwritten/bigquery/owlbot.py +++ b/handwritten/bigquery/owlbot.py @@ -25,5 +25,6 @@ ] ) -# Regenerate Discovery types. -shell.run(('npm','run','types')) +# Install dependencies and regenerate Discovery types. +shell.run(('npm', 'install'), cwd='handwritten/bigquery') +shell.run(('npm', 'run', 'types'), cwd='handwritten/bigquery') diff --git a/handwritten/bigquery/package.json b/handwritten/bigquery/package.json index e0e3039084d3..5d3e94723a93 100644 --- a/handwritten/bigquery/package.json +++ b/handwritten/bigquery/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/bigquery", "description": "Google BigQuery Client Library for Node.js", - "version": "8.2.0", + "version": "8.3.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -93,7 +93,7 @@ "path-to-regexp": "^8.2.0", "prettier": "^3.5.3", "proxyquire": "^2.1.3", - "sinon": "^21.0.0", + "sinon": "21.0.3", "typescript": "^5.8.2" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/handwritten/bigquery" diff --git a/handwritten/firestore/dev/system-test/firestore.ts b/handwritten/firestore/dev/system-test/firestore.ts index dcb85a73e558..8fb04ac61ea5 100644 --- a/handwritten/firestore/dev/system-test/firestore.ts +++ b/handwritten/firestore/dev/system-test/firestore.ts @@ -105,8 +105,8 @@ if (process.env.NODE_ENV === 'DEBUG') { export function getTestDb(settings: Settings = {}): Firestore { const internalSettings: Settings = {}; - if (process.env.FIRESTORE_NAMED_DATABASE) { - internalSettings.databaseId = process.env.FIRESTORE_NAMED_DATABASE; + if (process.env.FIRESTORE_DATABASE_ID) { + internalSettings.databaseId = process.env.FIRESTORE_DATABASE_ID; } if (process.env.FIRESTORE_TARGET_BACKEND) { diff --git a/handwritten/firestore/dev/system-test/tracing.ts b/handwritten/firestore/dev/system-test/tracing.ts index bd78b9a0acb4..76a7469040f1 100644 --- a/handwritten/firestore/dev/system-test/tracing.ts +++ b/handwritten/firestore/dev/system-test/tracing.ts @@ -286,8 +286,8 @@ describe.skipEnterprise('Tracing Tests', () => { }; // Named-database tests use an environment variable to specify the database ID. Add it to the settings. - if (process.env.FIRESTORE_NAMED_DATABASE) { - settings.databaseId = process.env.FIRESTORE_NAMED_DATABASE; + if (process.env.FIRESTORE_DATABASE_ID) { + settings.databaseId = process.env.FIRESTORE_DATABASE_ID; } // If a database ID has not been specified in the settings, check whether // it's been specified using an environment variable. diff --git a/handwritten/firestore/package.json b/handwritten/firestore/package.json index 870c74a9c894..fc07604ae717 100644 --- a/handwritten/firestore/package.json +++ b/handwritten/firestore/package.json @@ -40,16 +40,16 @@ "predocs": "npm run compile", "docs": "jsdoc -c .jsdoc.js", "system-test:rest": "FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 1200000", - "system-test:named-db:rest": "FIRESTORE_NAMED_DATABASE=test-db FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 1200000", + "system-test:enterprise:rest": "FIRESTORE_DATABASE_ID=test-db FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 1200000", "system-test:grpc": "mocha build/system-test --timeout 1200000", - "system-test:named-db:grpc": "FIRESTORE_NAMED_DATABASE=test-db mocha build/system-test --timeout 1200000", + "system-test:enterprise:grpc": "FIRESTORE_DATABASE_ID=test-db mocha build/system-test --timeout 1200000", "system-test:emulator:rest": "FIRESTORE_EMULATOR_HOST=localhost:8080 FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 1200000", - "system-test:named-db:emulator:rest": "FIRESTORE_NAMED_DATABASE=test-db FIRESTORE_EMULATOR_HOST=localhost:8080 FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 1200000", + "system-test:enterprise:emulator:rest": "FIRESTORE_DATABASE_ID=test-db FIRESTORE_EMULATOR_HOST=localhost:8080 FIRESTORE_PREFER_REST=true mocha build/system-test --timeout 1200000", "system-test:emulator:grpc": "FIRESTORE_EMULATOR_HOST=localhost:8080 mocha build/system-test --timeout 1200000", - "system-test:named-db:emulator:grpc": "FIRESTORE_NAMED_DATABASE=test-db FIRESTORE_EMULATOR_HOST=localhost:8080 mocha build/system-test --timeout 1200000", - "system-test": "concurrently -p \"[{name}]\" -n \"grpc,rest,named-db-grpc,named-db-rest\" -c \"cyan,magenta,blue,yellow\" \"npm:system-test:grpc\" \"npm:system-test:rest\" \"npm:system-test:named-db:grpc\" \"npm:system-test:named-db:rest\"", - "system-test:nightly": "FIRESTORE_TARGET_BACKEND=nightly FIRESTORE_NAMED_DATABASE=enterprise RUN_ENTERPRISE_TESTS=yes GCLOUD_PROJECT=firestore-sdk-nightly mocha build/system-test --timeout 1200000", - "system-test:emulator": "concurrently -p \"[{name}]\" -n \"grpc,rest,named-db-grpc,named-db-rest\" -c \"cyan,magenta,blue,yellow\" \"npm:system-test:emulator:grpc\" \"npm:system-test:emulator:rest\" \"npm:system-test:named-db:emulator:grpc\" \"npm:system-test:named-db:emulator:rest\"", + "system-test:enterprise:emulator:grpc": "FIRESTORE_DATABASE_ID=test-db FIRESTORE_EMULATOR_HOST=localhost:8080 mocha build/system-test --timeout 1200000", + "system-test": "concurrently -p \"[{name}]\" -n \"grpc,rest,enterprise-grpc,enterprise-rest\" -c \"cyan,magenta,blue,yellow\" \"npm:system-test:grpc\" \"npm:system-test:rest\" \"npm:system-test:enterprise:grpc\" \"npm:system-test:enterprise:rest\"", + "system-test:nightly": "FIRESTORE_TARGET_BACKEND=nightly FIRESTORE_DATABASE_ID=enterprise RUN_ENTERPRISE_TESTS=yes GCLOUD_PROJECT=firestore-sdk-nightly mocha build/system-test --timeout 1200000", + "system-test:emulator": "concurrently -p \"[{name}]\" -n \"grpc,rest,enterprise-grpc,enterprise-rest\" -c \"cyan,magenta,blue,yellow\" \"npm:system-test:emulator:grpc\" \"npm:system-test:emulator:rest\" \"npm:system-test:enterprise:emulator:grpc\" \"npm:system-test:enterprise:emulator:rest\"", "presystem-test": "npm run compile", "samples-test": "npm link && cd samples/ && npm link ../ && npm test && cd ../", "conformance": "mocha build/conformance", diff --git a/handwritten/pubsub/package.json b/handwritten/pubsub/package.json index 617dabc9f63e..299fa8301546 100644 --- a/handwritten/pubsub/package.json +++ b/handwritten/pubsub/package.json @@ -101,7 +101,7 @@ "path-to-regexp": "^8.2.0", "protobufjs": "~7.5.0", "proxyquire": "^2.1.3", - "sinon": "^21.0.0", + "sinon": "21.0.3", "tmp": "^0.2.3", "ts-loader": "^9.5.2", "typescript": "^5.8.3", diff --git a/handwritten/spanner/CHANGELOG.md b/handwritten/spanner/CHANGELOG.md index c3b79867501a..264631ed3364 100644 --- a/handwritten/spanner/CHANGELOG.md +++ b/handwritten/spanner/CHANGELOG.md @@ -4,6 +4,25 @@ [1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions +## [8.7.0](https://github.com/googleapis/google-cloud-node/compare/spanner-v8.6.0...spanner-v8.7.0) (2026-04-14) + + +### Features + +* add SI, adapt, split point related proto ([#2527](https://github.com/googleapis/google-cloud-node/issues/2527)) ([f1650a8](https://github.com/googleapis/google-cloud-node/commit/f1650a8095cbe6023a9b23aa3264f7f19edaba19)) +* **spanner:** include cache updates into the ResultSet response ([#2519](https://github.com/googleapis/google-cloud-node/issues/2519)) ([184684f](https://github.com/googleapis/google-cloud-node/commit/184684f669f97835af88ac9d4101320732d65683)) + + +### Bug Fixes + +* **spanner:** enable afe_connectivity_error_count metric ([#7964](https://github.com/googleapis/google-cloud-node/issues/7964)) ([4d59769](https://github.com/googleapis/google-cloud-node/commit/4d597690ad90f9cf7c3c2aa9611029beaa599703)) +* **spanner:** override gcp-metadata to resolve punycode deprecation](https://github.com/googleapis/google-cloud-node/pull/7815#top) ([16971e7](https://github.com/googleapis/google-cloud-node/commit/16971e7ab08a54cfc1b57b17ee75800aa1dcedee)) +* **spanner:** override gcp-metadata to resolve punycode deprecation](https://github.com/googleapis/google-cloud-node/pull/7815#top) ([01d1d9e](https://github.com/googleapis/google-cloud-node/commit/01d1d9e8f89d6ad79da8b1c790e13eab176e932f)) +* **spanner:** override gcp-metadata to resolve punycode deprecation](https://github.com/googleapis/google-cloud-node/pull/7815#top) ([c717550](https://github.com/googleapis/google-cloud-node/commit/c717550789a731c629003908acd713c44f170c23)) +* **spanner:** resolve type conflicts between @types/sinon and @sinonjs/fake-timers ([6d513f9](https://github.com/googleapis/google-cloud-node/commit/6d513f93d0126198b4eb3867c4f5809422e467fe)) +* **spanner:** trigger release ([4c82399](https://github.com/googleapis/google-cloud-node/commit/4c8239955def8cf8f8915ff4254eae70b2abed31)) +* **spanner:** type conflict between @sinonjs/fake-timers and @types/sinonjs__fake-timers ([2280f7a](https://github.com/googleapis/google-cloud-node/commit/2280f7aeab96b9911efc3673dd084e3d9f831d9b)) + ## [8.6.0](https://github.com/googleapis/nodejs-spanner/compare/v8.5.0...v8.6.0) (2026-01-28) diff --git a/handwritten/spanner/google-cloud-spanner-executor/src/cloud-client-executor.ts b/handwritten/spanner/google-cloud-spanner-executor/src/cloud-client-executor.ts new file mode 100644 index 000000000000..d2eff2041040 --- /dev/null +++ b/handwritten/spanner/google-cloud-spanner-executor/src/cloud-client-executor.ts @@ -0,0 +1,262 @@ +/*! + * Copyright 2026 Google LLC. All Rights Reserved. + * + * 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 + * + * http://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. + */ + +import {ServerDuplexStream, status} from '@grpc/grpc-js'; +import {Spanner} from '../../src'; +import {trace, context, Tracer} from '@opentelemetry/api'; +import * as protos from '../../protos/protos'; +import {CloudUtil} from './cloud-util'; +import {OutcomeSender, ExecutionFlowContextInterface} from './cloud-executor'; +import spanner = protos.google.spanner; +import SpannerAsyncActionRequest = spanner.executor.v1.SpannerAsyncActionRequest; +import SpannerAsyncActionResponse = spanner.executor.v1.SpannerAsyncActionResponse; +import ISpannerAction = spanner.executor.v1.ISpannerAction; +import IAdminAction = spanner.executor.v1.IAdminAction; +import ICreateCloudInstanceAction = spanner.executor.v1.ICreateCloudInstanceAction; + +/** + * Context for a single stream connection. + */ +export class ExecutionFlowContext implements ExecutionFlowContextInterface { + private call: ServerDuplexStream< + SpannerAsyncActionRequest, + SpannerAsyncActionResponse + >; + + constructor( + call: ServerDuplexStream< + SpannerAsyncActionRequest, + SpannerAsyncActionResponse + >, + ) { + this.call = call; + } + + /** + * Sends a response back to the client. + */ + public onNext(response: SpannerAsyncActionResponse): void { + // Prevent writing if client cancelled the call, or the underlying Node stream is un-writable/destroyed + if ( + this.call.cancelled || + this.call.destroyed || + this.call.writable === false + ) { + console.warn('Attempted to write to a closed or cancelled stream.'); + return; + } + + this.call.write(response); + } + + /** + * Sends an error back to the client. + */ + public onError(error: Error): void { + const stream = this.call as any; + + if (this.call.cancelled || stream.destroyed || stream.writable === false) { + console.warn( + 'Attempted to emit error to a closed or cancelled stream.', + error, + ); + return; + } + + this.call.emit('error', error); + } + + /** + * Clean up resources associated with the context. + */ + public cleanup(): void { + console.log('Cleaning up ExecutionFlowContext'); + } +} + +type ActionHandler = (action: any, sender: OutcomeSender) => Promise; + +export class CloudClientExecutor { + private spanner: Spanner; + private tracer: Tracer; + + private readonly adminActionRegistry: Record = { + createCloudInstance: (action, sender) => + this.executeCreateCloudInstance( + action as ICreateCloudInstanceAction, + sender, + ), + }; + + private readonly actionRegistry: Record = { + admin: (action, sender) => + this.executeAdminAction(action as IAdminAction, sender), + }; + + constructor() { + const spannerOptions = CloudUtil.getSpannerOptions(); + this.spanner = new Spanner(spannerOptions); + this.tracer = trace.getTracer(CloudClientExecutor.name); + } + + /** + * Creates a new ExecutionFlowContext for a stream. + */ + public createExecutionFlowContext( + call: ServerDuplexStream< + SpannerAsyncActionRequest, + SpannerAsyncActionResponse + >, + ): ExecutionFlowContext { + return new ExecutionFlowContext(call); + } + + /** + * Starts handling a SpannerAsyncActionRequest. + */ + public startHandlingRequest( + req: SpannerAsyncActionRequest, + executionContext: ExecutionFlowContext, + ): {code: number; details: string} { + const outcomeSender = new OutcomeSender(req.actionId!, executionContext); + + if (!req.action) { + return outcomeSender.finishWithError({ + code: status.INVALID_ARGUMENT, + message: 'Invalid request: No action present', + }); + } + this.executeAction(outcomeSender, req.action).catch(err => { + console.error('Unhandled exception in action execution:', err); + outcomeSender.finishWithError(err); + }); + + return {code: status.OK, details: ''}; + } + + /** + * Determines the specific Spanner action type and routes it to the appropriate handler. + */ + private async executeAction( + outcomeSender: OutcomeSender, + action: ISpannerAction, + ): Promise { + const actionType = + Object.keys(action).find( + k => + action[k as keyof typeof action] !== undefined && + !!this.actionRegistry[k], + ) || 'unknown'; + const span = this.tracer.startSpan(`performaction_${actionType}`); + + return context.with(trace.setSpan(context.active(), span), async () => { + try { + const handler = this.actionRegistry[actionType]; + if (handler) { + await handler( + action[actionType as keyof typeof action], + outcomeSender, + ); + return; + } + + outcomeSender.finishWithError({ + code: status.UNIMPLEMENTED, + message: `Action ${actionType} not implemented yet`, + }); + } catch (e: any) { + span.recordException(e); + console.error('Unexpected error:', e); + outcomeSender.finishWithError({ + code: status.INVALID_ARGUMENT, + message: `Unexpected error: ${e.message}`, + }); + } finally { + span.end(); + } + }); + } + + private async executeAdminAction( + action: IAdminAction, + sender: OutcomeSender, + ): Promise { + try { + const adminType = Object.keys(action).find( + k => + action[k as keyof typeof action] !== undefined && + !!this.adminActionRegistry[k], + ); + + if (adminType && this.adminActionRegistry[adminType]) { + await this.adminActionRegistry[adminType]( + action[adminType as keyof typeof action], + sender, + ); + return; + } + + sender.finishWithError({ + code: status.UNIMPLEMENTED, + message: `Admin action ${adminType || 'unknown'} not implemented`, + }); + } catch (e: any) { + sender.finishWithError(e); + } + } + + private async executeCreateCloudInstance( + action: ICreateCloudInstanceAction, + sender: OutcomeSender, + ): Promise { + try { + console.log(`Creating instance: \n${JSON.stringify(action, null, 2)}`); + + const instanceId = action.instanceId!; + const projectId = action.projectId!; + const configId = action.instanceConfigId!; + + const instanceAdminClient = this.spanner.getInstanceAdminClient(); + + const [operation] = await instanceAdminClient.createInstance({ + parent: instanceAdminClient.projectPath(projectId), + instanceId: instanceId, + instance: { + config: instanceAdminClient.instanceConfigPath(projectId, configId), + displayName: instanceId, + nodeCount: action.nodeCount || 1, + processingUnits: action.processingUnits, + labels: action.labels || {}, + }, + }); + + console.log('Waiting for instance creation operation to complete...'); + await operation.promise(); + + console.log(`Instance ${instanceId} created successfully.`); + + sender.finishWithOK(); + } catch (err: any) { + if (err.code === status.ALREADY_EXISTS) { + console.log('Instance already exists, returning OK.'); + sender.finishWithOK(); + return; + } + console.error('Failed to create instance:', err); + sender.finishWithError(err); + } + } +} diff --git a/handwritten/spanner/google-cloud-spanner-executor/src/cloud-executor-impl.ts b/handwritten/spanner/google-cloud-spanner-executor/src/cloud-executor-impl.ts new file mode 100644 index 000000000000..09028bef447c --- /dev/null +++ b/handwritten/spanner/google-cloud-spanner-executor/src/cloud-executor-impl.ts @@ -0,0 +1,106 @@ +/*! + * Copyright 2026 Google LLC. All Rights Reserved. + * + * 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 + * + * http://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. + */ + +import {ServerDuplexStream, status} from '@grpc/grpc-js'; +import {trace, context, Tracer} from '@opentelemetry/api'; +import {CloudClientExecutor} from './cloud-client-executor'; +import * as protos from '../../protos/protos'; +import spanner = protos.google.spanner; +import SpannerAsyncActionRequest = spanner.executor.v1.SpannerAsyncActionRequest; +import SpannerAsyncActionResponse = spanner.executor.v1.SpannerAsyncActionResponse; + +/** + * Implements the SpannerExecutorProxy service, which handles asynchronous + * Spanner actions via a bidirectional gRPC stream. + */ +export class CloudExecutorImpl { + private clientExecutor: CloudClientExecutor; + private tracer: Tracer; + + constructor() { + this.clientExecutor = new CloudClientExecutor(); + + this.tracer = trace.getTracer(CloudClientExecutor.name); + } + + /** + * Handles incoming SpannerAsyncActionRequest messages from the client. + */ + public executeActionAsync( + call: ServerDuplexStream< + SpannerAsyncActionRequest, + SpannerAsyncActionResponse + >, + ): void { + // Create a top-level OpenTelemetry span for streaming request. + const span = this.tracer.startSpan( + 'nodejs_systest_execute_actions_stream', + { + root: true, + }, + ); + + const streamContext = trace.setSpan(context.active(), span); + + // The executionContext manages the lifecycle and flow state for this specific gRPC stream context. + const executionContext = + this.clientExecutor.createExecutionFlowContext(call); + + // Handle receiving requests on duplex stream + // Handle incoming requests sequentially on the duplex stream. + call.on('data', (request: SpannerAsyncActionRequest) => { + context.with(streamContext, () => { + console.log(`Receiving request: \n${JSON.stringify(request, null, 2)}`); + // TODO: Set requestHasReadOrQueryAction flag here when Read/Query are implemented. + try { + const reqStatus = this.clientExecutor.startHandlingRequest( + request, + executionContext, + ); + if (reqStatus.code !== status.OK) { + console.error( + `Failed to handle request, half closed: ${reqStatus.details}`, + ); + } + } catch (err) { + console.error('Exception when handling request', err); + } + }); + }); + + // Handle stream errors + call.on('error', (err: Error) => { + context.with(streamContext, () => { + console.error('Client ends the stream with error.', err); + span.recordException(err); + span.end(); + executionContext.cleanup(); + }); + }); + + // Handle the completion of the client stream + call.on('end', () => { + context.with(streamContext, () => { + span.end(); + // TODO: Add End-to-End trace verification here once Read/Query actions are implemented. + console.log('Client called Done, half closed'); + executionContext.cleanup(); + + call.end(); + }); + }); + } +} diff --git a/handwritten/spanner/google-cloud-spanner-executor/src/cloud-executor.ts b/handwritten/spanner/google-cloud-spanner-executor/src/cloud-executor.ts new file mode 100644 index 000000000000..f494946562be --- /dev/null +++ b/handwritten/spanner/google-cloud-spanner-executor/src/cloud-executor.ts @@ -0,0 +1,109 @@ +/*! + * Copyright 2026 Google LLC. All Rights Reserved. + * + * 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 + * + * http://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. + */ + +import {status} from '@grpc/grpc-js'; +import * as protos from '../../protos/protos'; + +// Import Protobuf types +import spanner = protos.google.spanner; +import SpannerActionOutcome = spanner.executor.v1.SpannerActionOutcome; +import SpannerAsyncActionResponse = spanner.executor.v1.SpannerAsyncActionResponse; + +/** + * Defines the interface for sending responses back to the client for a specific + * gRPC stream. This is implemented by ExecutionFlowContext in + * cloud-client-executor.ts to avoid circular dependencies. + */ +export interface ExecutionFlowContextInterface { + onNext(response: SpannerAsyncActionResponse): void; +} + +/** + * A utility class for sending action outcomes back to the client via a gRPC bidirectional stream. + * It writes SpannerAsyncActionResponse messages directly to the active stream context. + */ +export class OutcomeSender { + private actionId: number; + private context: ExecutionFlowContextInterface; + constructor(actionId: number, context: ExecutionFlowContextInterface) { + this.actionId = actionId; + this.context = context; + } + + public finishWithOK(): {code: number; details: string} { + const outcome = SpannerActionOutcome.create({ + status: CloudExecutor.toProto(status.OK), + }); + return this.sendOutcome(outcome); + } + + public finishWithError(err: any): {code: number; details: string} { + const s = CloudExecutor.toStatus(err); + const outcome = SpannerActionOutcome.create({ + status: CloudExecutor.toProto(s.code, s.message), + }); + return this.sendOutcome(outcome); + } + + private sendOutcome(outcome: SpannerActionOutcome): { + code: number; + details: string; + } { + try { + const response = SpannerAsyncActionResponse.create({ + actionId: this.actionId, + outcome: outcome, + }); + this.context.onNext(response); + return {code: status.OK, details: ''}; + } catch (e: any) { + console.error('Failed to send outcome', e); + return {code: status.INTERNAL, details: e.message}; + } + } +} + +/** + * A utility class providing static helper methods for the Cloud Spanner executor. + */ +export class CloudExecutor { + public static readonly PROJECT_ID = 'spanner-cloud-systest'; + + /** + * Maps an error object to a gRPC status code and message. + */ + public static toStatus(err: any): {code: number; message: string} { + let code = status.UNKNOWN; + const message = err.message || 'Unknown error'; + + if (err.code !== undefined && typeof err.code === 'number') { + code = err.code; + } + + return {code, message}; + } + + /** Converts a gRPC status code and message into a protobuf Status object. */ + public static toProto( + code: number, + message?: string, + ): protos.google.rpc.IStatus { + return { + code: code, + message: message || '', + }; + } +} diff --git a/handwritten/spanner/google-cloud-spanner-executor/src/cloud-util.ts b/handwritten/spanner/google-cloud-spanner-executor/src/cloud-util.ts new file mode 100644 index 000000000000..d6e3e1d042ca --- /dev/null +++ b/handwritten/spanner/google-cloud-spanner-executor/src/cloud-util.ts @@ -0,0 +1,150 @@ +/*! + * Copyright 2026 Google LLC. All Rights Reserved. + * + * 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 + * + * http://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. + */ + +import * as fs from 'fs'; +import * as grpc from '@grpc/grpc-js'; +import {WorkerProxy} from './worker-proxy'; +import {SpannerOptions} from '../../src'; +import {trace} from '@opentelemetry/api'; +import {NodeTracerProvider} from '@opentelemetry/sdk-trace-node'; +import {OTLPTraceExporter} from '@opentelemetry/exporter-trace-otlp-grpc'; +import {Resource} from '@opentelemetry/resources'; +import {ATTR_SERVICE_NAME} from '@opentelemetry/semantic-conventions'; +import { + BatchSpanProcessor, + TraceIdRatioBasedSampler, +} from '@opentelemetry/sdk-trace-base'; +import {GoogleAuth} from 'google-auth-library'; + +/** + * Provides utility methods for configuring the Cloud Spanner client for tests. + */ +export class CloudUtil { + private static readonly TRACE_SAMPLING_RATE = 0.01; + public static async setupOpenTelemetrySdk(): Promise { + const auth = new GoogleAuth({ + scopes: 'https://www.googleapis.com/auth/cloud-platform', + keyFile: WorkerProxy.serviceKeyFile || undefined, + }); + const authenticatedClient = await auth.getClient(); + + const traceExporter = new OTLPTraceExporter({ + url: 'https://test-telemetry.sandbox.googleapis.com', + credentials: grpc.credentials.combineChannelCredentials( + grpc.credentials.createSsl(), + grpc.credentials.createFromGoogleCredential(authenticatedClient as any), + ), + }); + + const provider = new NodeTracerProvider({ + resource: new Resource({ + [ATTR_SERVICE_NAME]: 'spanner-node-worker-proxy', + 'gcp.project_id': WorkerProxy.PROJECT_ID, + }) as any, + sampler: new TraceIdRatioBasedSampler(this.TRACE_SAMPLING_RATE), + spanProcessors: [new BatchSpanProcessor(traceExporter as any)], + }); + + provider.register(); + return provider; + } + // If this is set too low, the peer server may return RESOURCE_EXHAUSTED errors if the response + // error message causes the trailing headers to exceed this limit. + private static readonly GRPC_MAX_HEADER_LIST_SIZE_BYTES = 10 * 1024 * 1024; // 10 MB + + private static readonly TEST_HOST_IN_CERT = 'test-cert-2'; + + /** + * Creates the configuration object for the Spanner client for connecting to a + * test GFE, including gRPC channel setup. + */ + public static getSpannerOptions(): any { + const options: SpannerOptions = { + projectId: WorkerProxy.PROJECT_ID, + servicePath: 'localhost', + port: WorkerProxy.spannerPort, + observabilityOptions: { + tracerProvider: trace.getTracerProvider(), + enableExtendedTracing: true, + enableEndToEndTracing: true, + }, + }; + + const maxMessageSize = 100 * 1024 * 1024; + + const grpcOptions: grpc.ClientOptions = { + 'grpc.max_receive_message_length': maxMessageSize, + 'grpc.max_metadata_size': this.GRPC_MAX_HEADER_LIST_SIZE_BYTES, + }; + + if (WorkerProxy.usePlainTextChannel) { + options.sslCreds = grpc.credentials.createInsecure(); + } else { + const rootCerts = CertUtil.copyCert(WorkerProxy.cert); + options.sslCreds = grpc.credentials.createSsl(rootCerts); + + // Override authority to match the test certificate. + // In Node.js gRPC: + // - ssl_target_name_override is used for the SSL handshake check (CN/SAN matching). + // - default_authority is used for the HTTP/2 :authority header. + (grpcOptions as grpc.ChannelOptions)['grpc.ssl_target_name_override'] = + this.TEST_HOST_IN_CERT; + (grpcOptions as grpc.ChannelOptions)['grpc.default_authority'] = + this.TEST_HOST_IN_CERT; + } + + (options as any).grpcOptions = grpcOptions; + + return options; + } +} + +/** + * A utility class for handling certificates. + */ +export class CertUtil { + /** + * Reads a certificate file from the provided path and copies its contents into a buffer, + * deliberately stripping out any arbitrary content outside the BEGIN/END blocks. + */ + public static copyCert(certPath: string): Buffer { + try { + const certContent = fs.readFileSync(certPath, 'utf8'); + const lines = certContent.split(/\r?\n/); + let cleanCert = ''; + let inCert = false; + + for (const line of lines) { + const trimmedLine = line.trim(); + + if (trimmedLine === '-----BEGIN CERTIFICATE-----') { + inCert = true; + } + + if (inCert) { + cleanCert += line + '\n'; + } + + if (trimmedLine === '-----END CERTIFICATE-----') { + inCert = false; + } + } + return Buffer.from(cleanCert); + } catch (e) { + throw new Error(`Failed to read certificate from ${certPath}: ${e}`); + } + } +} diff --git a/handwritten/spanner/google-cloud-spanner-executor/src/worker-proxy.ts b/handwritten/spanner/google-cloud-spanner-executor/src/worker-proxy.ts new file mode 100644 index 000000000000..c3ab1a6632e9 --- /dev/null +++ b/handwritten/spanner/google-cloud-spanner-executor/src/worker-proxy.ts @@ -0,0 +1,249 @@ +/*! + * Copyright 2026 Google LLC. All Rights Reserved. + * + * 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 + * + * http://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. + */ + +import * as grpc from '@grpc/grpc-js'; +import * as protoLoader from '@grpc/proto-loader'; +import yargs from 'yargs'; +import * as path from 'path'; +import * as fs from 'fs'; +import {CloudExecutorImpl} from './cloud-executor-impl'; +import {CloudUtil} from './cloud-util'; +import {HealthImplementation} from 'grpc-health-check'; +import {ReflectionService} from '@grpc/reflection'; + +const PROTO_PATH = path.join( + __dirname, + '../../protos/google/spanner/executor/v1/cloud_executor.proto', +); + +const OPTION_SPANNER_PORT = 'spanner_port'; +const OPTION_PROXY_PORT = 'proxy_port'; +const OPTION_CERTIFICATE = 'cert'; +const OPTION_SERVICE_KEY_FILE = 'service_key_file'; +const OPTION_USE_PLAIN_TEXT_CHANNEL = 'use_plain_text_channel'; +const OPTION_ENABLE_GRPC_FAULT_INJECTOR = 'enable_grpc_fault_injector'; + +/** + * Acts as a proxy server that forwards incoming gRPC requests to the underlying + * Spanner CloudExecutor implementation. + */ +export class WorkerProxy { + public static spannerPort = 0; + public static proxyPort = 0; + public static cert = ''; + public static serviceKeyFile = ''; + + public static usePlainTextChannel = false; + public static enableGrpcFaultInjector = false; + public static openTelemetrySdk: any; + + public static readonly PROJECT_ID = 'spanner-cloud-systest'; + public static readonly CLOUD_TRACE_ENDPOINT = + 'staging-cloudtrace.sandbox.googleapis.com:443'; + + private static readonly MIN_PORT = 0; + private static readonly MAX_PORT = 65535; + private static readonly TRACE_SAMPLING_RATE = 0.01; + + /** + * Parses and builds the command line options for the worker proxy. + */ + public static buildOptions(args: string[]): any { + const parser = yargs(args); + + parser.option(OPTION_SPANNER_PORT, { + type: 'number', + description: 'Port of Spanner Frontend to which to send requests.', + }); + parser.option(OPTION_PROXY_PORT, { + type: 'number', + description: 'Proxy port to start worker proxy on.', + }); + parser.option(OPTION_CERTIFICATE, { + type: 'string', + description: 'Certificate used to connect to Spanner GFE.', + }); + parser.option(OPTION_SERVICE_KEY_FILE, { + type: 'string', + description: 'Service key file used to set authentication.', + }); + parser.option(OPTION_USE_PLAIN_TEXT_CHANNEL, { + type: 'boolean', + description: + 'Use a plain text gRPC channel (intended for the Cloud Spanner Emulator).', + }); + parser.option(OPTION_ENABLE_GRPC_FAULT_INJECTOR, { + type: 'boolean', + description: 'Enable grpc fault injector in cloud client executor.', + }); + + try { + return parser.parseSync(); + } catch (e: any) { + throw new Error(e.message); + } + } + + /** + * Main entry point to spin up the gRPC server and start the worker proxy. + */ + public static async main(args: string[]) { + const commandLine = this.buildOptions(args); + + if (commandLine[OPTION_SPANNER_PORT] === undefined) { + throw new Error( + 'Spanner proxyPort need to be assigned in order to start worker proxy.', + ); + } + this.spannerPort = commandLine[OPTION_SPANNER_PORT]; + if (this.spannerPort < this.MIN_PORT || this.spannerPort > this.MAX_PORT) { + throw new Error( + 'Spanner proxyPort must be between ' + + this.MIN_PORT + + ' and ' + + this.MAX_PORT, + ); + } + + if (commandLine[OPTION_PROXY_PORT] === undefined) { + throw new Error( + 'Proxy port need to be assigned in order to start worker proxy.', + ); + } + this.proxyPort = commandLine[OPTION_PROXY_PORT]; + if (this.proxyPort < this.MIN_PORT || this.proxyPort > this.MAX_PORT) { + throw new Error( + 'Proxy port must be between ' + this.MIN_PORT + ' and ' + this.MAX_PORT, + ); + } + + if (!commandLine[OPTION_CERTIFICATE]) { + throw new Error( + 'Certificate need to be assigned in order to start worker proxy.', + ); + } + this.cert = commandLine[OPTION_CERTIFICATE]; + + if (commandLine[OPTION_SERVICE_KEY_FILE]) { + this.serviceKeyFile = commandLine[OPTION_SERVICE_KEY_FILE]; + } + + this.usePlainTextChannel = !!commandLine[OPTION_USE_PLAIN_TEXT_CHANNEL]; + this.enableGrpcFaultInjector = + !!commandLine[OPTION_ENABLE_GRPC_FAULT_INJECTOR]; + + // Setup the OpenTelemetry for tracing + this.openTelemetrySdk = await CloudUtil.setupOpenTelemetrySdk(); + + // Check if proto file exists + if (!fs.existsSync(PROTO_PATH)) { + throw new Error(`Proto file not found at ${PROTO_PATH}`); + } + + const packageDefinition = protoLoader.loadSync(PROTO_PATH, { + keepCase: false, + longs: String, + enums: String, + defaults: true, + oneofs: true, + includeDirs: [ + path.join(__dirname, '../../protos'), + path.join(__dirname, '../../../node_modules/google-proto-files'), + path.join(__dirname, '../../../node_modules/google-gax/build/protos'), + ], + }); + const protoDescriptor = grpc.loadPackageDefinition( + packageDefinition, + ) as any; + const spannerExecutorProxy = + protoDescriptor.google.spanner.executor.v1.SpannerExecutorProxy; + + let server: grpc.Server; + for (;;) { + try { + const cloudExecutorImpl = new CloudExecutorImpl(); + + server = new grpc.Server(); + server.addService( + spannerExecutorProxy.service, + cloudExecutorImpl as any, + ); + + const healthImpl = new HealthImplementation({ + '': 'SERVING', + }); + healthImpl.addToServer(server); + const reflection = new ReflectionService(packageDefinition); + reflection.addToServer(server); + + const bindAddr = `0.0.0.0:${WorkerProxy.proxyPort}`; + const port = await new Promise((resolve, reject) => { + server.bindAsync( + bindAddr, + grpc.ServerCredentials.createInsecure(), + (err, port) => { + if (err) { + return reject(err); + } + resolve(port); + }, + ); + }); + + console.info(`Server started on proxyPort: ${port}`); + break; + } catch (e) { + console.warn( + `Failed to start server on proxyPort ${this.proxyPort}`, + e, + ); + // Wait briefly before retrying to avoid tight loop + await new Promise(resolve => setTimeout(resolve, 1000)); + } + } + const shutdown = () => { + // eslint-disable-next-line n/no-process-exit + setTimeout(() => process.exit(1), 2000).unref(); + server.tryShutdown(() => { + this.openTelemetrySdk + .shutdown() + .then(() => console.info('Tracing terminated')) + .catch(error => console.error('Error terminating tracing', error)) + // eslint-disable-next-line n/no-process-exit + .finally(() => process.exit(0)); + }); + }; + + process.on('SIGTERM', shutdown); + process.on('SIGINT', shutdown); + + process.on('uncaughtException', err => { + console.error('Uncaught Exception:', err); + shutdown(); + }); + + process.on('unhandledRejection', reason => { + console.error('Unhandled Rejection:', reason); + shutdown(); + }); + } +} +if (require.main === module) { + WorkerProxy.main(process.argv.slice(2)).catch(err => { + console.error('Failed to start worker proxy: ', err); + throw err; + }); +} diff --git a/handwritten/spanner/package.json b/handwritten/spanner/package.json index 3f5f15630c0d..fef5dac5b1fc 100644 --- a/handwritten/spanner/package.json +++ b/handwritten/spanner/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/spanner", "description": "Cloud Spanner Client Library for Node.js", - "version": "8.6.0", + "version": "8.7.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { @@ -98,8 +98,10 @@ "uuid": "^11.1.0" }, "devDependencies": { + "@grpc/reflection": "^1.0.4", "@opentelemetry/sdk-trace-base": "^2.0.0", "@opentelemetry/sdk-trace-node": "^2.0.0", + "@opentelemetry/exporter-trace-otlp-grpc": "^0.57.0", "@types/concat-stream": "^2.0.3", "@types/extend": "^3.0.4", "@types/is": "^0.0.25", @@ -108,10 +110,12 @@ "@types/mocha": "^10.0.10", "@types/mv": "^2.1.4", "@types/ncp": "^2.0.8", + "@types/node": "^25.5.0", "@types/proxyquire": "^1.3.31", "@types/request": "^2.48.12", "@types/sinon": "^21.0.0", "@types/through2": "^2.0.41", + "@types/yargs": "^17.0.35", "binary-search-bounds": "^2.0.5", "c8": "^10.1.3", "codecov": "^3.8.3", @@ -119,6 +123,7 @@ "dedent": "^1.5.3", "execa": "^5.0.0", "gapic-tools": "^1.0.1", + "grpc-health-check": "^2.1.0", "gts": "^6.0.2", "jsdoc": "^4.0.4", "jsdoc-fresh": "^5.0.0", @@ -133,7 +138,7 @@ "p-limit": "^3.0.1", "path-to-regexp": "^8.2.0", "proxyquire": "^2.1.3", - "sinon": "^21.0.0", + "sinon": "21.0.3", "stats-lite": "^2.2.0", "time-span": "4.0.0", "tmp": "^0.2.3", @@ -151,4 +156,4 @@ } }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/handwritten/spanner" -} +} \ No newline at end of file diff --git a/handwritten/spanner/src/database.ts b/handwritten/spanner/src/database.ts index 2c8d2cdf2955..145018db064f 100644 --- a/handwritten/spanner/src/database.ts +++ b/handwritten/spanner/src/database.ts @@ -2267,6 +2267,10 @@ class Database extends common.GrpcServiceObject { optionsOrCallback?: GetTransactionOptions, ): Promise<[Transaction]>; getTransaction(callback: GetTransactionCallback): void; + getTransaction( + options: GetTransactionOptions, + callback: GetTransactionCallback, + ): void; getTransaction( optionsOrCallback?: GetTransactionOptions | GetTransactionCallback, callback?: GetTransactionCallback, diff --git a/handwritten/spanner/test/database.ts b/handwritten/spanner/test/database.ts index 71923d4e0d78..394ad7f35ff6 100644 --- a/handwritten/spanner/test/database.ts +++ b/handwritten/spanner/test/database.ts @@ -173,6 +173,7 @@ class FakeTable { class FakeTransaction extends EventEmitter { calledWith_: IArguments; + runTransactionOptions: RunTransactionOptions | undefined; _options!: google.spanner.v1.ITransactionOptions; private _queuedMutations: google.spanner.v1.Mutation[]; constructor(options) { @@ -190,7 +191,9 @@ class FakeTransaction extends EventEmitter { setQueuedMutations(mutation) { this._queuedMutations = mutation; } - setReadWriteTransactionOptions(options: RunTransactionOptions) {} + setReadWriteTransactionOptions(options: RunTransactionOptions) { + this.runTransactionOptions = options; + } commit( options?: CommitOptions, callback?: CommitCallback, @@ -2602,6 +2605,16 @@ describe('Database', () => { }); }); + it('should optionally accept runner `options`', done => { + const fakeOptions = {excludeTxnFromChangeStreams: true}; + + database.getTransaction(fakeOptions, (_err, transaction) => { + assert.ifError(_err); + assert.strictEqual(transaction.runTransactionOptions, fakeOptions); + done(); + }); + }); + it('should propagate an error', done => { const error = new Error('resource'); (sandbox.stub(fakeSessionFactory, 'release') as sinon.SinonStub) diff --git a/handwritten/spanner/tsconfig.json b/handwritten/spanner/tsconfig.json index 7721598f2d9c..9c2d1a219d83 100644 --- a/handwritten/spanner/tsconfig.json +++ b/handwritten/spanner/tsconfig.json @@ -24,6 +24,7 @@ "src/**/*.json", "system-test/*.ts", "protos/protos.json", - "samples/**/*.d.ts" + "samples/**/*.d.ts", + "google-cloud-spanner-executor/**/*.ts" ] -} +} \ No newline at end of file diff --git a/packages/google-ads-admanager/package.json b/packages/google-ads-admanager/package.json index 95b10b9402fd..bc5e971c6d07 100644 --- a/packages/google-ads-admanager/package.json +++ b/packages/google-ads-admanager/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ads-admanager", "keywords": [ diff --git a/packages/google-ads-datamanager/package.json b/packages/google-ads-datamanager/package.json index 11e10a2e7e32..96e4cd79e504 100644 --- a/packages/google-ads-datamanager/package.json +++ b/packages/google-ads-datamanager/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ads-datamanager", "keywords": [ diff --git a/packages/google-ai-generativelanguage/package.json b/packages/google-ai-generativelanguage/package.json index e3df02b0d557..e123734d863f 100644 --- a/packages/google-ai-generativelanguage/package.json +++ b/packages/google-ai-generativelanguage/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ai-generativelanguage", "keywords": [ diff --git a/packages/google-analytics-admin/.eslintrc.json b/packages/google-analytics-admin/.eslintrc.json index 782153495464..3e8d97ccb390 100644 --- a/packages/google-analytics-admin/.eslintrc.json +++ b/packages/google-analytics-admin/.eslintrc.json @@ -1,3 +1,4 @@ { - "extends": "./node_modules/gts" + "extends": "./node_modules/gts", + "root": true } diff --git a/packages/google-analytics-admin/.gitattributes b/packages/google-analytics-admin/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-analytics-admin/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-analytics-admin/CODE_OF_CONDUCT.md b/packages/google-analytics-admin/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-analytics-admin/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-analytics-admin/CONTRIBUTING.md b/packages/google-analytics-admin/CONTRIBUTING.md new file mode 100644 index 000000000000..776a63a0fbf8 --- /dev/null +++ b/packages/google-analytics-admin/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Admin API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsadmin.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-analytics-admin/LICENSE b/packages/google-analytics-admin/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-analytics-admin/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://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. diff --git a/packages/google-analytics-admin/README.md b/packages/google-analytics-admin/README.md index 8d37fd50ed84..3a395c9b7c09 100644 --- a/packages/google-analytics-admin/README.md +++ b/packages/google-analytics-admin/README.md @@ -149,6 +149,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | get search ads360 link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_search_ads360_link.js) | | get subproperty event filter | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_subproperty_event_filter.js) | | get subproperty sync config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_subproperty_sync_config.js) | +| get user provided data settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_provided_data_settings.js) | | list access bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js) | | list account summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js) | | list accounts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js) | diff --git a/packages/google-analytics-admin/package.json b/packages/google-analytics-admin/package.json index f83f73cf07ba..97d48dccee6a 100644 --- a/packages/google-analytics-admin/package.json +++ b/packages/google-analytics-admin/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/access_report.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/access_report.proto index a1d497d16ada..567686a65507 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/access_report.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/access_report.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto index 2b5ea77d99de..af2055300082 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1602,7 +1602,7 @@ service AnalyticsAdminService { option (google.api.method_signature) = "name"; } - // Returns the singleton data retention settings for this property. + // Returns the reporting identity settings for this property. rpc GetReportingIdentitySettings(GetReportingIdentitySettingsRequest) returns (ReportingIdentitySettings) { option (google.api.http) = { @@ -1610,6 +1610,15 @@ service AnalyticsAdminService { }; option (google.api.method_signature) = "name"; } + + // Looks up settings related to user-provided data for a property. + rpc GetUserProvidedDataSettings(GetUserProvidedDataSettingsRequest) + returns (UserProvidedDataSettings) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/userProvidedDataSettings}" + }; + option (google.api.method_signature) = "name"; + } } // The request for a Data Access Record Report. @@ -1750,17 +1759,17 @@ message GetAccountRequest { // Request message for ListAccounts RPC. message ListAccountsRequest { - // The maximum number of resources to return. The service may return + // Optional. The maximum number of resources to return. The service may return // fewer than this value, even if there are additional pages. // If unspecified, at most 50 resources will be returned. // The maximum value is 200; (higher values will be coerced to the maximum) - int32 page_size = 1; + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous `ListAccounts` call. + // Optional. A page token, received from a previous `ListAccounts` call. // Provide this to retrieve the subsequent page. // When paginating, all other parameters provided to `ListAccounts` must // match the call that provided the page token. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Whether to include soft-deleted (ie: "trashed") Accounts in the // results. Accounts can be inspected to determine whether they are deleted or @@ -1854,17 +1863,17 @@ message ListPropertiesRequest { // ``` string filter = 1 [(google.api.field_behavior) = REQUIRED]; - // The maximum number of resources to return. The service may return + // Optional. The maximum number of resources to return. The service may return // fewer than this value, even if there are additional pages. // If unspecified, at most 50 resources will be returned. // The maximum value is 200; (higher values will be coerced to the maximum) - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous `ListProperties` call. + // Optional. A page token, received from a previous `ListProperties` call. // Provide this to retrieve the subsequent page. // When paginating, all other parameters provided to `ListProperties` must // match the call that provided the page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Whether to include soft-deleted (ie: "trashed") Properties in the // results. Properties can be inspected to determine whether they are deleted @@ -1958,17 +1967,17 @@ message ListFirebaseLinksRequest { } ]; - // The maximum number of resources to return. The service may return + // Optional. The maximum number of resources to return. The service may return // fewer than this value, even if there are additional pages. // If unspecified, at most 50 resources will be returned. // The maximum value is 200; (higher values will be coerced to the maximum) - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous `ListFirebaseLinks` call. + // Optional. A page token, received from a previous `ListFirebaseLinks` call. // Provide this to retrieve the subsequent page. // When paginating, all other parameters provided to `ListFirebaseLinks` must // match the call that provided the page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ListFirebaseLinks RPC @@ -2046,17 +2055,17 @@ message ListGoogleAdsLinksRequest { } ]; - // The maximum number of resources to return. + // Optional. The maximum number of resources to return. // If unspecified, at most 50 resources will be returned. // The maximum value is 200 (higher values will be coerced to the maximum). - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous `ListGoogleAdsLinks` call. + // Optional. A page token, received from a previous `ListGoogleAdsLinks` call. // Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to `ListGoogleAdsLinks` must // match the call that provided the page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ListGoogleAdsLinks RPC. @@ -2085,17 +2094,17 @@ message GetDataSharingSettingsRequest { // Request message for ListAccountSummaries RPC. message ListAccountSummariesRequest { - // The maximum number of AccountSummary resources to return. The service may - // return fewer than this value, even if there are additional pages. - // If unspecified, at most 50 resources will be returned. - // The maximum value is 200; (higher values will be coerced to the maximum) - int32 page_size = 1; + // Optional. The maximum number of AccountSummary resources to return. The + // service may return fewer than this value, even if there are additional + // pages. If unspecified, at most 50 resources will be returned. The maximum + // value is 200; (higher values will be coerced to the maximum) + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous `ListAccountSummaries` call. - // Provide this to retrieve the subsequent page. - // When paginating, all other parameters provided to `ListAccountSummaries` - // must match the call that provided the page token. - string page_token = 2; + // Optional. A page token, received from a previous `ListAccountSummaries` + // call. Provide this to retrieve the subsequent page. When paginating, all + // other parameters provided to `ListAccountSummaries` must match the call + // that provided the page token. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ListAccountSummaries RPC. @@ -2273,16 +2282,17 @@ message ListMeasurementProtocolSecretsRequest { } ]; - // The maximum number of resources to return. + // Optional. The maximum number of resources to return. // If unspecified, at most 10 resources will be returned. // The maximum value is 10. Higher values will be coerced to the maximum. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous `ListMeasurementProtocolSecrets` - // call. Provide this to retrieve the subsequent page. When paginating, all - // other parameters provided to `ListMeasurementProtocolSecrets` must match - // the call that provided the page token. - string page_token = 3; + // Optional. A page token, received from a previous + // `ListMeasurementProtocolSecrets` call. Provide this to retrieve the + // subsequent page. When paginating, all other parameters provided to + // `ListMeasurementProtocolSecrets` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ListMeasurementProtocolSecret RPC @@ -2362,18 +2372,18 @@ message ListSKAdNetworkConversionValueSchemasRequest { } ]; - // The maximum number of resources to return. The service may return + // Optional. The maximum number of resources to return. The service may return // fewer than this value, even if there are additional pages. // If unspecified, at most 50 resources will be returned. // The maximum value is 200; (higher values will be coerced to the maximum) - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous + // Optional. A page token, received from a previous // `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the // subsequent page. When paginating, all other parameters provided to // `ListSKAdNetworkConversionValueSchema` must match the call that provided // the page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ListSKAdNetworkConversionValueSchemas RPC @@ -2484,16 +2494,16 @@ message ListConversionEventsRequest { } ]; - // The maximum number of resources to return. + // Optional. The maximum number of resources to return. // If unspecified, at most 50 resources will be returned. // The maximum value is 200; (higher values will be coerced to the maximum) - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous `ListConversionEvents` call. - // Provide this to retrieve the subsequent page. - // When paginating, all other parameters provided to `ListConversionEvents` - // must match the call that provided the page token. - string page_token = 3; + // Optional. A page token, received from a previous `ListConversionEvents` + // call. Provide this to retrieve the subsequent page. When paginating, all + // other parameters provided to `ListConversionEvents` must match the call + // that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ListConversionEvents RPC. @@ -2572,16 +2582,16 @@ message ListKeyEventsRequest { } ]; - // The maximum number of resources to return. + // Optional. The maximum number of resources to return. // If unspecified, at most 50 resources will be returned. // The maximum value is 200; (higher values will be coerced to the maximum) - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous `ListKeyEvents` call. + // Optional. A page token, received from a previous `ListKeyEvents` call. // Provide this to retrieve the subsequent page. // When paginating, all other parameters provided to `ListKeyEvents` // must match the call that provided the page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ListKeyEvents RPC. @@ -2907,17 +2917,17 @@ message ListCustomDimensionsRequest { } ]; - // The maximum number of resources to return. + // Optional. The maximum number of resources to return. // If unspecified, at most 50 resources will be returned. // The maximum value is 200 (higher values will be coerced to the maximum). - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token, received from a previous `ListCustomDimensions` call. - // Provide this to retrieve the subsequent page. + // Optional. A page token, received from a previous `ListCustomDimensions` + // call. Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to `ListCustomDimensions` // must match the call that provided the page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ListCustomDimensions RPC. @@ -4625,3 +4635,15 @@ message GetReportingIdentitySettingsRequest { } ]; } + +// Request message for GetUserProvidedDataSettings RPC +message GetUserProvidedDataSettingsRequest { + // Required. The name of the user provided data settings to retrieve. + // Format: properties/{property}/userProvidedDataSettings + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/UserProvidedDataSettings" + } + ]; +} diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/audience.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/audience.proto index c17562fb6a9f..39497c2c2b60 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/audience.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/audience.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/channel_group.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/channel_group.proto index 61862f7fde25..2c1a3b932b5a 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/channel_group.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/channel_group.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/event_create_and_edit.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/event_create_and_edit.proto index 9dbbe1bf0cc1..f96a8d57c119 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/event_create_and_edit.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/event_create_and_edit.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/expanded_data_set.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/expanded_data_set.proto index a31eb4cb1330..12481d71591c 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/expanded_data_set.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/expanded_data_set.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto index d666b945c24b..d253a61e5c84 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -253,6 +253,9 @@ enum ChangeHistoryResourceType { // ReportingIdentitySettings resource REPORTING_IDENTITY_SETTINGS = 34; + + // UserProvidedDataSettings resource + USER_PROVIDED_DATA_SETTINGS = 35; } // Status of the Google Signals settings. @@ -365,12 +368,14 @@ message Account { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/Account" pattern: "accounts/{account}" + plural: "accounts" + singular: "account" }; - // Output only. Resource name of this account. + // Identifier. Resource name of this account. // Format: accounts/{account} // Example: "accounts/100" - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. Time when this account was originally created. google.protobuf.Timestamp create_time = 2 @@ -406,12 +411,14 @@ message Property { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/Property" pattern: "properties/{property}" + plural: "properties" + singular: "property" }; - // Output only. Resource name of this property. + // Identifier. Resource name of this property. // Format: properties/{property_id} // Example: "properties/1000" - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Immutable. The property type for this Property resource. When creating a // property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then @@ -491,6 +498,8 @@ message DataStream { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/DataStream" pattern: "properties/{property}/dataStreams/{data_stream}" + plural: "dataStreams" + singular: "dataStream" }; // Data specific to web streams. @@ -565,10 +574,10 @@ message DataStream { IosAppStreamData ios_app_stream_data = 8; } - // Output only. Resource name of this Data Stream. + // Identifier. Resource name of this Data Stream. // Format: properties/{property_id}/dataStreams/{stream_id} // Example: "properties/1000/dataStreams/2000" - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. Immutable. The type of this DataStream resource. DataStreamType type = 2 [ @@ -597,10 +606,12 @@ message FirebaseLink { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/FirebaseLink" pattern: "properties/{property}/firebaseLinks/{firebase_link}" + plural: "firebaseLinks" + singular: "firebaseLink" }; - // Output only. Example format: properties/1234/firebaseLinks/5678 - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Identifier. Example format: properties/1234/firebaseLinks/5678 + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Immutable. Firebase project resource name. When creating a FirebaseLink, // you may provide this resource name using either a project number or project @@ -622,12 +633,14 @@ message GlobalSiteTag { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/GlobalSiteTag" pattern: "properties/{property}/dataStreams/{data_stream}/globalSiteTag" + plural: "globalSiteTags" + singular: "globalSiteTag" }; - // Output only. Resource name for this GlobalSiteTag resource. + // Identifier. Resource name for this GlobalSiteTag resource. // Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag // Example: "properties/123/dataStreams/456/globalSiteTag" - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Immutable. JavaScript code snippet to be pasted as the first item into the // head tag of every webpage to measure. @@ -639,13 +652,15 @@ message GoogleAdsLink { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/GoogleAdsLink" pattern: "properties/{property}/googleAdsLinks/{google_ads_link}" + plural: "googleAdsLinks" + singular: "googleAdsLink" }; - // Output only. Format: + // Identifier. Format: // properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} // // Note: googleAdsLinkId is not the Google Ads customer ID. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Immutable. Google Ads customer ID. string customer_id = 3 [(google.api.field_behavior) = IMMUTABLE]; @@ -678,12 +693,14 @@ message DataSharingSettings { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/DataSharingSettings" pattern: "accounts/{account}/dataSharingSettings" + plural: "dataSharingSettings" + singular: "dataSharingSettings" }; - // Output only. Resource name. + // Identifier. Resource name. // Format: accounts/{account}/dataSharingSettings // Example: "accounts/1000/dataSharingSettings" - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Allows Google technical support representatives access to your Google // Analytics data and account when necessary to provide service and find @@ -730,12 +747,14 @@ message AccountSummary { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/AccountSummary" pattern: "accountSummaries/{account_summary}" + plural: "accountSummaries" + singular: "accountSummary" }; - // Resource name for this account summary. + // Identifier. Resource name for this account summary. // Format: accountSummaries/{account_id} // Example: "accountSummaries/1000" - string name = 1; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Resource name of account referred to by this account summary // Format: accounts/{account_id} @@ -779,12 +798,14 @@ message MeasurementProtocolSecret { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" pattern: "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}" + plural: "measurementProtocolSecrets" + singular: "measurementProtocolSecret" }; - // Output only. Resource name of this secret. This secret may be a child of - // any type of stream. Format: + // Identifier. Resource name of this secret. This secret may be a child of any + // type of stream. Format: // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. Human-readable display name for this secret. string display_name = 2 [(google.api.field_behavior) = REQUIRED]; @@ -800,13 +821,15 @@ message SKAdNetworkConversionValueSchema { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema" pattern: "properties/{property}/dataStreams/{data_stream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}" + plural: "skAdNetworkConversionValueSchemas" + singular: "skAdNetworkConversionValueSchema" }; - // Output only. Resource name of the schema. This will be child of ONLY an iOS + // Identifier. Resource name of the schema. This will be child of ONLY an iOS // stream, and there can be at most one such child under an iOS stream. // Format: // properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. The conversion value settings for the first postback window. // These differ from values for postback window two and three in that they @@ -1042,6 +1065,9 @@ message ChangeHistoryChange { // A snapshot of a ReportingIdentitySettings resource in change history. ReportingIdentitySettings reporting_identity_settings = 34; + + // A snapshot of a UserProvidedDataSettings resource in change history. + UserProvidedDataSettings user_provided_data_settings = 35; } } @@ -1066,14 +1092,16 @@ message DisplayVideo360AdvertiserLink { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" pattern: "properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}" + plural: "displayVideo360AdvertiserLinks" + singular: "displayVideo360AdvertiserLink" }; - // Output only. The resource name for this DisplayVideo360AdvertiserLink + // Identifier. The resource name for this DisplayVideo360AdvertiserLink // resource. Format: // properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId} // // Note: linkId is not the Display & Video 360 Advertiser ID - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Immutable. The Display & Video 360 Advertiser's advertiser ID. string advertiser_id = 2 [(google.api.field_behavior) = IMMUTABLE]; @@ -1112,14 +1140,16 @@ message DisplayVideo360AdvertiserLinkProposal { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" pattern: "properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}" + plural: "displayVideo360AdvertiserLinkProposals" + singular: "displayVideo360AdvertiserLinkProposal" }; - // Output only. The resource name for this + // Identifier. The resource name for this // DisplayVideo360AdvertiserLinkProposal resource. Format: // properties/{propertyId}/displayVideo360AdvertiserLinkProposals/{proposalId} // // Note: proposalId is not the Display & Video 360 Advertiser ID - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Immutable. The Display & Video 360 Advertiser's advertiser ID. string advertiser_id = 2 [(google.api.field_behavior) = IMMUTABLE]; @@ -1163,13 +1193,15 @@ message SearchAds360Link { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/SearchAds360Link" pattern: "properties/{property}/searchAds360Links/{search_ads_360_link}" + plural: "searchAds360Links" + singular: "searchAds360Link" }; - // Output only. The resource name for this SearchAds360Link resource. + // Identifier. The resource name for this SearchAds360Link resource. // Format: properties/{propertyId}/searchAds360Links/{linkId} // // Note: linkId is not the Search Ads 360 advertiser ID - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Immutable. This field represents the Advertiser ID of the Search Ads 360 // Advertiser. that has been linked. @@ -1223,6 +1255,8 @@ message ConversionEvent { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/ConversionEvent" pattern: "properties/{property}/conversionEvents/{conversion_event}" + plural: "conversionEvents" + singular: "conversionEvent" }; // Defines a default value/currency for a conversion event. Both value and @@ -1253,9 +1287,9 @@ message ConversionEvent { ONCE_PER_SESSION = 2; } - // Output only. Resource name of this conversion event. + // Identifier. Resource name of this conversion event. // Format: properties/{property}/conversionEvents/{conversion_event} - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Immutable. The event name for this conversion event. // Examples: 'click', 'purchase' @@ -1381,6 +1415,8 @@ message CustomDimension { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/CustomDimension" pattern: "properties/{property}/customDimensions/{custom_dimension}" + plural: "customDimensions" + singular: "customDimension" }; // Valid values for the scope of this dimension. @@ -1398,9 +1434,9 @@ message CustomDimension { ITEM = 3; } - // Output only. Resource name for this CustomDimension resource. + // Identifier. Resource name for this CustomDimension resource. // Format: properties/{property}/customDimensions/{customDimension} - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. Immutable. Tagging parameter name for this custom dimension. // @@ -1449,6 +1485,8 @@ message CustomMetric { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/CustomMetric" pattern: "properties/{property}/customMetrics/{custom_metric}" + plural: "customMetrics" + singular: "customMetric" }; // Possible types of representing the custom metric's value. @@ -1512,9 +1550,9 @@ message CustomMetric { REVENUE_DATA = 2; } - // Output only. Resource name for this CustomMetric resource. + // Identifier. Resource name for this CustomMetric resource. // Format: properties/{property}/customMetrics/{customMetric} - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. Immutable. Tagging name for this custom metric. // @@ -1613,9 +1651,9 @@ message CalculatedMetric { REVENUE_DATA = 2; } - // Output only. Resource name for this CalculatedMetric. + // Identifier. Resource name for this CalculatedMetric. // Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}' - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Optional. Description for this calculated metric. // Max length of 4096 characters. @@ -1659,6 +1697,8 @@ message DataRetentionSettings { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/DataRetentionSettings" pattern: "properties/{property}/dataRetentionSettings" + plural: "dataRetentionSettings" + singular: "dataRetentionSettings" }; // Valid values for the data retention duration. @@ -1685,9 +1725,9 @@ message DataRetentionSettings { FIFTY_MONTHS = 6; } - // Output only. Resource name for this DataRetentionSetting resource. + // Identifier. Resource name for this DataRetentionSetting resource. // Format: properties/{property}/dataRetentionSettings - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. The length of time that event-level data is retained. RetentionDuration event_data_retention = 2 @@ -2220,3 +2260,29 @@ message ReportingIdentitySettings { // The strategy used for identifying user identities in reports. ReportingIdentity reporting_identity = 2; } + +// Configuration for user-provided data collection. This is a singleton resource +// for a Google Analytics property. +message UserProvidedDataSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/UserProvidedDataSettings" + pattern: "properties/{property}/userProvidedDataSettings" + plural: "userProvidedDataSettings" + singular: "userProvidedDataSettings" + }; + + // Identifier. Resource name of this setting. + // Format: properties/{property}/userProvidedDataSettings + // Example: "properties/1000/userProvidedDataSettings" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Whether this property accepts user-provided data sent to it. + bool user_provided_data_collection_enabled = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether this property allows a Google Tag to automatically + // collect user-provided data from your website. This setting only takes + // effect if `user_provided_data_collection_enabled` is also true. + bool automatically_detected_data_collection_enabled = 3 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/subproperty_event_filter.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/subproperty_event_filter.proto index 89e062a890a8..4a2e00a5103c 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/subproperty_event_filter.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/subproperty_event_filter.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-analytics-admin/protos/protos.d.ts b/packages/google-analytics-admin/protos/protos.d.ts index c078ce1a3ae4..816163f86ca9 100644 --- a/packages/google-analytics-admin/protos/protos.d.ts +++ b/packages/google-analytics-admin/protos/protos.d.ts @@ -4429,6 +4429,20 @@ export namespace google { * @returns Promise */ public getReportingIdentitySettings(request: google.analytics.admin.v1alpha.IGetReportingIdentitySettingsRequest): Promise; + + /** + * Calls GetUserProvidedDataSettings. + * @param request GetUserProvidedDataSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserProvidedDataSettings + */ + public getUserProvidedDataSettings(request: google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserProvidedDataSettingsCallback): void; + + /** + * Calls GetUserProvidedDataSettings. + * @param request GetUserProvidedDataSettingsRequest message or plain object + * @returns Promise + */ + public getUserProvidedDataSettings(request: google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest): Promise; } namespace AnalyticsAdminService { @@ -5510,6 +5524,13 @@ export namespace google { * @param [response] ReportingIdentitySettings */ type GetReportingIdentitySettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ReportingIdentitySettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getUserProvidedDataSettings}. + * @param error Error, if any + * @param [response] UserProvidedDataSettings + */ + type GetUserProvidedDataSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.UserProvidedDataSettings) => void; } /** Properties of a RunAccessReportRequest. */ @@ -25298,6 +25319,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a GetUserProvidedDataSettingsRequest. */ + interface IGetUserProvidedDataSettingsRequest { + + /** GetUserProvidedDataSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetUserProvidedDataSettingsRequest. */ + class GetUserProvidedDataSettingsRequest implements IGetUserProvidedDataSettingsRequest { + + /** + * Constructs a new GetUserProvidedDataSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest); + + /** GetUserProvidedDataSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetUserProvidedDataSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserProvidedDataSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest): google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest; + + /** + * Encodes the specified GetUserProvidedDataSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest.verify|verify} messages. + * @param message GetUserProvidedDataSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserProvidedDataSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest.verify|verify} messages. + * @param message GetUserProvidedDataSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserProvidedDataSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserProvidedDataSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest; + + /** + * Decodes a GetUserProvidedDataSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserProvidedDataSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest; + + /** + * Verifies a GetUserProvidedDataSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserProvidedDataSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserProvidedDataSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest; + + /** + * Creates a plain object from a GetUserProvidedDataSettingsRequest message. Also converts values to other types if specified. + * @param message GetUserProvidedDataSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserProvidedDataSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserProvidedDataSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** AudienceFilterScope enum. */ enum AudienceFilterScope { AUDIENCE_FILTER_SCOPE_UNSPECIFIED = 0, @@ -29057,7 +29175,8 @@ export namespace google { CALCULATED_METRIC = 31, REPORTING_DATA_ANNOTATION = 32, SUBPROPERTY_SYNC_CONFIG = 33, - REPORTING_IDENTITY_SETTINGS = 34 + REPORTING_IDENTITY_SETTINGS = 34, + USER_PROVIDED_DATA_SETTINGS = 35 } /** GoogleSignalsState enum. */ @@ -31488,6 +31607,9 @@ export namespace google { /** ChangeHistoryResource reportingIdentitySettings */ reportingIdentitySettings?: (google.analytics.admin.v1alpha.IReportingIdentitySettings|null); + + /** ChangeHistoryResource userProvidedDataSettings */ + userProvidedDataSettings?: (google.analytics.admin.v1alpha.IUserProvidedDataSettings|null); } /** Represents a ChangeHistoryResource. */ @@ -31586,8 +31708,11 @@ export namespace google { /** ChangeHistoryResource reportingIdentitySettings. */ public reportingIdentitySettings?: (google.analytics.admin.v1alpha.IReportingIdentitySettings|null); + /** ChangeHistoryResource userProvidedDataSettings. */ + public userProvidedDataSettings?: (google.analytics.admin.v1alpha.IUserProvidedDataSettings|null); + /** ChangeHistoryResource resource. */ - public resource?: ("account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"channelGroup"|"bigqueryLink"|"enhancedMeasurementSettings"|"dataRedactionSettings"|"skadnetworkConversionValueSchema"|"adsenseLink"|"audience"|"eventCreateRule"|"keyEvent"|"calculatedMetric"|"reportingDataAnnotation"|"subpropertySyncConfig"|"reportingIdentitySettings"); + public resource?: ("account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"channelGroup"|"bigqueryLink"|"enhancedMeasurementSettings"|"dataRedactionSettings"|"skadnetworkConversionValueSchema"|"adsenseLink"|"audience"|"eventCreateRule"|"keyEvent"|"calculatedMetric"|"reportingDataAnnotation"|"subpropertySyncConfig"|"reportingIdentitySettings"|"userProvidedDataSettings"); /** * Creates a new ChangeHistoryResource instance using the specified properties. @@ -34754,6 +34879,115 @@ export namespace google { } } + /** Properties of a UserProvidedDataSettings. */ + interface IUserProvidedDataSettings { + + /** UserProvidedDataSettings name */ + name?: (string|null); + + /** UserProvidedDataSettings userProvidedDataCollectionEnabled */ + userProvidedDataCollectionEnabled?: (boolean|null); + + /** UserProvidedDataSettings automaticallyDetectedDataCollectionEnabled */ + automaticallyDetectedDataCollectionEnabled?: (boolean|null); + } + + /** Represents a UserProvidedDataSettings. */ + class UserProvidedDataSettings implements IUserProvidedDataSettings { + + /** + * Constructs a new UserProvidedDataSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUserProvidedDataSettings); + + /** UserProvidedDataSettings name. */ + public name: string; + + /** UserProvidedDataSettings userProvidedDataCollectionEnabled. */ + public userProvidedDataCollectionEnabled: boolean; + + /** UserProvidedDataSettings automaticallyDetectedDataCollectionEnabled. */ + public automaticallyDetectedDataCollectionEnabled: boolean; + + /** + * Creates a new UserProvidedDataSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns UserProvidedDataSettings instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUserProvidedDataSettings): google.analytics.admin.v1alpha.UserProvidedDataSettings; + + /** + * Encodes the specified UserProvidedDataSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.UserProvidedDataSettings.verify|verify} messages. + * @param message UserProvidedDataSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUserProvidedDataSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserProvidedDataSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UserProvidedDataSettings.verify|verify} messages. + * @param message UserProvidedDataSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUserProvidedDataSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserProvidedDataSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserProvidedDataSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UserProvidedDataSettings; + + /** + * Decodes a UserProvidedDataSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserProvidedDataSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UserProvidedDataSettings; + + /** + * Verifies a UserProvidedDataSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserProvidedDataSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserProvidedDataSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UserProvidedDataSettings; + + /** + * Creates a plain object from a UserProvidedDataSettings message. Also converts values to other types if specified. + * @param message UserProvidedDataSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UserProvidedDataSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserProvidedDataSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserProvidedDataSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a SubpropertyEventFilterCondition. */ interface ISubpropertyEventFilterCondition { diff --git a/packages/google-analytics-admin/protos/protos.js b/packages/google-analytics-admin/protos/protos.js index a3a7aa5f1d77..7a73bd7c7215 100644 --- a/packages/google-analytics-admin/protos/protos.js +++ b/packages/google-analytics-admin/protos/protos.js @@ -10510,6 +10510,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getUserProvidedDataSettings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetUserProvidedDataSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.UserProvidedDataSettings} [response] UserProvidedDataSettings + */ + + /** + * Calls GetUserProvidedDataSettings. + * @function getUserProvidedDataSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest} request GetUserProvidedDataSettingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserProvidedDataSettingsCallback} callback Node-style callback called with the error, if any, and UserProvidedDataSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getUserProvidedDataSettings = function getUserProvidedDataSettings(request, callback) { + return this.rpcCall(getUserProvidedDataSettings, $root.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest, $root.google.analytics.admin.v1alpha.UserProvidedDataSettings, request, callback); + }, "name", { value: "GetUserProvidedDataSettings" }); + + /** + * Calls GetUserProvidedDataSettings. + * @function getUserProvidedDataSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest} request GetUserProvidedDataSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return AnalyticsAdminService; })(); @@ -18201,6 +18234,7 @@ case 32: case 33: case 34: + case 35: break; } } @@ -18391,6 +18425,10 @@ case 34: message.resourceType[i] = 34; break; + case "USER_PROVIDED_DATA_SETTINGS": + case 35: + message.resourceType[i] = 35; + break; } } if (object.action) { @@ -56034,6 +56072,211 @@ return GetReportingIdentitySettingsRequest; })(); + v1alpha.GetUserProvidedDataSettingsRequest = (function() { + + /** + * Properties of a GetUserProvidedDataSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetUserProvidedDataSettingsRequest + * @property {string|null} [name] GetUserProvidedDataSettingsRequest name + */ + + /** + * Constructs a new GetUserProvidedDataSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetUserProvidedDataSettingsRequest. + * @implements IGetUserProvidedDataSettingsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest=} [properties] Properties to set + */ + function GetUserProvidedDataSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserProvidedDataSettingsRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @instance + */ + GetUserProvidedDataSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetUserProvidedDataSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest} GetUserProvidedDataSettingsRequest instance + */ + GetUserProvidedDataSettingsRequest.create = function create(properties) { + return new GetUserProvidedDataSettingsRequest(properties); + }; + + /** + * Encodes the specified GetUserProvidedDataSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest} message GetUserProvidedDataSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserProvidedDataSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetUserProvidedDataSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest} message GetUserProvidedDataSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserProvidedDataSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserProvidedDataSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest} GetUserProvidedDataSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserProvidedDataSettingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetUserProvidedDataSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest} GetUserProvidedDataSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserProvidedDataSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserProvidedDataSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserProvidedDataSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetUserProvidedDataSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest} GetUserProvidedDataSettingsRequest + */ + GetUserProvidedDataSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserProvidedDataSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest} message GetUserProvidedDataSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserProvidedDataSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetUserProvidedDataSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserProvidedDataSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserProvidedDataSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserProvidedDataSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest"; + }; + + return GetUserProvidedDataSettingsRequest; + })(); + /** * AudienceFilterScope enum. * @name google.analytics.admin.v1alpha.AudienceFilterScope @@ -65727,6 +65970,7 @@ * @property {number} REPORTING_DATA_ANNOTATION=32 REPORTING_DATA_ANNOTATION value * @property {number} SUBPROPERTY_SYNC_CONFIG=33 SUBPROPERTY_SYNC_CONFIG value * @property {number} REPORTING_IDENTITY_SETTINGS=34 REPORTING_IDENTITY_SETTINGS value + * @property {number} USER_PROVIDED_DATA_SETTINGS=35 USER_PROVIDED_DATA_SETTINGS value */ v1alpha.ChangeHistoryResourceType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -65760,6 +66004,7 @@ values[valuesById[32] = "REPORTING_DATA_ANNOTATION"] = 32; values[valuesById[33] = "SUBPROPERTY_SYNC_CONFIG"] = 33; values[valuesById[34] = "REPORTING_IDENTITY_SETTINGS"] = 34; + values[valuesById[35] = "USER_PROVIDED_DATA_SETTINGS"] = 35; return values; })(); @@ -72136,6 +72381,7 @@ * @property {google.analytics.admin.v1alpha.IReportingDataAnnotation|null} [reportingDataAnnotation] ChangeHistoryResource reportingDataAnnotation * @property {google.analytics.admin.v1alpha.ISubpropertySyncConfig|null} [subpropertySyncConfig] ChangeHistoryResource subpropertySyncConfig * @property {google.analytics.admin.v1alpha.IReportingIdentitySettings|null} [reportingIdentitySettings] ChangeHistoryResource reportingIdentitySettings + * @property {google.analytics.admin.v1alpha.IUserProvidedDataSettings|null} [userProvidedDataSettings] ChangeHistoryResource userProvidedDataSettings */ /** @@ -72385,17 +72631,25 @@ */ ChangeHistoryResource.prototype.reportingIdentitySettings = null; + /** + * ChangeHistoryResource userProvidedDataSettings. + * @member {google.analytics.admin.v1alpha.IUserProvidedDataSettings|null|undefined} userProvidedDataSettings + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.userProvidedDataSettings = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * ChangeHistoryResource resource. - * @member {"account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"channelGroup"|"bigqueryLink"|"enhancedMeasurementSettings"|"dataRedactionSettings"|"skadnetworkConversionValueSchema"|"adsenseLink"|"audience"|"eventCreateRule"|"keyEvent"|"calculatedMetric"|"reportingDataAnnotation"|"subpropertySyncConfig"|"reportingIdentitySettings"|undefined} resource + * @member {"account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"channelGroup"|"bigqueryLink"|"enhancedMeasurementSettings"|"dataRedactionSettings"|"skadnetworkConversionValueSchema"|"adsenseLink"|"audience"|"eventCreateRule"|"keyEvent"|"calculatedMetric"|"reportingDataAnnotation"|"subpropertySyncConfig"|"reportingIdentitySettings"|"userProvidedDataSettings"|undefined} resource * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource * @instance */ Object.defineProperty(ChangeHistoryResource.prototype, "resource", { - get: $util.oneOfGetter($oneOfFields = ["account", "property", "firebaseLink", "googleAdsLink", "googleSignalsSettings", "displayVideo_360AdvertiserLink", "displayVideo_360AdvertiserLinkProposal", "conversionEvent", "measurementProtocolSecret", "customDimension", "customMetric", "dataRetentionSettings", "searchAds_360Link", "dataStream", "attributionSettings", "expandedDataSet", "channelGroup", "bigqueryLink", "enhancedMeasurementSettings", "dataRedactionSettings", "skadnetworkConversionValueSchema", "adsenseLink", "audience", "eventCreateRule", "keyEvent", "calculatedMetric", "reportingDataAnnotation", "subpropertySyncConfig", "reportingIdentitySettings"]), + get: $util.oneOfGetter($oneOfFields = ["account", "property", "firebaseLink", "googleAdsLink", "googleSignalsSettings", "displayVideo_360AdvertiserLink", "displayVideo_360AdvertiserLinkProposal", "conversionEvent", "measurementProtocolSecret", "customDimension", "customMetric", "dataRetentionSettings", "searchAds_360Link", "dataStream", "attributionSettings", "expandedDataSet", "channelGroup", "bigqueryLink", "enhancedMeasurementSettings", "dataRedactionSettings", "skadnetworkConversionValueSchema", "adsenseLink", "audience", "eventCreateRule", "keyEvent", "calculatedMetric", "reportingDataAnnotation", "subpropertySyncConfig", "reportingIdentitySettings", "userProvidedDataSettings"]), set: $util.oneOfSetter($oneOfFields) }); @@ -72481,6 +72735,8 @@ $root.google.analytics.admin.v1alpha.SubpropertySyncConfig.encode(message.subpropertySyncConfig, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); if (message.reportingIdentitySettings != null && Object.hasOwnProperty.call(message, "reportingIdentitySettings")) $root.google.analytics.admin.v1alpha.ReportingIdentitySettings.encode(message.reportingIdentitySettings, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.userProvidedDataSettings != null && Object.hasOwnProperty.call(message, "userProvidedDataSettings")) + $root.google.analytics.admin.v1alpha.UserProvidedDataSettings.encode(message.userProvidedDataSettings, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); return writer; }; @@ -72633,6 +72889,10 @@ message.reportingIdentitySettings = $root.google.analytics.admin.v1alpha.ReportingIdentitySettings.decode(reader, reader.uint32()); break; } + case 35: { + message.userProvidedDataSettings = $root.google.analytics.admin.v1alpha.UserProvidedDataSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -72957,6 +73217,16 @@ return "reportingIdentitySettings." + error; } } + if (message.userProvidedDataSettings != null && message.hasOwnProperty("userProvidedDataSettings")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.UserProvidedDataSettings.verify(message.userProvidedDataSettings); + if (error) + return "userProvidedDataSettings." + error; + } + } return null; }; @@ -73117,6 +73387,11 @@ throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.reportingIdentitySettings: object expected"); message.reportingIdentitySettings = $root.google.analytics.admin.v1alpha.ReportingIdentitySettings.fromObject(object.reportingIdentitySettings); } + if (object.userProvidedDataSettings != null) { + if (typeof object.userProvidedDataSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.userProvidedDataSettings: object expected"); + message.userProvidedDataSettings = $root.google.analytics.admin.v1alpha.UserProvidedDataSettings.fromObject(object.userProvidedDataSettings); + } return message; }; @@ -73278,6 +73553,11 @@ if (options.oneofs) object.resource = "reportingIdentitySettings"; } + if (message.userProvidedDataSettings != null && message.hasOwnProperty("userProvidedDataSettings")) { + object.userProvidedDataSettings = $root.google.analytics.admin.v1alpha.UserProvidedDataSettings.toObject(message.userProvidedDataSettings, options); + if (options.oneofs) + object.resource = "userProvidedDataSettings"; + } return object; }; @@ -81779,6 +82059,258 @@ return ReportingIdentitySettings; })(); + v1alpha.UserProvidedDataSettings = (function() { + + /** + * Properties of a UserProvidedDataSettings. + * @memberof google.analytics.admin.v1alpha + * @interface IUserProvidedDataSettings + * @property {string|null} [name] UserProvidedDataSettings name + * @property {boolean|null} [userProvidedDataCollectionEnabled] UserProvidedDataSettings userProvidedDataCollectionEnabled + * @property {boolean|null} [automaticallyDetectedDataCollectionEnabled] UserProvidedDataSettings automaticallyDetectedDataCollectionEnabled + */ + + /** + * Constructs a new UserProvidedDataSettings. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a UserProvidedDataSettings. + * @implements IUserProvidedDataSettings + * @constructor + * @param {google.analytics.admin.v1alpha.IUserProvidedDataSettings=} [properties] Properties to set + */ + function UserProvidedDataSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserProvidedDataSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @instance + */ + UserProvidedDataSettings.prototype.name = ""; + + /** + * UserProvidedDataSettings userProvidedDataCollectionEnabled. + * @member {boolean} userProvidedDataCollectionEnabled + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @instance + */ + UserProvidedDataSettings.prototype.userProvidedDataCollectionEnabled = false; + + /** + * UserProvidedDataSettings automaticallyDetectedDataCollectionEnabled. + * @member {boolean} automaticallyDetectedDataCollectionEnabled + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @instance + */ + UserProvidedDataSettings.prototype.automaticallyDetectedDataCollectionEnabled = false; + + /** + * Creates a new UserProvidedDataSettings instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @static + * @param {google.analytics.admin.v1alpha.IUserProvidedDataSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UserProvidedDataSettings} UserProvidedDataSettings instance + */ + UserProvidedDataSettings.create = function create(properties) { + return new UserProvidedDataSettings(properties); + }; + + /** + * Encodes the specified UserProvidedDataSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.UserProvidedDataSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @static + * @param {google.analytics.admin.v1alpha.IUserProvidedDataSettings} message UserProvidedDataSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserProvidedDataSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.userProvidedDataCollectionEnabled != null && Object.hasOwnProperty.call(message, "userProvidedDataCollectionEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.userProvidedDataCollectionEnabled); + if (message.automaticallyDetectedDataCollectionEnabled != null && Object.hasOwnProperty.call(message, "automaticallyDetectedDataCollectionEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.automaticallyDetectedDataCollectionEnabled); + return writer; + }; + + /** + * Encodes the specified UserProvidedDataSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UserProvidedDataSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @static + * @param {google.analytics.admin.v1alpha.IUserProvidedDataSettings} message UserProvidedDataSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserProvidedDataSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserProvidedDataSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UserProvidedDataSettings} UserProvidedDataSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserProvidedDataSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UserProvidedDataSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.userProvidedDataCollectionEnabled = reader.bool(); + break; + } + case 3: { + message.automaticallyDetectedDataCollectionEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserProvidedDataSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UserProvidedDataSettings} UserProvidedDataSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserProvidedDataSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserProvidedDataSettings message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserProvidedDataSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.userProvidedDataCollectionEnabled != null && message.hasOwnProperty("userProvidedDataCollectionEnabled")) + if (typeof message.userProvidedDataCollectionEnabled !== "boolean") + return "userProvidedDataCollectionEnabled: boolean expected"; + if (message.automaticallyDetectedDataCollectionEnabled != null && message.hasOwnProperty("automaticallyDetectedDataCollectionEnabled")) + if (typeof message.automaticallyDetectedDataCollectionEnabled !== "boolean") + return "automaticallyDetectedDataCollectionEnabled: boolean expected"; + return null; + }; + + /** + * Creates a UserProvidedDataSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UserProvidedDataSettings} UserProvidedDataSettings + */ + UserProvidedDataSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UserProvidedDataSettings) + return object; + var message = new $root.google.analytics.admin.v1alpha.UserProvidedDataSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.userProvidedDataCollectionEnabled != null) + message.userProvidedDataCollectionEnabled = Boolean(object.userProvidedDataCollectionEnabled); + if (object.automaticallyDetectedDataCollectionEnabled != null) + message.automaticallyDetectedDataCollectionEnabled = Boolean(object.automaticallyDetectedDataCollectionEnabled); + return message; + }; + + /** + * Creates a plain object from a UserProvidedDataSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @static + * @param {google.analytics.admin.v1alpha.UserProvidedDataSettings} message UserProvidedDataSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserProvidedDataSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.userProvidedDataCollectionEnabled = false; + object.automaticallyDetectedDataCollectionEnabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userProvidedDataCollectionEnabled != null && message.hasOwnProperty("userProvidedDataCollectionEnabled")) + object.userProvidedDataCollectionEnabled = message.userProvidedDataCollectionEnabled; + if (message.automaticallyDetectedDataCollectionEnabled != null && message.hasOwnProperty("automaticallyDetectedDataCollectionEnabled")) + object.automaticallyDetectedDataCollectionEnabled = message.automaticallyDetectedDataCollectionEnabled; + return object; + }; + + /** + * Converts this UserProvidedDataSettings to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @instance + * @returns {Object.} JSON object + */ + UserProvidedDataSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserProvidedDataSettings + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UserProvidedDataSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserProvidedDataSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UserProvidedDataSettings"; + }; + + return UserProvidedDataSettings; + })(); + v1alpha.SubpropertyEventFilterCondition = (function() { /** diff --git a/packages/google-analytics-admin/protos/protos.json b/packages/google-analytics-admin/protos/protos.json index 0bba7ee8f533..500d56de6fef 100644 --- a/packages/google-analytics-admin/protos/protos.json +++ b/packages/google-analytics-admin/protos/protos.json @@ -3272,6 +3272,24 @@ "(google.api.method_signature)": "name" } ] + }, + "GetUserProvidedDataSettings": { + "requestType": "GetUserProvidedDataSettingsRequest", + "responseType": "UserProvidedDataSettings", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/userProvidedDataSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/userProvidedDataSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -3384,11 +3402,17 @@ "fields": { "pageSize": { "type": "int32", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "showDeleted": { "type": "bool", @@ -3482,11 +3506,17 @@ }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "showDeleted": { "type": "bool", @@ -3591,11 +3621,17 @@ }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -3682,11 +3718,17 @@ }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -3719,11 +3761,17 @@ "fields": { "pageSize": { "type": "int32", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -3920,11 +3968,17 @@ }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -4014,11 +4068,17 @@ }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -4138,11 +4198,17 @@ }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -4232,11 +4298,17 @@ }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -4589,11 +4661,17 @@ }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -6389,6 +6467,18 @@ } } }, + "GetUserProvidedDataSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/UserProvidedDataSettings" + } + } + } + }, "AudienceFilterScope": { "values": { "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": 0, @@ -7447,7 +7537,8 @@ "CALCULATED_METRIC": 31, "REPORTING_DATA_ANNOTATION": 32, "SUBPROPERTY_SYNC_CONFIG": 33, - "REPORTING_IDENTITY_SETTINGS": 34 + "REPORTING_IDENTITY_SETTINGS": 34, + "USER_PROVIDED_DATA_SETTINGS": 35 } }, "GoogleSignalsState": { @@ -7501,14 +7592,16 @@ "Account": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/Account", - "(google.api.resource).pattern": "accounts/{account}" + "(google.api.resource).pattern": "accounts/{account}", + "(google.api.resource).plural": "accounts", + "(google.api.resource).singular": "account" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "createTime": { @@ -7556,14 +7649,16 @@ "Property": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/Property", - "(google.api.resource).pattern": "properties/{property}" + "(google.api.resource).pattern": "properties/{property}", + "(google.api.resource).plural": "properties", + "(google.api.resource).singular": "property" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "propertyType": { @@ -7650,7 +7745,9 @@ "DataStream": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/DataStream", - "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}" + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}", + "(google.api.resource).plural": "dataStreams", + "(google.api.resource).singular": "dataStream" }, "oneofs": { "streamData": { @@ -7678,7 +7775,7 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "type": { @@ -7779,14 +7876,16 @@ "FirebaseLink": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/FirebaseLink", - "(google.api.resource).pattern": "properties/{property}/firebaseLinks/{firebase_link}" + "(google.api.resource).pattern": "properties/{property}/firebaseLinks/{firebase_link}", + "(google.api.resource).plural": "firebaseLinks", + "(google.api.resource).singular": "firebaseLink" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "project": { @@ -7808,14 +7907,16 @@ "GlobalSiteTag": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/GlobalSiteTag", - "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/globalSiteTag" + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/globalSiteTag", + "(google.api.resource).plural": "globalSiteTags", + "(google.api.resource).singular": "globalSiteTag" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "snippet": { @@ -7830,14 +7931,16 @@ "GoogleAdsLink": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/GoogleAdsLink", - "(google.api.resource).pattern": "properties/{property}/googleAdsLinks/{google_ads_link}" + "(google.api.resource).pattern": "properties/{property}/googleAdsLinks/{google_ads_link}", + "(google.api.resource).plural": "googleAdsLinks", + "(google.api.resource).singular": "googleAdsLink" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "customerId": { @@ -7884,14 +7987,16 @@ "DataSharingSettings": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/DataSharingSettings", - "(google.api.resource).pattern": "accounts/{account}/dataSharingSettings" + "(google.api.resource).pattern": "accounts/{account}/dataSharingSettings", + "(google.api.resource).plural": "dataSharingSettings", + "(google.api.resource).singular": "dataSharingSettings" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "sharingWithGoogleSupportEnabled": { @@ -7922,12 +8027,17 @@ "AccountSummary": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/AccountSummary", - "(google.api.resource).pattern": "accountSummaries/{account_summary}" + "(google.api.resource).pattern": "accountSummaries/{account_summary}", + "(google.api.resource).plural": "accountSummaries", + "(google.api.resource).singular": "accountSummary" }, "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } }, "account": { "type": "string", @@ -7973,14 +8083,16 @@ "MeasurementProtocolSecret": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret", - "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}" + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}", + "(google.api.resource).plural": "measurementProtocolSecrets", + "(google.api.resource).singular": "measurementProtocolSecret" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "displayName": { @@ -8002,14 +8114,16 @@ "SKAdNetworkConversionValueSchema": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema", - "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}" + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}", + "(google.api.resource).plural": "skAdNetworkConversionValueSchemas", + "(google.api.resource).singular": "skAdNetworkConversionValueSchema" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "postbackWindowOne": { @@ -8226,7 +8340,8 @@ "calculatedMetric", "reportingDataAnnotation", "subpropertySyncConfig", - "reportingIdentitySettings" + "reportingIdentitySettings", + "userProvidedDataSettings" ] } }, @@ -8346,6 +8461,10 @@ "reportingIdentitySettings": { "type": "ReportingIdentitySettings", "id": 34 + }, + "userProvidedDataSettings": { + "type": "UserProvidedDataSettings", + "id": 35 } } } @@ -8354,14 +8473,16 @@ "DisplayVideo360AdvertiserLink": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink", - "(google.api.resource).pattern": "properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}" + "(google.api.resource).pattern": "properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}", + "(google.api.resource).plural": "displayVideo360AdvertiserLinks", + "(google.api.resource).singular": "displayVideo360AdvertiserLink" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "advertiserId": { @@ -8401,14 +8522,16 @@ "DisplayVideo360AdvertiserLinkProposal": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal", - "(google.api.resource).pattern": "properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}" + "(google.api.resource).pattern": "properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}", + "(google.api.resource).plural": "displayVideo360AdvertiserLinkProposals", + "(google.api.resource).singular": "displayVideo360AdvertiserLinkProposal" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "advertiserId": { @@ -8465,14 +8588,16 @@ "SearchAds360Link": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/SearchAds360Link", - "(google.api.resource).pattern": "properties/{property}/searchAds360Links/{search_ads_360_link}" + "(google.api.resource).pattern": "properties/{property}/searchAds360Links/{search_ads_360_link}", + "(google.api.resource).plural": "searchAds360Links", + "(google.api.resource).singular": "searchAds360Link" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "advertiserId": { @@ -8541,7 +8666,9 @@ "ConversionEvent": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/ConversionEvent", - "(google.api.resource).pattern": "properties/{property}/conversionEvents/{conversion_event}" + "(google.api.resource).pattern": "properties/{property}/conversionEvents/{conversion_event}", + "(google.api.resource).plural": "conversionEvents", + "(google.api.resource).singular": "conversionEvent" }, "oneofs": { "_defaultConversionValue": { @@ -8555,7 +8682,7 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "eventName": { @@ -8757,14 +8884,16 @@ "CustomDimension": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/CustomDimension", - "(google.api.resource).pattern": "properties/{property}/customDimensions/{custom_dimension}" + "(google.api.resource).pattern": "properties/{property}/customDimensions/{custom_dimension}", + "(google.api.resource).plural": "customDimensions", + "(google.api.resource).singular": "customDimension" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "parameterName": { @@ -8817,14 +8946,16 @@ "CustomMetric": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/CustomMetric", - "(google.api.resource).pattern": "properties/{property}/customMetrics/{custom_metric}" + "(google.api.resource).pattern": "properties/{property}/customMetrics/{custom_metric}", + "(google.api.resource).plural": "customMetrics", + "(google.api.resource).singular": "customMetric" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "parameterName": { @@ -8914,7 +9045,7 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "description": { @@ -8996,14 +9127,16 @@ "DataRetentionSettings": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/DataRetentionSettings", - "(google.api.resource).pattern": "properties/{property}/dataRetentionSettings" + "(google.api.resource).pattern": "properties/{property}/dataRetentionSettings", + "(google.api.resource).plural": "dataRetentionSettings", + "(google.api.resource).singular": "dataRetentionSettings" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "eventDataRetention": { @@ -9503,6 +9636,37 @@ } } }, + "UserProvidedDataSettings": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/UserProvidedDataSettings", + "(google.api.resource).pattern": "properties/{property}/userProvidedDataSettings", + "(google.api.resource).plural": "userProvidedDataSettings", + "(google.api.resource).singular": "userProvidedDataSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "userProvidedDataCollectionEnabled": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "automaticallyDetectedDataCollectionEnabled": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "SubpropertyEventFilterCondition": { "oneofs": { "oneFilter": { diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_provided_data_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_provided_data_settings.js new file mode 100644 index 000000000000..2d739bdce970 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_provided_data_settings.js @@ -0,0 +1,62 @@ +// Copyright 2026 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(name) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserProvidedDataSettings_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. + */ + /** + * Required. The name of the user provided data settings to retrieve. + * Format: properties/{property}/userProvidedDataSettings + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetUserProvidedDataSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getUserProvidedDataSettings(request); + console.log(response); + } + + callGetUserProvidedDataSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserProvidedDataSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js index 501ba8b48233..f07f9c228562 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js @@ -29,17 +29,17 @@ function main() { * TODO(developer): Uncomment these variables before running the sample. */ /** - * The maximum number of AccountSummary resources to return. The service may - * return fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * Optional. The maximum number of AccountSummary resources to return. The + * service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 resources will be returned. The maximum + * value is 200; (higher values will be coerced to the maximum) */ // const pageSize = 1234 /** - * A page token, received from a previous `ListAccountSummaries` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccountSummaries` - * must match the call that provided the page token. + * Optional. A page token, received from a previous `ListAccountSummaries` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListAccountSummaries` must match the call + * that provided the page token. */ // const pageToken = 'abc123' diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js index 081ee851009c..43f9e891113e 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js @@ -29,14 +29,14 @@ function main() { * TODO(developer): Uncomment these variables before running the sample. */ /** - * The maximum number of resources to return. The service may return + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) */ // const pageSize = 1234 /** - * A page token, received from a previous `ListAccounts` call. + * Optional. A page token, received from a previous `ListAccounts` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListAccounts` must * match the call that provided the page token. diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js index 621073e2f47c..cea8e0e4b4e5 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js @@ -34,16 +34,16 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of resources to return. + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) */ // const pageSize = 1234 /** - * A page token, received from a previous `ListConversionEvents` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` - * must match the call that provided the page token. + * Optional. A page token, received from a previous `ListConversionEvents` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListConversionEvents` must match the call + * that provided the page token. */ // const pageToken = 'abc123' diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js index f2bf896db708..3b7d68ef302f 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js @@ -33,14 +33,14 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of resources to return. + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). */ // const pageSize = 1234 /** - * A page token, received from a previous `ListCustomDimensions` call. - * Provide this to retrieve the subsequent page. + * Optional. A page token, received from a previous `ListCustomDimensions` + * call. Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListCustomDimensions` * must match the call that provided the page token. */ diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js index 10b7e96dbed9..0f2fbdbb5bf0 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js @@ -34,14 +34,14 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of resources to return. The service may return + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) */ // const pageSize = 1234 /** - * A page token, received from a previous `ListFirebaseLinks` call. + * Optional. A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js index 7afdef066fa3..358e3472c97e 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js @@ -33,13 +33,13 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of resources to return. + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). */ // const pageSize = 1234 /** - * A page token, received from a previous `ListGoogleAdsLinks` call. + * Optional. A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListGoogleAdsLinks` must * match the call that provided the page token. diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_key_events.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_key_events.js index 2a73b08ed5aa..c6b438fc3461 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_key_events.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_key_events.js @@ -34,13 +34,13 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of resources to return. + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) */ // const pageSize = 1234 /** - * A page token, received from a previous `ListKeyEvents` call. + * Optional. A page token, received from a previous `ListKeyEvents` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListKeyEvents` * must match the call that provided the page token. diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js index ab4a471ce342..ca339fd6623f 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js @@ -35,16 +35,17 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of resources to return. + * Optional. The maximum number of resources to return. * If unspecified, at most 10 resources will be returned. * The maximum value is 10. Higher values will be coerced to the maximum. */ // const pageSize = 1234 /** - * A page token, received from a previous `ListMeasurementProtocolSecrets` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListMeasurementProtocolSecrets` must match - * the call that provided the page token. + * Optional. A page token, received from a previous + * `ListMeasurementProtocolSecrets` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListMeasurementProtocolSecrets` must match the call that provided the page + * token. */ // const pageToken = 'abc123' diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js index d7b8cd0343b1..1210d7f4ac0f 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js @@ -47,14 +47,14 @@ function main(filter) { */ // const filter = 'abc123' /** - * The maximum number of resources to return. The service may return + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) */ // const pageSize = 1234 /** - * A page token, received from a previous `ListProperties` call. + * Optional. A page token, received from a previous `ListProperties` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListProperties` must * match the call that provided the page token. diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_s_k_ad_network_conversion_value_schemas.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_s_k_ad_network_conversion_value_schemas.js index a938c959a6ca..21d326e0c5aa 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_s_k_ad_network_conversion_value_schemas.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_s_k_ad_network_conversion_value_schemas.js @@ -36,14 +36,14 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of resources to return. The service may return + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) */ // const pageSize = 1234 /** - * A page token, received from a previous + * Optional. A page token, received from a previous * `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * `ListSKAdNetworkConversionValueSchema` must match the call that provided diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json index 4a84573b083c..c56b5e2941a5 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json +++ b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json @@ -926,7 +926,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 71, "type": "FULL" } ], @@ -6707,7 +6707,7 @@ "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetReportingIdentitySettings_async", "title": "AnalyticsAdminService getReportingIdentitySettings Sample", "origin": "API_DEFINITION", - "description": " Returns the singleton data retention settings for this property.", + "description": " Returns the reporting identity settings for this property.", "canonical": true, "file": "analytics_admin_service.get_reporting_identity_settings.js", "language": "JAVASCRIPT", @@ -6742,6 +6742,46 @@ } } } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserProvidedDataSettings_async", + "title": "AnalyticsAdminService getUserProvidedDataSettings Sample", + "origin": "API_DEFINITION", + "description": " Looks up settings related to user-provided data for a property.", + "canonical": true, + "file": "analytics_admin_service.get_user_provided_data_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserProvidedDataSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserProvidedDataSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.UserProvidedDataSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetUserProvidedDataSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserProvidedDataSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } } ] } diff --git a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts index ed1dd95aeb83..d6b042d51303 100644 --- a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts +++ b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts @@ -288,6 +288,9 @@ export class AnalyticsAdminServiceClient { subpropertySyncConfigPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}/subpropertySyncConfigs/{subproperty_sync_config}' ), + userProvidedDataSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/userProvidedDataSettings' + ), }; // Some of the methods on this service return "paged" results, @@ -397,7 +400,7 @@ export class AnalyticsAdminServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const analyticsAdminServiceStubMethods = - ['getAccount', 'listAccounts', 'deleteAccount', 'updateAccount', 'provisionAccountTicket', 'listAccountSummaries', 'getProperty', 'listProperties', 'createProperty', 'deleteProperty', 'updateProperty', 'createFirebaseLink', 'deleteFirebaseLink', 'listFirebaseLinks', 'getGlobalSiteTag', 'createGoogleAdsLink', 'updateGoogleAdsLink', 'deleteGoogleAdsLink', 'listGoogleAdsLinks', 'getDataSharingSettings', 'getMeasurementProtocolSecret', 'listMeasurementProtocolSecrets', 'createMeasurementProtocolSecret', 'deleteMeasurementProtocolSecret', 'updateMeasurementProtocolSecret', 'acknowledgeUserDataCollection', 'getSkAdNetworkConversionValueSchema', 'createSkAdNetworkConversionValueSchema', 'deleteSkAdNetworkConversionValueSchema', 'updateSkAdNetworkConversionValueSchema', 'listSkAdNetworkConversionValueSchemas', 'searchChangeHistoryEvents', 'getGoogleSignalsSettings', 'updateGoogleSignalsSettings', 'createConversionEvent', 'updateConversionEvent', 'getConversionEvent', 'deleteConversionEvent', 'listConversionEvents', 'createKeyEvent', 'updateKeyEvent', 'getKeyEvent', 'deleteKeyEvent', 'listKeyEvents', 'getDisplayVideo360AdvertiserLink', 'listDisplayVideo360AdvertiserLinks', 'createDisplayVideo360AdvertiserLink', 'deleteDisplayVideo360AdvertiserLink', 'updateDisplayVideo360AdvertiserLink', 'getDisplayVideo360AdvertiserLinkProposal', 'listDisplayVideo360AdvertiserLinkProposals', 'createDisplayVideo360AdvertiserLinkProposal', 'deleteDisplayVideo360AdvertiserLinkProposal', 'approveDisplayVideo360AdvertiserLinkProposal', 'cancelDisplayVideo360AdvertiserLinkProposal', 'createCustomDimension', 'updateCustomDimension', 'listCustomDimensions', 'archiveCustomDimension', 'getCustomDimension', 'createCustomMetric', 'updateCustomMetric', 'listCustomMetrics', 'archiveCustomMetric', 'getCustomMetric', 'getDataRetentionSettings', 'updateDataRetentionSettings', 'createDataStream', 'deleteDataStream', 'updateDataStream', 'listDataStreams', 'getDataStream', 'getAudience', 'listAudiences', 'createAudience', 'updateAudience', 'archiveAudience', 'getSearchAds360Link', 'listSearchAds360Links', 'createSearchAds360Link', 'deleteSearchAds360Link', 'updateSearchAds360Link', 'getAttributionSettings', 'updateAttributionSettings', 'runAccessReport', 'createAccessBinding', 'getAccessBinding', 'updateAccessBinding', 'deleteAccessBinding', 'listAccessBindings', 'batchCreateAccessBindings', 'batchGetAccessBindings', 'batchUpdateAccessBindings', 'batchDeleteAccessBindings', 'getExpandedDataSet', 'listExpandedDataSets', 'createExpandedDataSet', 'updateExpandedDataSet', 'deleteExpandedDataSet', 'getChannelGroup', 'listChannelGroups', 'createChannelGroup', 'updateChannelGroup', 'deleteChannelGroup', 'createBigQueryLink', 'getBigQueryLink', 'listBigQueryLinks', 'deleteBigQueryLink', 'updateBigQueryLink', 'getEnhancedMeasurementSettings', 'updateEnhancedMeasurementSettings', 'getAdSenseLink', 'createAdSenseLink', 'deleteAdSenseLink', 'listAdSenseLinks', 'getEventCreateRule', 'listEventCreateRules', 'createEventCreateRule', 'updateEventCreateRule', 'deleteEventCreateRule', 'getEventEditRule', 'listEventEditRules', 'createEventEditRule', 'updateEventEditRule', 'deleteEventEditRule', 'reorderEventEditRules', 'updateDataRedactionSettings', 'getDataRedactionSettings', 'getCalculatedMetric', 'createCalculatedMetric', 'listCalculatedMetrics', 'updateCalculatedMetric', 'deleteCalculatedMetric', 'createRollupProperty', 'getRollupPropertySourceLink', 'listRollupPropertySourceLinks', 'createRollupPropertySourceLink', 'deleteRollupPropertySourceLink', 'provisionSubproperty', 'createSubpropertyEventFilter', 'getSubpropertyEventFilter', 'listSubpropertyEventFilters', 'updateSubpropertyEventFilter', 'deleteSubpropertyEventFilter', 'createReportingDataAnnotation', 'getReportingDataAnnotation', 'listReportingDataAnnotations', 'updateReportingDataAnnotation', 'deleteReportingDataAnnotation', 'submitUserDeletion', 'listSubpropertySyncConfigs', 'updateSubpropertySyncConfig', 'getSubpropertySyncConfig', 'getReportingIdentitySettings']; + ['getAccount', 'listAccounts', 'deleteAccount', 'updateAccount', 'provisionAccountTicket', 'listAccountSummaries', 'getProperty', 'listProperties', 'createProperty', 'deleteProperty', 'updateProperty', 'createFirebaseLink', 'deleteFirebaseLink', 'listFirebaseLinks', 'getGlobalSiteTag', 'createGoogleAdsLink', 'updateGoogleAdsLink', 'deleteGoogleAdsLink', 'listGoogleAdsLinks', 'getDataSharingSettings', 'getMeasurementProtocolSecret', 'listMeasurementProtocolSecrets', 'createMeasurementProtocolSecret', 'deleteMeasurementProtocolSecret', 'updateMeasurementProtocolSecret', 'acknowledgeUserDataCollection', 'getSkAdNetworkConversionValueSchema', 'createSkAdNetworkConversionValueSchema', 'deleteSkAdNetworkConversionValueSchema', 'updateSkAdNetworkConversionValueSchema', 'listSkAdNetworkConversionValueSchemas', 'searchChangeHistoryEvents', 'getGoogleSignalsSettings', 'updateGoogleSignalsSettings', 'createConversionEvent', 'updateConversionEvent', 'getConversionEvent', 'deleteConversionEvent', 'listConversionEvents', 'createKeyEvent', 'updateKeyEvent', 'getKeyEvent', 'deleteKeyEvent', 'listKeyEvents', 'getDisplayVideo360AdvertiserLink', 'listDisplayVideo360AdvertiserLinks', 'createDisplayVideo360AdvertiserLink', 'deleteDisplayVideo360AdvertiserLink', 'updateDisplayVideo360AdvertiserLink', 'getDisplayVideo360AdvertiserLinkProposal', 'listDisplayVideo360AdvertiserLinkProposals', 'createDisplayVideo360AdvertiserLinkProposal', 'deleteDisplayVideo360AdvertiserLinkProposal', 'approveDisplayVideo360AdvertiserLinkProposal', 'cancelDisplayVideo360AdvertiserLinkProposal', 'createCustomDimension', 'updateCustomDimension', 'listCustomDimensions', 'archiveCustomDimension', 'getCustomDimension', 'createCustomMetric', 'updateCustomMetric', 'listCustomMetrics', 'archiveCustomMetric', 'getCustomMetric', 'getDataRetentionSettings', 'updateDataRetentionSettings', 'createDataStream', 'deleteDataStream', 'updateDataStream', 'listDataStreams', 'getDataStream', 'getAudience', 'listAudiences', 'createAudience', 'updateAudience', 'archiveAudience', 'getSearchAds360Link', 'listSearchAds360Links', 'createSearchAds360Link', 'deleteSearchAds360Link', 'updateSearchAds360Link', 'getAttributionSettings', 'updateAttributionSettings', 'runAccessReport', 'createAccessBinding', 'getAccessBinding', 'updateAccessBinding', 'deleteAccessBinding', 'listAccessBindings', 'batchCreateAccessBindings', 'batchGetAccessBindings', 'batchUpdateAccessBindings', 'batchDeleteAccessBindings', 'getExpandedDataSet', 'listExpandedDataSets', 'createExpandedDataSet', 'updateExpandedDataSet', 'deleteExpandedDataSet', 'getChannelGroup', 'listChannelGroups', 'createChannelGroup', 'updateChannelGroup', 'deleteChannelGroup', 'createBigQueryLink', 'getBigQueryLink', 'listBigQueryLinks', 'deleteBigQueryLink', 'updateBigQueryLink', 'getEnhancedMeasurementSettings', 'updateEnhancedMeasurementSettings', 'getAdSenseLink', 'createAdSenseLink', 'deleteAdSenseLink', 'listAdSenseLinks', 'getEventCreateRule', 'listEventCreateRules', 'createEventCreateRule', 'updateEventCreateRule', 'deleteEventCreateRule', 'getEventEditRule', 'listEventEditRules', 'createEventEditRule', 'updateEventEditRule', 'deleteEventEditRule', 'reorderEventEditRules', 'updateDataRedactionSettings', 'getDataRedactionSettings', 'getCalculatedMetric', 'createCalculatedMetric', 'listCalculatedMetrics', 'updateCalculatedMetric', 'deleteCalculatedMetric', 'createRollupProperty', 'getRollupPropertySourceLink', 'listRollupPropertySourceLinks', 'createRollupPropertySourceLink', 'deleteRollupPropertySourceLink', 'provisionSubproperty', 'createSubpropertyEventFilter', 'getSubpropertyEventFilter', 'listSubpropertyEventFilters', 'updateSubpropertyEventFilter', 'deleteSubpropertyEventFilter', 'createReportingDataAnnotation', 'getReportingDataAnnotation', 'listReportingDataAnnotations', 'updateReportingDataAnnotation', 'deleteReportingDataAnnotation', 'submitUserDeletion', 'listSubpropertySyncConfigs', 'updateSubpropertySyncConfig', 'getSubpropertySyncConfig', 'getReportingIdentitySettings', 'getUserProvidedDataSettings']; for (const methodName of analyticsAdminServiceStubMethods) { const callPromise = this.analyticsAdminServiceStub.then( stub => (...args: Array<{}>) => { @@ -12704,7 +12707,7 @@ export class AnalyticsAdminServiceClient { }); } /** - * Returns the singleton data retention settings for this property. + * Returns the reporting identity settings for this property. * * @param {Object} request * The request object that will be sent. @@ -12800,6 +12803,101 @@ export class AnalyticsAdminServiceClient { throw error; }); } +/** + * Looks up settings related to user-provided data for a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the user provided data settings to retrieve. + * Format: properties/{property}/userProvidedDataSettings + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.admin.v1alpha.UserProvidedDataSettings|UserProvidedDataSettings}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_user_provided_data_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserProvidedDataSettings_async + */ + getUserProvidedDataSettings( + request?: protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.admin.v1alpha.IUserProvidedDataSettings, + protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest|undefined, {}|undefined + ]>; + getUserProvidedDataSettings( + request: protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IUserProvidedDataSettings, + protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest|null|undefined, + {}|null|undefined>): void; + getUserProvidedDataSettings( + request: protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IUserProvidedDataSettings, + protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest|null|undefined, + {}|null|undefined>): void; + getUserProvidedDataSettings( + request?: protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.admin.v1alpha.IUserProvidedDataSettings, + protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IUserProvidedDataSettings, + protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.admin.v1alpha.IUserProvidedDataSettings, + protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getUserProvidedDataSettings request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.admin.v1alpha.IUserProvidedDataSettings, + protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getUserProvidedDataSettings response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getUserProvidedDataSettings(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.admin.v1alpha.IUserProvidedDataSettings, + protos.google.analytics.admin.v1alpha.IGetUserProvidedDataSettingsRequest|undefined, + {}|undefined + ]) => { + this._log.info('getUserProvidedDataSettings response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } /** * Returns all accounts accessible by the caller. @@ -12810,13 +12908,13 @@ export class AnalyticsAdminServiceClient { * * @param {Object} request * The request object that will be sent. - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListAccounts` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccounts` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListAccounts` must * match the call that provided the page token. @@ -12911,13 +13009,13 @@ export class AnalyticsAdminServiceClient { * Equivalent to `listAccounts`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListAccounts` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccounts` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListAccounts` must * match the call that provided the page token. @@ -12961,13 +13059,13 @@ export class AnalyticsAdminServiceClient { * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListAccounts` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccounts` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListAccounts` must * match the call that provided the page token. @@ -13010,16 +13108,16 @@ export class AnalyticsAdminServiceClient { * * @param {Object} request * The request object that will be sent. - * @param {number} request.pageSize - * The maximum number of AccountSummary resources to return. The service may - * return fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListAccountSummaries` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccountSummaries` - * must match the call that provided the page token. + * @param {number} [request.pageSize] + * Optional. The maximum number of AccountSummary resources to return. The + * service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 resources will be returned. The maximum + * value is 200; (higher values will be coerced to the maximum) + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccountSummaries` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListAccountSummaries` must match the call + * that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -13107,16 +13205,16 @@ export class AnalyticsAdminServiceClient { * Equivalent to `listAccountSummaries`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {number} request.pageSize - * The maximum number of AccountSummary resources to return. The service may - * return fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListAccountSummaries` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccountSummaries` - * must match the call that provided the page token. + * @param {number} [request.pageSize] + * Optional. The maximum number of AccountSummary resources to return. The + * service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 resources will be returned. The maximum + * value is 200; (higher values will be coerced to the maximum) + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccountSummaries` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListAccountSummaries` must match the call + * that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -13153,16 +13251,16 @@ export class AnalyticsAdminServiceClient { * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. - * @param {number} request.pageSize - * The maximum number of AccountSummary resources to return. The service may - * return fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListAccountSummaries` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccountSummaries` - * must match the call that provided the page token. + * @param {number} [request.pageSize] + * Optional. The maximum number of AccountSummary resources to return. The + * service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 resources will be returned. The maximum + * value is 200; (higher values will be coerced to the maximum) + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccountSummaries` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListAccountSummaries` must match the call + * that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -13219,13 +13317,13 @@ export class AnalyticsAdminServiceClient { * | firebase_project:project-id | The firebase project with id: project-id. | * | firebase_project:123 | The firebase project with number: 123. | * ``` - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListProperties` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListProperties` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListProperties` must * match the call that provided the page token. @@ -13337,13 +13435,13 @@ export class AnalyticsAdminServiceClient { * | firebase_project:project-id | The firebase project with id: project-id. | * | firebase_project:123 | The firebase project with number: 123. | * ``` - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListProperties` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListProperties` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListProperties` must * match the call that provided the page token. @@ -13404,13 +13502,13 @@ export class AnalyticsAdminServiceClient { * | firebase_project:project-id | The firebase project with id: project-id. | * | firebase_project:123 | The firebase project with number: 123. | * ``` - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListProperties` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListProperties` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListProperties` must * match the call that provided the page token. @@ -13458,13 +13556,13 @@ export class AnalyticsAdminServiceClient { * Required. Format: properties/{property_id} * * Example: `properties/1234` - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListFirebaseLinks` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. @@ -13564,13 +13662,13 @@ export class AnalyticsAdminServiceClient { * Required. Format: properties/{property_id} * * Example: `properties/1234` - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListFirebaseLinks` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. @@ -13619,13 +13717,13 @@ export class AnalyticsAdminServiceClient { * Required. Format: properties/{property_id} * * Example: `properties/1234` - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListFirebaseLinks` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. @@ -13671,12 +13769,12 @@ export class AnalyticsAdminServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. Example format: properties/1234 - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} request.pageToken - * A page token, received from a previous `ListGoogleAdsLinks` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListGoogleAdsLinks` must @@ -13775,12 +13873,12 @@ export class AnalyticsAdminServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. Example format: properties/1234 - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} request.pageToken - * A page token, received from a previous `ListGoogleAdsLinks` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListGoogleAdsLinks` must @@ -13828,12 +13926,12 @@ export class AnalyticsAdminServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. Example format: properties/1234 - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} request.pageToken - * A page token, received from a previous `ListGoogleAdsLinks` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListGoogleAdsLinks` must @@ -13883,15 +13981,16 @@ export class AnalyticsAdminServiceClient { * Required. The resource name of the parent stream. * Format: * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 10 resources will be returned. * The maximum value is 10. Higher values will be coerced to the maximum. - * @param {string} request.pageToken - * A page token, received from a previous `ListMeasurementProtocolSecrets` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListMeasurementProtocolSecrets` must match - * the call that provided the page token. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListMeasurementProtocolSecrets` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListMeasurementProtocolSecrets` must match the call that provided the page + * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -13988,15 +14087,16 @@ export class AnalyticsAdminServiceClient { * Required. The resource name of the parent stream. * Format: * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 10 resources will be returned. * The maximum value is 10. Higher values will be coerced to the maximum. - * @param {string} request.pageToken - * A page token, received from a previous `ListMeasurementProtocolSecrets` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListMeasurementProtocolSecrets` must match - * the call that provided the page token. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListMeasurementProtocolSecrets` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListMeasurementProtocolSecrets` must match the call that provided the page + * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -14042,15 +14142,16 @@ export class AnalyticsAdminServiceClient { * Required. The resource name of the parent stream. * Format: * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 10 resources will be returned. * The maximum value is 10. Higher values will be coerced to the maximum. - * @param {string} request.pageToken - * A page token, received from a previous `ListMeasurementProtocolSecrets` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListMeasurementProtocolSecrets` must match - * the call that provided the page token. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListMeasurementProtocolSecrets` call. Provide this to retrieve the + * subsequent page. When paginating, all other parameters provided to + * `ListMeasurementProtocolSecrets` must match the call that provided the page + * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -14097,13 +14198,13 @@ export class AnalyticsAdminServiceClient { * Format: * properties/{property_id}/dataStreams/{dataStream} * Example: properties/1234/dataStreams/5678 - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous * `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * `ListSKAdNetworkConversionValueSchema` must match the call that provided @@ -14205,13 +14306,13 @@ export class AnalyticsAdminServiceClient { * Format: * properties/{property_id}/dataStreams/{dataStream} * Example: properties/1234/dataStreams/5678 - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous * `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * `ListSKAdNetworkConversionValueSchema` must match the call that provided @@ -14262,13 +14363,13 @@ export class AnalyticsAdminServiceClient { * Format: * properties/{property_id}/dataStreams/{dataStream} * Example: properties/1234/dataStreams/5678 - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous * `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * `ListSKAdNetworkConversionValueSchema` must match the call that provided @@ -14616,15 +14717,15 @@ export class AnalyticsAdminServiceClient { * @param {string} request.parent * Required. The resource name of the parent property. * Example: 'properties/123' - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListConversionEvents` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` - * must match the call that provided the page token. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListConversionEvents` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListConversionEvents` must match the call + * that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -14722,15 +14823,15 @@ export class AnalyticsAdminServiceClient { * @param {string} request.parent * Required. The resource name of the parent property. * Example: 'properties/123' - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListConversionEvents` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` - * must match the call that provided the page token. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListConversionEvents` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListConversionEvents` must match the call + * that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -14777,15 +14878,15 @@ export class AnalyticsAdminServiceClient { * @param {string} request.parent * Required. The resource name of the parent property. * Example: 'properties/123' - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListConversionEvents` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` - * must match the call that provided the page token. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListConversionEvents` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListConversionEvents` must match the call + * that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -14832,12 +14933,12 @@ export class AnalyticsAdminServiceClient { * @param {string} request.parent * Required. The resource name of the parent property. * Example: 'properties/123' - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListKeyEvents` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListKeyEvents` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListKeyEvents` * must match the call that provided the page token. @@ -14936,12 +15037,12 @@ export class AnalyticsAdminServiceClient { * @param {string} request.parent * Required. The resource name of the parent property. * Example: 'properties/123' - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListKeyEvents` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListKeyEvents` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListKeyEvents` * must match the call that provided the page token. @@ -14989,12 +15090,12 @@ export class AnalyticsAdminServiceClient { * @param {string} request.parent * Required. The resource name of the parent property. * Example: 'properties/123' - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListKeyEvents` call. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListKeyEvents` call. * Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to `ListKeyEvents` * must match the call that provided the page token. @@ -15467,13 +15568,13 @@ export class AnalyticsAdminServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. Example format: properties/1234 - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} request.pageToken - * A page token, received from a previous `ListCustomDimensions` call. - * Provide this to retrieve the subsequent page. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCustomDimensions` + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListCustomDimensions` * must match the call that provided the page token. @@ -15571,13 +15672,13 @@ export class AnalyticsAdminServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. Example format: properties/1234 - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} request.pageToken - * A page token, received from a previous `ListCustomDimensions` call. - * Provide this to retrieve the subsequent page. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCustomDimensions` + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListCustomDimensions` * must match the call that provided the page token. @@ -15624,13 +15725,13 @@ export class AnalyticsAdminServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. Example format: properties/1234 - * @param {number} request.pageSize - * The maximum number of resources to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} request.pageToken - * A page token, received from a previous `ListCustomDimensions` call. - * Provide this to retrieve the subsequent page. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCustomDimensions` + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListCustomDimensions` * must match the call that provided the page token. @@ -20454,6 +20555,29 @@ export class AnalyticsAdminServiceClient { return this.pathTemplates.subpropertySyncConfigPathTemplate.match(subpropertySyncConfigName).subproperty_sync_config; } + /** + * Return a fully-qualified userProvidedDataSettings resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + userProvidedDataSettingsPath(property:string) { + return this.pathTemplates.userProvidedDataSettingsPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from UserProvidedDataSettings resource. + * + * @param {string} userProvidedDataSettingsName + * A fully-qualified path representing UserProvidedDataSettings resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromUserProvidedDataSettingsName(userProvidedDataSettingsName: string) { + return this.pathTemplates.userProvidedDataSettingsPathTemplate.match(userProvidedDataSettingsName).property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json index 477029173bb0..df13c9c2ff74 100644 --- a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json +++ b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json @@ -802,6 +802,11 @@ "timeout_millis": 60000, "retry_codes_name": "unknown_unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetUserProvidedDataSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" } } } diff --git a/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json b/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json index 2bc9d93be765..aa55dc3ea371 100644 --- a/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json +++ b/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json @@ -635,6 +635,11 @@ "getReportingIdentitySettings" ] }, + "GetUserProvidedDataSettings": { + "methods": [ + "getUserProvidedDataSettings" + ] + }, "ListAccounts": { "methods": [ "listAccounts", @@ -1468,6 +1473,11 @@ "getReportingIdentitySettings" ] }, + "GetUserProvidedDataSettings": { + "methods": [ + "getUserProvidedDataSettings" + ] + }, "ListAccounts": { "methods": [ "listAccounts", diff --git a/packages/google-analytics-admin/system-test/install.ts b/packages/google-analytics-admin/system-test/install.ts index 394f3362d203..f66069aa3940 100644 --- a/packages/google-analytics-admin/system-test/install.ts +++ b/packages/google-analytics-admin/system-test/install.ts @@ -40,7 +40,7 @@ describe('📦 pack-n-play test', () => { packageDir: process.cwd(), sample: { description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() } }; await packNTest(options); diff --git a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts index 67a762db5c9a..7bdbecf5d27a 100644 --- a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts +++ b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts @@ -13771,6 +13771,114 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); + describe('getUserProvidedDataSettings', () => { + it('invokes getUserProvidedDataSettings without error', async () => { + const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserProvidedDataSettings() + ); + client.innerApiCalls.getUserProvidedDataSettings = stubSimpleCall(expectedResponse); + const [response] = await client.getUserProvidedDataSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserProvidedDataSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserProvidedDataSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserProvidedDataSettings without error using callback', async () => { + const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserProvidedDataSettings() + ); + client.innerApiCalls.getUserProvidedDataSettings = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getUserProvidedDataSettings( + request, + (err?: Error|null, result?: protos.google.analytics.admin.v1alpha.IUserProvidedDataSettings|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserProvidedDataSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserProvidedDataSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserProvidedDataSettings with error', async () => { + const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getUserProvidedDataSettings = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getUserProvidedDataSettings(request), expectedError); + const actualRequest = (client.innerApiCalls.getUserProvidedDataSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserProvidedDataSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserProvidedDataSettings with closed client', async () => { + const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.admin.v1alpha.GetUserProvidedDataSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getUserProvidedDataSettings(request), expectedError); + }); + }); + describe('listAccounts', () => { it('invokes listAccounts without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ @@ -22031,5 +22139,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('userProvidedDataSettings', async () => { + const fakePath = "/rendered/path/userProvidedDataSettings"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userProvidedDataSettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userProvidedDataSettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userProvidedDataSettingsPath', () => { + const result = client.userProvidedDataSettingsPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userProvidedDataSettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromUserProvidedDataSettingsName', () => { + const result = client.matchPropertyFromUserProvidedDataSettingsName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.userProvidedDataSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-analytics-data/package.json b/packages/google-analytics-data/package.json index 173fed47f717..7a2839f701f2 100644 --- a/packages/google-analytics-data/package.json +++ b/packages/google-analytics-data/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-api-apikeys/package.json b/packages/google-api-apikeys/package.json index 84946ff96696..7ba7b5201739 100644 --- a/packages/google-api-apikeys/package.json +++ b/packages/google-api-apikeys/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-api-cloudquotas/package.json b/packages/google-api-cloudquotas/package.json index ad2bc9b6a73a..e868ebf4f0ce 100644 --- a/packages/google-api-cloudquotas/package.json +++ b/packages/google-api-cloudquotas/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-cloudquotas", "keywords": [ diff --git a/packages/google-api-servicecontrol/package.json b/packages/google-api-servicecontrol/package.json index ac24a75279d5..17f21759d3a8 100644 --- a/packages/google-api-servicecontrol/package.json +++ b/packages/google-api-servicecontrol/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 1cc33c94c124..4ac0ccf20aef 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-api-serviceusage/package.json b/packages/google-api-serviceusage/package.json index 245ef944e03b..84116eb5cbe1 100644 --- a/packages/google-api-serviceusage/package.json +++ b/packages/google-api-serviceusage/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-appengine/package.json b/packages/google-appengine/package.json index cab84229b33c..5aa194da1c6a 100644 --- a/packages/google-appengine/package.json +++ b/packages/google-appengine/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-apps-events-subscriptions/package.json b/packages/google-apps-events-subscriptions/package.json index fbc82c558b79..bfc75554e661 100644 --- a/packages/google-apps-events-subscriptions/package.json +++ b/packages/google-apps-events-subscriptions/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-apps-events-subscriptions", "keywords": [ diff --git a/packages/google-apps-meet/package.json b/packages/google-apps-meet/package.json index 627bdf04b987..5b50b2847f43 100644 --- a/packages/google-apps-meet/package.json +++ b/packages/google-apps-meet/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-apps-meet", "keywords": [ diff --git a/packages/google-area120-tables/package.json b/packages/google-area120-tables/package.json index 2260ba5ebe1f..339de75f899e 100644 --- a/packages/google-area120-tables/package.json +++ b/packages/google-area120-tables/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-chat/package.json b/packages/google-chat/package.json index 643a65aaea9e..6c0e589239bd 100644 --- a/packages/google-chat/package.json +++ b/packages/google-chat/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-chat", "keywords": [ diff --git a/packages/google-cloud-accessapproval/package.json b/packages/google-cloud-accessapproval/package.json index 8d3343a90886..32fb845e2868 100644 --- a/packages/google-cloud-accessapproval/package.json +++ b/packages/google-cloud-accessapproval/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-advisorynotifications/package.json b/packages/google-cloud-advisorynotifications/package.json index 3eefafa012fe..effdf1c330b8 100644 --- a/packages/google-cloud-advisorynotifications/package.json +++ b/packages/google-cloud-advisorynotifications/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-advisorynotifications", diff --git a/packages/google-cloud-aiplatform/CHANGELOG.md b/packages/google-cloud-aiplatform/CHANGELOG.md index 8222629d1927..1cf7947d7806 100644 --- a/packages/google-cloud-aiplatform/CHANGELOG.md +++ b/packages/google-cloud-aiplatform/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [6.6.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v6.5.0...aiplatform-v6.6.0) (2026-04-14) + + +### Features + +* A new field `evaluation_run` is added to message `.google.cloud.aiplatform.v1beta1.EvaluateDatasetRun` ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* A new field `inference_generation_config` is added to message `.google.cloud.aiplatform.v1beta1.EvaluationConfig` ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add AskContexts and AsyncRetrieveContexts APIs to VertexRagService ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add AskContexts and AsyncRetrieveContexts APIs to VertexRagService ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add custom memory id field to create memory v1beta1 ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add custom session id field to create session v1 ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add custom session id field to create session v1beta1 ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add image_spec to Reasoning Engine public protos ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add image_spec to Reasoning Engine public protos ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add new `embed_content_config` to message `EmbedContentRequest` ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add new `embed_content_config` to message `EmbedContentRequest` ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add raw_event field to event proto v1 ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add raw_event field to event proto v1beta1 ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Add transcription fields to Session Service ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* RagMetadata and RagDataSchema concepts and Batch API definitions added for Preview ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) +* Update the schema proto for the RagChunk with file_id and chunk_id to align with the vertex_rag_data.proto ([adee1ec](https://github.com/googleapis/google-cloud-node/commit/adee1ec57fc5feb09ae46d1c6103367e697094d7)) + ## [6.5.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v6.4.0...aiplatform-v6.5.0) (2026-03-02) diff --git a/packages/google-cloud-aiplatform/package.json b/packages/google-cloud-aiplatform/package.json index d073f5768a39..b45ad6f8bb65 100644 --- a/packages/google-cloud-aiplatform/package.json +++ b/packages/google-cloud-aiplatform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/aiplatform", - "version": "6.5.0", + "version": "6.6.0", "description": "Vertex AI client for Node.js", "repository": { "type": "git", @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-aiplatform/samples/package.json b/packages/google-cloud-aiplatform/samples/package.json index 3d098a20d1b8..2c4a5b0de077 100644 --- a/packages/google-cloud-aiplatform/samples/package.json +++ b/packages/google-cloud-aiplatform/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 1200000 test/*.js" }, "dependencies": { - "@google-cloud/aiplatform": "^6.5.0" + "@google-cloud/aiplatform": "^6.6.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-alloydb/package.json b/packages/google-cloud-alloydb/package.json index b363bae9c59d..3cbef1a19f71 100644 --- a/packages/google-cloud-alloydb/package.json +++ b/packages/google-cloud-alloydb/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-alloydb", diff --git a/packages/google-cloud-apigateway/package.json b/packages/google-cloud-apigateway/package.json index d59481d6af43..e2bb6138e4d6 100644 --- a/packages/google-cloud-apigateway/package.json +++ b/packages/google-cloud-apigateway/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-apigeeconnect/package.json b/packages/google-cloud-apigeeconnect/package.json index f533dbcb3fa1..7aba6e7bfce3 100644 --- a/packages/google-cloud-apigeeconnect/package.json +++ b/packages/google-cloud-apigeeconnect/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 95c12ec6f4c6..d8b61a63cf22 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "keywords": [ "google apis client", diff --git a/packages/google-cloud-apihub/package.json b/packages/google-cloud-apihub/package.json index 918d885b8cad..5f91677da1dd 100644 --- a/packages/google-cloud-apihub/package.json +++ b/packages/google-cloud-apihub/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apihub", "keywords": [ diff --git a/packages/google-cloud-apiregistry/package.json b/packages/google-cloud-apiregistry/package.json index 97c958c03a22..39cab84a0d33 100644 --- a/packages/google-cloud-apiregistry/package.json +++ b/packages/google-cloud-apiregistry/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apiregistry", "keywords": [ diff --git a/packages/google-cloud-apphub/package.json b/packages/google-cloud-apphub/package.json index 9303e65606c6..d81e5d2e095e 100644 --- a/packages/google-cloud-apphub/package.json +++ b/packages/google-cloud-apphub/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apphub", "keywords": [ diff --git a/packages/google-cloud-asset/package.json b/packages/google-cloud-asset/package.json index 8174dc8d485d..bae894738ecf 100644 --- a/packages/google-cloud-asset/package.json +++ b/packages/google-cloud-asset/package.json @@ -15,7 +15,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-assuredworkloads/package.json b/packages/google-cloud-assuredworkloads/package.json index 39580a5f1c01..8ae5b845bc2f 100644 --- a/packages/google-cloud-assuredworkloads/package.json +++ b/packages/google-cloud-assuredworkloads/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-auditmanager/package.json b/packages/google-cloud-auditmanager/package.json index 25c2e441c2fd..4e3f590cb940 100644 --- a/packages/google-cloud-auditmanager/package.json +++ b/packages/google-cloud-auditmanager/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-auditmanager", "keywords": [ diff --git a/packages/google-cloud-automl/package.json b/packages/google-cloud-automl/package.json index 6917e1b5dab5..74513d7c4ac0 100644 --- a/packages/google-cloud-automl/package.json +++ b/packages/google-cloud-automl/package.json @@ -14,7 +14,6 @@ }, "main": "build/src/index.js", "files": [ - "build/protos", "build/src" ], "keywords": [ diff --git a/packages/google-cloud-backupdr/package.json b/packages/google-cloud-backupdr/package.json index 96cd30e9320a..3f5ccc916b5b 100644 --- a/packages/google-cloud-backupdr/package.json +++ b/packages/google-cloud-backupdr/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-backupdr", "keywords": [ diff --git a/packages/google-cloud-baremetalsolution/package.json b/packages/google-cloud-baremetalsolution/package.json index 60cd3a5b2c51..f630a6efb563 100644 --- a/packages/google-cloud-baremetalsolution/package.json +++ b/packages/google-cloud-baremetalsolution/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-batch/package.json b/packages/google-cloud-batch/package.json index a29d67baa6d9..5911af269ad8 100644 --- a/packages/google-cloud-batch/package.json +++ b/packages/google-cloud-batch/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-beyondcorp-appconnections/package.json b/packages/google-cloud-beyondcorp-appconnections/package.json index cda7d6a7abb6..3d00ff2c1ad3 100644 --- a/packages/google-cloud-beyondcorp-appconnections/package.json +++ b/packages/google-cloud-beyondcorp-appconnections/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-beyondcorp-appconnectors/package.json b/packages/google-cloud-beyondcorp-appconnectors/package.json index 29f488a2a44d..53ad14b79435 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/package.json +++ b/packages/google-cloud-beyondcorp-appconnectors/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-beyondcorp-appgateways/package.json b/packages/google-cloud-beyondcorp-appgateways/package.json index 2db3a8c5f69f..533fa2218a56 100644 --- a/packages/google-cloud-beyondcorp-appgateways/package.json +++ b/packages/google-cloud-beyondcorp-appgateways/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/package.json b/packages/google-cloud-beyondcorp-clientconnectorservices/package.json index 5cf6a535c9a8..0156743958e9 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/package.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-beyondcorp-clientgateways/package.json b/packages/google-cloud-beyondcorp-clientgateways/package.json index 271b2f51975f..5dd7d8abb10d 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/package.json +++ b/packages/google-cloud-beyondcorp-clientgateways/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-bigquery-analyticshub/package.json b/packages/google-cloud-bigquery-analyticshub/package.json index 8c5e32208741..6bb9038bb978 100644 --- a/packages/google-cloud-bigquery-analyticshub/package.json +++ b/packages/google-cloud-bigquery-analyticshub/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-bigquery-connection/package.json b/packages/google-cloud-bigquery-connection/package.json index 1441951fe361..2fc601cf1887 100644 --- a/packages/google-cloud-bigquery-connection/package.json +++ b/packages/google-cloud-bigquery-connection/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-bigquery-dataexchange/package.json b/packages/google-cloud-bigquery-dataexchange/package.json index e169b3c47d0e..75f0ca5df1b2 100644 --- a/packages/google-cloud-bigquery-dataexchange/package.json +++ b/packages/google-cloud-bigquery-dataexchange/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-bigquery-datapolicies/package.json b/packages/google-cloud-bigquery-datapolicies/package.json index e5dc0c04aebd..c673077d2fd5 100644 --- a/packages/google-cloud-bigquery-datapolicies/package.json +++ b/packages/google-cloud-bigquery-datapolicies/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-bigquery-datatransfer/package.json b/packages/google-cloud-bigquery-datatransfer/package.json index e80d51d87020..f6483fe18dd4 100644 --- a/packages/google-cloud-bigquery-datatransfer/package.json +++ b/packages/google-cloud-bigquery-datatransfer/package.json @@ -15,7 +15,6 @@ "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-bigquery-datatransfer", "main": "build/src/index.js", "files": [ - "build/protos", "build/src", "!build/src/**/*.map" ], diff --git a/packages/google-cloud-bigquery-migration/package.json b/packages/google-cloud-bigquery-migration/package.json index 3327bb76974b..15a29b016a8d 100644 --- a/packages/google-cloud-bigquery-migration/package.json +++ b/packages/google-cloud-bigquery-migration/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "keywords": [ "google apis client", diff --git a/packages/google-cloud-bigquery-reservation/.eslintrc.json b/packages/google-cloud-bigquery-reservation/.eslintrc.json index 782153495464..3e8d97ccb390 100644 --- a/packages/google-cloud-bigquery-reservation/.eslintrc.json +++ b/packages/google-cloud-bigquery-reservation/.eslintrc.json @@ -1,3 +1,4 @@ { - "extends": "./node_modules/gts" + "extends": "./node_modules/gts", + "root": true } diff --git a/packages/google-cloud-bigquery-reservation/.gitattributes b/packages/google-cloud-bigquery-reservation/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-cloud-bigquery-reservation/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-bigquery-reservation/CHANGELOG.md b/packages/google-cloud-bigquery-reservation/CHANGELOG.md index 62f6943f3b0a..bfe8836ec97c 100644 --- a/packages/google-cloud-bigquery-reservation/CHANGELOG.md +++ b/packages/google-cloud-bigquery-reservation/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.4.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-reservation-v4.3.0...bigquery-reservation-v4.4.0) (2026-04-14) + + +### Features + +* [bigquery-reservation] add principal field to BigQuery Reservation Assignment ([#8042](https://github.com/googleapis/google-cloud-node/issues/8042)) ([4e5f42c](https://github.com/googleapis/google-cloud-node/commit/4e5f42cae475b0529fb3a10df609b3a52a25eadf)) + ## [4.3.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-reservation-v4.2.0...bigquery-reservation-v4.3.0) (2025-10-13) diff --git a/packages/google-cloud-bigquery-reservation/CODE_OF_CONDUCT.md b/packages/google-cloud-bigquery-reservation/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-cloud-bigquery-reservation/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-bigquery-reservation/CONTRIBUTING.md b/packages/google-cloud-bigquery-reservation/CONTRIBUTING.md new file mode 100644 index 000000000000..acbbf6a841ab --- /dev/null +++ b/packages/google-cloud-bigquery-reservation/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Reservation API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigqueryreservation.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-bigquery-reservation/LICENSE b/packages/google-cloud-bigquery-reservation/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-cloud-bigquery-reservation/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://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. diff --git a/packages/google-cloud-bigquery-reservation/package.json b/packages/google-cloud-bigquery-reservation/package.json index df1dbc4945c5..0164d5bb5c1d 100644 --- a/packages/google-cloud-bigquery-reservation/package.json +++ b/packages/google-cloud-bigquery-reservation/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-reservation", - "version": "4.3.0", + "version": "4.4.0", "description": "BigQuery Reservation client for Node.js", "repository": { "type": "git", @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-bigquery-reservation/protos/google/cloud/bigquery/reservation/v1/reservation.proto b/packages/google-cloud-bigquery-reservation/protos/google/cloud/bigquery/reservation/v1/reservation.proto index 5c674f276842..3d6f2cd048b0 100644 --- a/packages/google-cloud-bigquery-reservation/protos/google/cloud/bigquery/reservation/v1/reservation.proto +++ b/packages/google-cloud-bigquery-reservation/protos/google/cloud/bigquery/reservation/v1/reservation.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -560,7 +560,7 @@ message Reservation { // reservation will scale up to 1000 slots with 200 baseline and 800 idle // slots. // 2. if there are 500 idle slots available in other reservations, the - // reservation will scale up to 700 slots with 200 baseline and 300 idle + // reservation will scale up to 700 slots with 200 baseline and 500 idle // slots. // Please note, in this mode, the reservation might not be able to scale up // to max_slots. @@ -1406,6 +1406,23 @@ message Assignment { // This feature is not yet generally available. SchedulingPolicy scheduling_policy = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Represents the principal for this assignment. If not empty, jobs + // run by this principal will utilize the associated reservation. Otherwise, + // jobs will fall back to using the reservation assigned to the project, + // folder, or organization (in that order). If no reservation is assigned at + // any of these levels, on-demand capacity will be used. + // + // The supported formats are: + // + // * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + // * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + // for service accounts, + // * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + // for workload identity pool identities. + // * The special value `unknown_or_deleted_user` represents principals which + // cannot be read from the user info service, for example deleted users. + string principal = 12 [(google.api.field_behavior) = OPTIONAL]; } // The request for diff --git a/packages/google-cloud-bigquery-reservation/protos/protos.d.ts b/packages/google-cloud-bigquery-reservation/protos/protos.d.ts index 9da83334bc88..e25d975b023f 100644 --- a/packages/google-cloud-bigquery-reservation/protos/protos.d.ts +++ b/packages/google-cloud-bigquery-reservation/protos/protos.d.ts @@ -3673,6 +3673,9 @@ export namespace google { /** Assignment schedulingPolicy */ schedulingPolicy?: (google.cloud.bigquery.reservation.v1.ISchedulingPolicy|null); + + /** Assignment principal */ + principal?: (string|null); } /** Represents an Assignment. */ @@ -3702,6 +3705,9 @@ export namespace google { /** Assignment schedulingPolicy. */ public schedulingPolicy?: (google.cloud.bigquery.reservation.v1.ISchedulingPolicy|null); + /** Assignment principal. */ + public principal: string; + /** * Creates a new Assignment instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-bigquery-reservation/protos/protos.js b/packages/google-cloud-bigquery-reservation/protos/protos.js index 8c7f338ef379..73aff71e861a 100644 --- a/packages/google-cloud-bigquery-reservation/protos/protos.js +++ b/packages/google-cloud-bigquery-reservation/protos/protos.js @@ -8618,6 +8618,7 @@ * @property {google.cloud.bigquery.reservation.v1.Assignment.State|null} [state] Assignment state * @property {boolean|null} [enableGeminiInBigquery] Assignment enableGeminiInBigquery * @property {google.cloud.bigquery.reservation.v1.ISchedulingPolicy|null} [schedulingPolicy] Assignment schedulingPolicy + * @property {string|null} [principal] Assignment principal */ /** @@ -8683,6 +8684,14 @@ */ Assignment.prototype.schedulingPolicy = null; + /** + * Assignment principal. + * @member {string} principal + * @memberof google.cloud.bigquery.reservation.v1.Assignment + * @instance + */ + Assignment.prototype.principal = ""; + /** * Creates a new Assignment instance using the specified properties. * @function create @@ -8719,6 +8728,8 @@ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.enableGeminiInBigquery); if (message.schedulingPolicy != null && Object.hasOwnProperty.call(message, "schedulingPolicy")) $root.google.cloud.bigquery.reservation.v1.SchedulingPolicy.encode(message.schedulingPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.principal); return writer; }; @@ -8779,6 +8790,10 @@ message.schedulingPolicy = $root.google.cloud.bigquery.reservation.v1.SchedulingPolicy.decode(reader, reader.uint32()); break; } + case 12: { + message.principal = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8852,6 +8867,9 @@ if (error) return "schedulingPolicy." + error; } + if (message.principal != null && message.hasOwnProperty("principal")) + if (!$util.isString(message.principal)) + return "principal: string expected"; return null; }; @@ -8942,6 +8960,8 @@ throw TypeError(".google.cloud.bigquery.reservation.v1.Assignment.schedulingPolicy: object expected"); message.schedulingPolicy = $root.google.cloud.bigquery.reservation.v1.SchedulingPolicy.fromObject(object.schedulingPolicy); } + if (object.principal != null) + message.principal = String(object.principal); return message; }; @@ -8965,6 +8985,7 @@ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.enableGeminiInBigquery = false; object.schedulingPolicy = null; + object.principal = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -8978,6 +8999,8 @@ object.enableGeminiInBigquery = message.enableGeminiInBigquery; if (message.schedulingPolicy != null && message.hasOwnProperty("schedulingPolicy")) object.schedulingPolicy = $root.google.cloud.bigquery.reservation.v1.SchedulingPolicy.toObject(message.schedulingPolicy, options); + if (message.principal != null && message.hasOwnProperty("principal")) + object.principal = message.principal; return object; }; diff --git a/packages/google-cloud-bigquery-reservation/protos/protos.json b/packages/google-cloud-bigquery-reservation/protos/protos.json index e5f0f65a7085..0906ce5097cb 100644 --- a/packages/google-cloud-bigquery-reservation/protos/protos.json +++ b/packages/google-cloud-bigquery-reservation/protos/protos.json @@ -1351,6 +1351,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "principal": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { diff --git a/packages/google-cloud-bigquery-reservation/samples/package.json b/packages/google-cloud-bigquery-reservation/samples/package.json index 11110d00437c..587db0c9402e 100644 --- a/packages/google-cloud-bigquery-reservation/samples/package.json +++ b/packages/google-cloud-bigquery-reservation/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/bigquery-reservation": "^4.3.0" + "@google-cloud/bigquery-reservation": "^4.4.0" }, "devDependencies": { "c8": "^10.0.0", diff --git a/packages/google-cloud-bigquery-reservation/system-test/install.ts b/packages/google-cloud-bigquery-reservation/system-test/install.ts index 394f3362d203..f66069aa3940 100644 --- a/packages/google-cloud-bigquery-reservation/system-test/install.ts +++ b/packages/google-cloud-bigquery-reservation/system-test/install.ts @@ -40,7 +40,7 @@ describe('📦 pack-n-play test', () => { packageDir: process.cwd(), sample: { description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() } }; await packNTest(options); diff --git a/packages/google-cloud-billing-budgets/package.json b/packages/google-cloud-billing-budgets/package.json index 55b33bde7556..2cb2e0dcff53 100644 --- a/packages/google-cloud-billing-budgets/package.json +++ b/packages/google-cloud-billing-budgets/package.json @@ -11,7 +11,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "devDependencies": { diff --git a/packages/google-cloud-billing/package.json b/packages/google-cloud-billing/package.json index 6b5758d6eaeb..bf31c367632a 100644 --- a/packages/google-cloud-billing/package.json +++ b/packages/google-cloud-billing/package.json @@ -11,7 +11,6 @@ "author": "Google LLC", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "main": "build/src/index.js", diff --git a/packages/google-cloud-binaryauthorization/package.json b/packages/google-cloud-binaryauthorization/package.json index 82f50c373bc2..fa567d24883f 100644 --- a/packages/google-cloud-binaryauthorization/package.json +++ b/packages/google-cloud-binaryauthorization/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-capacityplanner/package.json b/packages/google-cloud-capacityplanner/package.json index 036385eab352..4d2636e022fb 100644 --- a/packages/google-cloud-capacityplanner/package.json +++ b/packages/google-cloud-capacityplanner/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-capacityplanner", "keywords": [ diff --git a/packages/google-cloud-certificatemanager/package.json b/packages/google-cloud-certificatemanager/package.json index a7d0c4af0e3c..fd9aa5a25250 100644 --- a/packages/google-cloud-certificatemanager/package.json +++ b/packages/google-cloud-certificatemanager/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-ces/.gitattributes b/packages/google-cloud-ces/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-cloud-ces/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-ces/CODE_OF_CONDUCT.md b/packages/google-cloud-ces/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-cloud-ces/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-ces/CONTRIBUTING.md b/packages/google-cloud-ces/CONTRIBUTING.md new file mode 100644 index 000000000000..ab779cdc3996 --- /dev/null +++ b/packages/google-cloud-ces/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Ces API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=ces.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-ces/LICENSE b/packages/google-cloud-ces/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-cloud-ces/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://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. diff --git a/packages/google-cloud-ces/README.md b/packages/google-cloud-ces/README.md index b03a3894ab5a..acb9c24fe0e7 100644 --- a/packages/google-cloud-ces/README.md +++ b/packages/google-cloud-ces/README.md @@ -174,6 +174,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | delete evaluation result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.delete_evaluation_result.js) | | delete evaluation run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.delete_evaluation_run.js) | | delete scheduled evaluation run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.delete_scheduled_evaluation_run.js) | +| export evaluations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.export_evaluations.js) | | generate evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.generate_evaluation.js) | | get evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.get_evaluation.js) | | get evaluation dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.get_evaluation_dataset.js) | diff --git a/packages/google-cloud-ces/package.json b/packages/google-cloud-ces/package.json index 6f6142b5f4e6..93f4a6a41618 100644 --- a/packages/google-cloud-ces/package.json +++ b/packages/google-cloud-ces/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-ces", "keywords": [ diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/app.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/app.proto index 7ac3059788d9..8d32f2f4d894 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/app.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/app.proto @@ -424,6 +424,32 @@ message LoggingSettings { // Settings to describe how errors should be handled in the app. message ErrorHandlingSettings { + // Configuration for handling fallback responses. + message FallbackResponseConfig { + // Optional. The fallback messages in case of system errors (e.g. LLM + // errors), mapped by [supported language + // code](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/reference/language). + map custom_fallback_messages = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of fallback attempts to make before the + // agent emitting [EndSession][google.cloud.ces.v1beta.EndSession] Signal. + int32 max_fallback_attempts = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for ending the session in case of system errors (e.g. LLM + // errors). + message EndSessionConfig { + // Optional. Whether to escalate the session in + // [EndSession][google.cloud.ces.v1beta.EndSession]. If session is + // escalated, [metadata in + // EndSession][google.cloud.ces.v1beta.EndSession.metadata] will contain + // `session_escalated = true`. See + // https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/deploy/google-telephony-platform#transfer_a_call_to_a_human_agent + // for details. + optional bool escalate_session = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // Defines the strategy for handling errors. enum ErrorHandlingStrategy { // Unspecified error handling strategy. @@ -444,6 +470,15 @@ message ErrorHandlingSettings { // Optional. The strategy to use for error handling. ErrorHandlingStrategy error_handling_strategy = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for handling fallback responses. + FallbackResponseConfig fallback_response_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for ending the session in case of system errors + // (e.g. LLM errors). + EndSessionConfig end_session_config = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Threshold settings for metrics in an Evaluation. @@ -618,6 +653,11 @@ message ConversationLoggingSettings { // Optional. Whether to disable conversation logging for the sessions. bool disable_conversation_logging = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls the retention window for the conversation. + // If not set, the conversation will be retained for 365 days. + google.protobuf.Duration retention_window = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Settings to describe the Cloud Logging behaviors for the app. diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation.proto index aacb4fd09310..1ec191d70e4c 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation.proto @@ -919,6 +919,9 @@ message EvaluationResult { // Evaluation/Expectation failed. In the case of an evaluation, this means // that at least one expectation was not met. FAIL = 2; + + // Evaluation/Expectation was skipped. + SKIPPED = 3; } // The state of the evaluation result execution. diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation_service.proto index 9e61271d789b..fc676c7010a9 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation_service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/ces/v1beta/agent_service.proto"; import "google/cloud/ces/v1beta/conversation.proto"; import "google/cloud/ces/v1beta/evaluation.proto"; import "google/longrunning/operations.proto"; @@ -354,6 +355,20 @@ service EvaluationService { }; option (google.api.method_signature) = "app"; } + + // Exports evaluations. + rpc ExportEvaluations(ExportEvaluationsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations:export" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "ExportEvaluationsResponse" + metadata_type: "OperationMetadata" + }; + } } // Response message for @@ -521,12 +536,27 @@ message ImportEvaluationsResponse { // The list of evaluations that were imported into the app. repeated Evaluation evaluations = 1; + // The list of evaluation results that were imported into the app. + repeated EvaluationResult evaluation_results = 4; + + // The list of evaluation runs that were imported into the app. + repeated EvaluationRun evaluation_runs = 5; + // Optional. A list of error messages associated with evaluations that failed // to be imported. repeated string error_messages = 2 [(google.api.field_behavior) = OPTIONAL]; - // The number of evaluations that were not imported due to errors. + // The number of evaluations that either failed to import entirely or + // completed import with one or more errors. int32 import_failure_count = 3; + + // The number of evaluation results that either failed to import entirely or + // completed import with one or more errors. + int32 evaluation_result_import_failure_count = 6; + + // The number of evaluation runs that either failed to import entirely or + // completed import with one or more errors. + int32 evaluation_run_import_failure_count = 7; } // Represents the metadata of the long-running operation for @@ -1195,3 +1225,107 @@ message ListEvaluationExpectationsResponse { // subsequent pages. string next_page_token = 2; } + +// Options for exporting CES evaluation resources. +message ExportOptions { + // The format to export the items in. Defaults to JSON if not + // specified. + enum ExportFormat { + // Unspecified format. + EXPORT_FORMAT_UNSPECIFIED = 0; + + // JSON format. + JSON = 1; + + // YAML format. + YAML = 2; + } + + // Optional. The format to export the evaluation results in. Defaults to JSON + // if not specified. + ExportFormat export_format = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Google Cloud Storage URI to write the exported Evaluation + // Results to. + string gcs_uri = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [EvaluationService.ExportEvaluations][google.cloud.ces.v1beta.EvaluationService.ExportEvaluations]. +message ExportEvaluationsRequest { + // Required. The resource name of the app to export evaluations from. + // Format: `projects/{project}/locations/{location}/apps/{app}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "ces.googleapis.com/App" } + ]; + + // Required. The resource names of the evaluations to export. + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "ces.googleapis.com/Evaluation" } + ]; + + // Optional. The export options for the evaluations. + ExportOptions export_options = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Includes evaluation results in the export. At least one of + // include_evaluation_results or include_evaluations must be set. + bool include_evaluation_results = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Includes evaluations in the export. At least one of + // include_evaluation_results or include_evaluations must be set. + bool include_evaluations = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [EvaluationService.ExportEvaluations][google.cloud.ces.v1beta.EvaluationService.ExportEvaluations]. +message ExportEvaluationsResponse { + // The exported evaluations. + oneof evaluations { + // The content of the exported Evaluations. This will be populated if + // gcs_uri was not specified in the request. + bytes evaluations_content = 1; + + // The Google Cloud Storage URI folder where the exported evaluations were + // written. This will be populated if gcs_uri was specified in the request. + string evaluations_uri = 2; + } + + // Output only. A map of evaluation resource names that could not be exported, + // to the reason why they failed. + map failed_evaluations = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Response message for +// [EvaluationService.ExportEvaluationResults][google.cloud.ces.v1beta.EvaluationService.ExportEvaluationResults]. +message ExportEvaluationResultsResponse { + // The exported evaluation results. + oneof evaluation_results { + // The content of the exported Evaluation Results. This will be populated if + // gcs_uri was not specified in the request. + bytes evaluation_results_content = 1; + + // The Google Cloud Storage URI folder where the exported Evaluation Results + // were written. This will be populated if gcs_uri was specified in the + // request. + string evaluation_results_uri = 2; + } +} + +// Response message for +// [EvaluationService.ExportEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ExportEvaluationRuns]. +message ExportEvaluationRunsResponse { + // The exported evaluation runs. + oneof evaluation_runs { + // The content of the exported Evaluation Runs. This will be populated if + // gcs_uri was not specified in the request. + bytes evaluation_runs_content = 1; + + // The Google Cloud Storage URI folder where the exported Evaluation Runs + // were written. This will be populated if gcs_uri was specified in the + // request. + string evaluation_runs_uri = 2; + } +} diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mocks.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mocks.proto new file mode 100644 index 000000000000..7dafb78e95a9 --- /dev/null +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mocks.proto @@ -0,0 +1,65 @@ +// Copyright 2026 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.ces.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/ces/v1beta/toolset_tool.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "cloud.google.com/go/ces/apiv1beta/cespb;cespb"; +option java_multiple_files = true; +option java_outer_classname = "MocksProto"; +option java_package = "com.google.cloud.ces.v1beta"; + +// A mocked tool call. +// +// Expresses the target tool + a pattern to match against that tool's +// args / inputs. If the pattern matches, then the mock response will be +// returned. +message MockedToolCall { + // The identifier of the tool to mock. + oneof tool_identifier { + // Optional. The name of the tool to mock. + // Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + string tool_id = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "ces.googleapis.com/Tool" } + ]; + + // Optional. The toolset to mock. + ToolsetTool toolset = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Deprecated. Use tool_identifier instead. + string tool = 1 [ + deprecated = true, + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "ces.googleapis.com/Tool" } + ]; + + // Required. A pattern to match against the args / inputs of all dispatched + // tool calls. If the tool call inputs match this pattern, then mock output + // will be returned. + google.protobuf.Struct expected_args_pattern = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mock response / output to return if the tool call args / + // inputs match the pattern. + google.protobuf.Struct mock_response = 3 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/session_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/session_service.proto index 59f00fc67d56..b8f893fdce82 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/session_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/session_service.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/ces/v1beta/common.proto"; import "google/cloud/ces/v1beta/example.proto"; +import "google/cloud/ces/v1beta/mocks.proto"; import "google/cloud/ces/v1beta/search_suggestions.proto"; import "google/protobuf/struct.proto"; @@ -148,6 +149,31 @@ enum AudioEncoding { ALAW = 3; } +// Mock tool calls configuration for the session. +message MockConfig { + // What to do when a tool call doesn't match any mocked tool calls. + enum UnmatchedToolCallBehavior { + // Default value. This value is unused. + UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0; + + // Throw an error for any tool calls that don't match a mock expected input + // pattern. + FAIL = 1; + + // For unmatched tool calls, pass the tool call through to real tool. + PASS_THROUGH = 2; + } + + // Optional. All tool calls to mock for the duration of the session. + repeated MockedToolCall mocked_tool_calls = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Beavhior for tool calls that don't match any args patterns in + // mocked_tool_calls. + UnmatchedToolCallBehavior unmatched_tool_call_behavior = 2 + [(google.api.field_behavior) = REQUIRED]; +} + // InputAudioConfig configures how the CES agent should interpret the incoming // audio data. message InputAudioConfig { diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/tool_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/tool_service.proto index deb16b4bc4c0..6a6ba4758a91 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/tool_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/tool_service.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/ces/v1beta/schema.proto"; +import "google/cloud/ces/v1beta/session_service.proto"; import "google/cloud/ces/v1beta/tool.proto"; import "google/cloud/ces/v1beta/toolset_tool.proto"; import "google/protobuf/struct.proto"; @@ -105,6 +106,11 @@ message ExecuteToolRequest { // Optional. The input parameters and values for the tool in JSON object // format. google.protobuf.Struct args = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mock configuration for the tool execution. + // If this field is set, tools that call other tools will be + // mocked based on the provided patterns and responses. + MockConfig mock_config = 7 [(google.api.field_behavior) = OPTIONAL]; } // Response message for diff --git a/packages/google-cloud-ces/protos/protos.d.ts b/packages/google-cloud-ces/protos/protos.d.ts index 05284b518b2e..551321a0e7c9 100644 --- a/packages/google-cloud-ces/protos/protos.d.ts +++ b/packages/google-cloud-ces/protos/protos.d.ts @@ -40737,6 +40737,12 @@ export namespace google { /** ErrorHandlingSettings errorHandlingStrategy */ errorHandlingStrategy?: (google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy|keyof typeof google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy|null); + + /** ErrorHandlingSettings fallbackResponseConfig */ + fallbackResponseConfig?: (google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig|null); + + /** ErrorHandlingSettings endSessionConfig */ + endSessionConfig?: (google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig|null); } /** Represents an ErrorHandlingSettings. */ @@ -40751,6 +40757,12 @@ export namespace google { /** ErrorHandlingSettings errorHandlingStrategy. */ public errorHandlingStrategy: (google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy|keyof typeof google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy); + /** ErrorHandlingSettings fallbackResponseConfig. */ + public fallbackResponseConfig?: (google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig|null); + + /** ErrorHandlingSettings endSessionConfig. */ + public endSessionConfig?: (google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig|null); + /** * Creates a new ErrorHandlingSettings instance using the specified properties. * @param [properties] Properties to set @@ -40831,6 +40843,206 @@ export namespace google { namespace ErrorHandlingSettings { + /** Properties of a FallbackResponseConfig. */ + interface IFallbackResponseConfig { + + /** FallbackResponseConfig customFallbackMessages */ + customFallbackMessages?: ({ [k: string]: string }|null); + + /** FallbackResponseConfig maxFallbackAttempts */ + maxFallbackAttempts?: (number|null); + } + + /** Represents a FallbackResponseConfig. */ + class FallbackResponseConfig implements IFallbackResponseConfig { + + /** + * Constructs a new FallbackResponseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig); + + /** FallbackResponseConfig customFallbackMessages. */ + public customFallbackMessages: { [k: string]: string }; + + /** FallbackResponseConfig maxFallbackAttempts. */ + public maxFallbackAttempts: number; + + /** + * Creates a new FallbackResponseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns FallbackResponseConfig instance + */ + public static create(properties?: google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig): google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig; + + /** + * Encodes the specified FallbackResponseConfig message. Does not implicitly {@link google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.verify|verify} messages. + * @param message FallbackResponseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FallbackResponseConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.verify|verify} messages. + * @param message FallbackResponseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FallbackResponseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FallbackResponseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig; + + /** + * Decodes a FallbackResponseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FallbackResponseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig; + + /** + * Verifies a FallbackResponseConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FallbackResponseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FallbackResponseConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig; + + /** + * Creates a plain object from a FallbackResponseConfig message. Also converts values to other types if specified. + * @param message FallbackResponseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FallbackResponseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FallbackResponseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EndSessionConfig. */ + interface IEndSessionConfig { + + /** EndSessionConfig escalateSession */ + escalateSession?: (boolean|null); + } + + /** Represents an EndSessionConfig. */ + class EndSessionConfig implements IEndSessionConfig { + + /** + * Constructs a new EndSessionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig); + + /** EndSessionConfig escalateSession. */ + public escalateSession?: (boolean|null); + + /** + * Creates a new EndSessionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EndSessionConfig instance + */ + public static create(properties?: google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig): google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig; + + /** + * Encodes the specified EndSessionConfig message. Does not implicitly {@link google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig.verify|verify} messages. + * @param message EndSessionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EndSessionConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig.verify|verify} messages. + * @param message EndSessionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EndSessionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EndSessionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig; + + /** + * Decodes an EndSessionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EndSessionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig; + + /** + * Verifies an EndSessionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EndSessionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EndSessionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig; + + /** + * Creates a plain object from an EndSessionConfig message. Also converts values to other types if specified. + * @param message EndSessionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EndSessionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EndSessionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** ErrorHandlingStrategy enum. */ enum ErrorHandlingStrategy { ERROR_HANDLING_STRATEGY_UNSPECIFIED = 0, @@ -41639,6 +41851,9 @@ export namespace google { /** ConversationLoggingSettings disableConversationLogging */ disableConversationLogging?: (boolean|null); + + /** ConversationLoggingSettings retentionWindow */ + retentionWindow?: (google.protobuf.IDuration|null); } /** Represents a ConversationLoggingSettings. */ @@ -41653,6 +41868,9 @@ export namespace google { /** ConversationLoggingSettings disableConversationLogging. */ public disableConversationLogging: boolean; + /** ConversationLoggingSettings retentionWindow. */ + public retentionWindow?: (google.protobuf.IDuration|null); + /** * Creates a new ConversationLoggingSettings instance using the specified properties. * @param [properties] Properties to set @@ -55324,7 +55542,8 @@ export namespace google { enum Outcome { OUTCOME_UNSPECIFIED = 0, PASS = 1, - FAIL = 2 + FAIL = 2, + SKIPPED = 3 } /** ExecutionState enum. */ @@ -57780,6 +57999,119 @@ export namespace google { ALAW = 3 } + /** Properties of a MockConfig. */ + interface IMockConfig { + + /** MockConfig mockedToolCalls */ + mockedToolCalls?: (google.cloud.ces.v1beta.IMockedToolCall[]|null); + + /** MockConfig unmatchedToolCallBehavior */ + unmatchedToolCallBehavior?: (google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior|keyof typeof google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior|null); + } + + /** Represents a MockConfig. */ + class MockConfig implements IMockConfig { + + /** + * Constructs a new MockConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.IMockConfig); + + /** MockConfig mockedToolCalls. */ + public mockedToolCalls: google.cloud.ces.v1beta.IMockedToolCall[]; + + /** MockConfig unmatchedToolCallBehavior. */ + public unmatchedToolCallBehavior: (google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior|keyof typeof google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior); + + /** + * Creates a new MockConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MockConfig instance + */ + public static create(properties?: google.cloud.ces.v1beta.IMockConfig): google.cloud.ces.v1beta.MockConfig; + + /** + * Encodes the specified MockConfig message. Does not implicitly {@link google.cloud.ces.v1beta.MockConfig.verify|verify} messages. + * @param message MockConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.IMockConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MockConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.MockConfig.verify|verify} messages. + * @param message MockConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.IMockConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MockConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.MockConfig; + + /** + * Decodes a MockConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.MockConfig; + + /** + * Verifies a MockConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MockConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MockConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.MockConfig; + + /** + * Creates a plain object from a MockConfig message. Also converts values to other types if specified. + * @param message MockConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.MockConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MockConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MockConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MockConfig { + + /** UnmatchedToolCallBehavior enum. */ + enum UnmatchedToolCallBehavior { + UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0, + FAIL = 1, + PASS_THROUGH = 2 + } + } + /** Properties of an InputAudioConfig. */ interface IInputAudioConfig { @@ -59975,114 +60307,238 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GoogleSearchSuggestions. */ - interface IGoogleSearchSuggestions { + /** Properties of a MockedToolCall. */ + interface IMockedToolCall { - /** GoogleSearchSuggestions htmls */ - htmls?: (string[]|null); + /** MockedToolCall toolId */ + toolId?: (string|null); - /** GoogleSearchSuggestions webSearchQueries */ - webSearchQueries?: (google.cloud.ces.v1beta.IWebSearchQuery[]|null); + /** MockedToolCall toolset */ + toolset?: (google.cloud.ces.v1beta.IToolsetTool|null); + + /** MockedToolCall tool */ + tool?: (string|null); + + /** MockedToolCall expectedArgsPattern */ + expectedArgsPattern?: (google.protobuf.IStruct|null); + + /** MockedToolCall mockResponse */ + mockResponse?: (google.protobuf.IStruct|null); } - /** Represents a GoogleSearchSuggestions. */ - class GoogleSearchSuggestions implements IGoogleSearchSuggestions { + /** Represents a MockedToolCall. */ + class MockedToolCall implements IMockedToolCall { /** - * Constructs a new GoogleSearchSuggestions. + * Constructs a new MockedToolCall. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.ces.v1beta.IGoogleSearchSuggestions); + constructor(properties?: google.cloud.ces.v1beta.IMockedToolCall); - /** GoogleSearchSuggestions htmls. */ - public htmls: string[]; + /** MockedToolCall toolId. */ + public toolId?: (string|null); - /** GoogleSearchSuggestions webSearchQueries. */ - public webSearchQueries: google.cloud.ces.v1beta.IWebSearchQuery[]; + /** MockedToolCall toolset. */ + public toolset?: (google.cloud.ces.v1beta.IToolsetTool|null); + + /** MockedToolCall tool. */ + public tool: string; + + /** MockedToolCall expectedArgsPattern. */ + public expectedArgsPattern?: (google.protobuf.IStruct|null); + + /** MockedToolCall mockResponse. */ + public mockResponse?: (google.protobuf.IStruct|null); + + /** MockedToolCall toolIdentifier. */ + public toolIdentifier?: ("toolId"|"toolset"); /** - * Creates a new GoogleSearchSuggestions instance using the specified properties. + * Creates a new MockedToolCall instance using the specified properties. * @param [properties] Properties to set - * @returns GoogleSearchSuggestions instance + * @returns MockedToolCall instance */ - public static create(properties?: google.cloud.ces.v1beta.IGoogleSearchSuggestions): google.cloud.ces.v1beta.GoogleSearchSuggestions; + public static create(properties?: google.cloud.ces.v1beta.IMockedToolCall): google.cloud.ces.v1beta.MockedToolCall; /** - * Encodes the specified GoogleSearchSuggestions message. Does not implicitly {@link google.cloud.ces.v1beta.GoogleSearchSuggestions.verify|verify} messages. - * @param message GoogleSearchSuggestions message or plain object to encode + * Encodes the specified MockedToolCall message. Does not implicitly {@link google.cloud.ces.v1beta.MockedToolCall.verify|verify} messages. + * @param message MockedToolCall message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.ces.v1beta.IGoogleSearchSuggestions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.ces.v1beta.IMockedToolCall, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GoogleSearchSuggestions message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.GoogleSearchSuggestions.verify|verify} messages. - * @param message GoogleSearchSuggestions message or plain object to encode + * Encodes the specified MockedToolCall message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.MockedToolCall.verify|verify} messages. + * @param message MockedToolCall message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.ces.v1beta.IGoogleSearchSuggestions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.ces.v1beta.IMockedToolCall, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GoogleSearchSuggestions message from the specified reader or buffer. + * Decodes a MockedToolCall message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GoogleSearchSuggestions + * @returns MockedToolCall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.GoogleSearchSuggestions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.MockedToolCall; /** - * Decodes a GoogleSearchSuggestions message from the specified reader or buffer, length delimited. + * Decodes a MockedToolCall message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GoogleSearchSuggestions + * @returns MockedToolCall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.GoogleSearchSuggestions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.MockedToolCall; /** - * Verifies a GoogleSearchSuggestions message. + * Verifies a MockedToolCall message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GoogleSearchSuggestions message from a plain object. Also converts values to their respective internal types. + * Creates a MockedToolCall message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GoogleSearchSuggestions + * @returns MockedToolCall */ - public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.GoogleSearchSuggestions; + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.MockedToolCall; /** - * Creates a plain object from a GoogleSearchSuggestions message. Also converts values to other types if specified. - * @param message GoogleSearchSuggestions + * Creates a plain object from a MockedToolCall message. Also converts values to other types if specified. + * @param message MockedToolCall * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.ces.v1beta.GoogleSearchSuggestions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.ces.v1beta.MockedToolCall, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GoogleSearchSuggestions to JSON. + * Converts this MockedToolCall to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GoogleSearchSuggestions + * Gets the default type url for MockedToolCall * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a WebSearchQuery. */ - interface IWebSearchQuery { + /** Properties of a GoogleSearchSuggestions. */ + interface IGoogleSearchSuggestions { - /** WebSearchQuery query */ - query?: (string|null); + /** GoogleSearchSuggestions htmls */ + htmls?: (string[]|null); + + /** GoogleSearchSuggestions webSearchQueries */ + webSearchQueries?: (google.cloud.ces.v1beta.IWebSearchQuery[]|null); + } + + /** Represents a GoogleSearchSuggestions. */ + class GoogleSearchSuggestions implements IGoogleSearchSuggestions { + + /** + * Constructs a new GoogleSearchSuggestions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.IGoogleSearchSuggestions); + + /** GoogleSearchSuggestions htmls. */ + public htmls: string[]; + + /** GoogleSearchSuggestions webSearchQueries. */ + public webSearchQueries: google.cloud.ces.v1beta.IWebSearchQuery[]; + + /** + * Creates a new GoogleSearchSuggestions instance using the specified properties. + * @param [properties] Properties to set + * @returns GoogleSearchSuggestions instance + */ + public static create(properties?: google.cloud.ces.v1beta.IGoogleSearchSuggestions): google.cloud.ces.v1beta.GoogleSearchSuggestions; + + /** + * Encodes the specified GoogleSearchSuggestions message. Does not implicitly {@link google.cloud.ces.v1beta.GoogleSearchSuggestions.verify|verify} messages. + * @param message GoogleSearchSuggestions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.IGoogleSearchSuggestions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoogleSearchSuggestions message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.GoogleSearchSuggestions.verify|verify} messages. + * @param message GoogleSearchSuggestions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.IGoogleSearchSuggestions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoogleSearchSuggestions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoogleSearchSuggestions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.GoogleSearchSuggestions; + + /** + * Decodes a GoogleSearchSuggestions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoogleSearchSuggestions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.GoogleSearchSuggestions; + + /** + * Verifies a GoogleSearchSuggestions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoogleSearchSuggestions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleSearchSuggestions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.GoogleSearchSuggestions; + + /** + * Creates a plain object from a GoogleSearchSuggestions message. Also converts values to other types if specified. + * @param message GoogleSearchSuggestions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.GoogleSearchSuggestions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleSearchSuggestions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleSearchSuggestions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WebSearchQuery. */ + interface IWebSearchQuery { + + /** WebSearchQuery query */ + query?: (string|null); /** WebSearchQuery uri */ uri?: (string|null); @@ -61080,6 +61536,20 @@ export namespace google { * @returns Promise */ public testPersonaVoice(request: google.cloud.ces.v1beta.ITestPersonaVoiceRequest): Promise; + + /** + * Calls ExportEvaluations. + * @param request ExportEvaluationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportEvaluations(request: google.cloud.ces.v1beta.IExportEvaluationsRequest, callback: google.cloud.ces.v1beta.EvaluationService.ExportEvaluationsCallback): void; + + /** + * Calls ExportEvaluations. + * @param request ExportEvaluationsRequest message or plain object + * @returns Promise + */ + public exportEvaluations(request: google.cloud.ces.v1beta.IExportEvaluationsRequest): Promise; } namespace EvaluationService { @@ -61300,6 +61770,13 @@ export namespace google { * @param [response] TestPersonaVoiceResponse */ type TestPersonaVoiceCallback = (error: (Error|null), response?: google.cloud.ces.v1beta.TestPersonaVoiceResponse) => void; + + /** + * Callback as used by {@link google.cloud.ces.v1beta.EvaluationService|exportEvaluations}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportEvaluationsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a RunEvaluationResponse. */ @@ -62258,11 +62735,23 @@ export namespace google { /** ImportEvaluationsResponse evaluations */ evaluations?: (google.cloud.ces.v1beta.IEvaluation[]|null); + /** ImportEvaluationsResponse evaluationResults */ + evaluationResults?: (google.cloud.ces.v1beta.IEvaluationResult[]|null); + + /** ImportEvaluationsResponse evaluationRuns */ + evaluationRuns?: (google.cloud.ces.v1beta.IEvaluationRun[]|null); + /** ImportEvaluationsResponse errorMessages */ errorMessages?: (string[]|null); /** ImportEvaluationsResponse importFailureCount */ importFailureCount?: (number|null); + + /** ImportEvaluationsResponse evaluationResultImportFailureCount */ + evaluationResultImportFailureCount?: (number|null); + + /** ImportEvaluationsResponse evaluationRunImportFailureCount */ + evaluationRunImportFailureCount?: (number|null); } /** Represents an ImportEvaluationsResponse. */ @@ -62277,12 +62766,24 @@ export namespace google { /** ImportEvaluationsResponse evaluations. */ public evaluations: google.cloud.ces.v1beta.IEvaluation[]; + /** ImportEvaluationsResponse evaluationResults. */ + public evaluationResults: google.cloud.ces.v1beta.IEvaluationResult[]; + + /** ImportEvaluationsResponse evaluationRuns. */ + public evaluationRuns: google.cloud.ces.v1beta.IEvaluationRun[]; + /** ImportEvaluationsResponse errorMessages. */ public errorMessages: string[]; /** ImportEvaluationsResponse importFailureCount. */ public importFailureCount: number; + /** ImportEvaluationsResponse evaluationResultImportFailureCount. */ + public evaluationResultImportFailureCount: number; + + /** ImportEvaluationsResponse evaluationRunImportFailureCount. */ + public evaluationRunImportFailureCount: number; + /** * Creates a new ImportEvaluationsResponse instance using the specified properties. * @param [properties] Properties to set @@ -66189,6 +66690,564 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an ExportOptions. */ + interface IExportOptions { + + /** ExportOptions exportFormat */ + exportFormat?: (google.cloud.ces.v1beta.ExportOptions.ExportFormat|keyof typeof google.cloud.ces.v1beta.ExportOptions.ExportFormat|null); + + /** ExportOptions gcsUri */ + gcsUri?: (string|null); + } + + /** Represents an ExportOptions. */ + class ExportOptions implements IExportOptions { + + /** + * Constructs a new ExportOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.IExportOptions); + + /** ExportOptions exportFormat. */ + public exportFormat: (google.cloud.ces.v1beta.ExportOptions.ExportFormat|keyof typeof google.cloud.ces.v1beta.ExportOptions.ExportFormat); + + /** ExportOptions gcsUri. */ + public gcsUri: string; + + /** + * Creates a new ExportOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportOptions instance + */ + public static create(properties?: google.cloud.ces.v1beta.IExportOptions): google.cloud.ces.v1beta.ExportOptions; + + /** + * Encodes the specified ExportOptions message. Does not implicitly {@link google.cloud.ces.v1beta.ExportOptions.verify|verify} messages. + * @param message ExportOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.IExportOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportOptions message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportOptions.verify|verify} messages. + * @param message ExportOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.IExportOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.ExportOptions; + + /** + * Decodes an ExportOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.ExportOptions; + + /** + * Verifies an ExportOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExportOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.ExportOptions; + + /** + * Creates a plain object from an ExportOptions message. Also converts values to other types if specified. + * @param message ExportOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.ExportOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExportOptions { + + /** ExportFormat enum. */ + enum ExportFormat { + EXPORT_FORMAT_UNSPECIFIED = 0, + JSON = 1, + YAML = 2 + } + } + + /** Properties of an ExportEvaluationsRequest. */ + interface IExportEvaluationsRequest { + + /** ExportEvaluationsRequest parent */ + parent?: (string|null); + + /** ExportEvaluationsRequest names */ + names?: (string[]|null); + + /** ExportEvaluationsRequest exportOptions */ + exportOptions?: (google.cloud.ces.v1beta.IExportOptions|null); + + /** ExportEvaluationsRequest includeEvaluationResults */ + includeEvaluationResults?: (boolean|null); + + /** ExportEvaluationsRequest includeEvaluations */ + includeEvaluations?: (boolean|null); + } + + /** Represents an ExportEvaluationsRequest. */ + class ExportEvaluationsRequest implements IExportEvaluationsRequest { + + /** + * Constructs a new ExportEvaluationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.IExportEvaluationsRequest); + + /** ExportEvaluationsRequest parent. */ + public parent: string; + + /** ExportEvaluationsRequest names. */ + public names: string[]; + + /** ExportEvaluationsRequest exportOptions. */ + public exportOptions?: (google.cloud.ces.v1beta.IExportOptions|null); + + /** ExportEvaluationsRequest includeEvaluationResults. */ + public includeEvaluationResults: boolean; + + /** ExportEvaluationsRequest includeEvaluations. */ + public includeEvaluations: boolean; + + /** + * Creates a new ExportEvaluationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportEvaluationsRequest instance + */ + public static create(properties?: google.cloud.ces.v1beta.IExportEvaluationsRequest): google.cloud.ces.v1beta.ExportEvaluationsRequest; + + /** + * Encodes the specified ExportEvaluationsRequest message. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationsRequest.verify|verify} messages. + * @param message ExportEvaluationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.IExportEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationsRequest.verify|verify} messages. + * @param message ExportEvaluationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.IExportEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportEvaluationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.ExportEvaluationsRequest; + + /** + * Decodes an ExportEvaluationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.ExportEvaluationsRequest; + + /** + * Verifies an ExportEvaluationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExportEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportEvaluationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.ExportEvaluationsRequest; + + /** + * Creates a plain object from an ExportEvaluationsRequest message. Also converts values to other types if specified. + * @param message ExportEvaluationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.ExportEvaluationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportEvaluationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportEvaluationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportEvaluationsResponse. */ + interface IExportEvaluationsResponse { + + /** ExportEvaluationsResponse evaluationsContent */ + evaluationsContent?: (Uint8Array|Buffer|string|null); + + /** ExportEvaluationsResponse evaluationsUri */ + evaluationsUri?: (string|null); + + /** ExportEvaluationsResponse failedEvaluations */ + failedEvaluations?: ({ [k: string]: string }|null); + } + + /** Represents an ExportEvaluationsResponse. */ + class ExportEvaluationsResponse implements IExportEvaluationsResponse { + + /** + * Constructs a new ExportEvaluationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.IExportEvaluationsResponse); + + /** ExportEvaluationsResponse evaluationsContent. */ + public evaluationsContent?: (Uint8Array|Buffer|string|null); + + /** ExportEvaluationsResponse evaluationsUri. */ + public evaluationsUri?: (string|null); + + /** ExportEvaluationsResponse failedEvaluations. */ + public failedEvaluations: { [k: string]: string }; + + /** ExportEvaluationsResponse evaluations. */ + public evaluations?: ("evaluationsContent"|"evaluationsUri"); + + /** + * Creates a new ExportEvaluationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportEvaluationsResponse instance + */ + public static create(properties?: google.cloud.ces.v1beta.IExportEvaluationsResponse): google.cloud.ces.v1beta.ExportEvaluationsResponse; + + /** + * Encodes the specified ExportEvaluationsResponse message. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationsResponse.verify|verify} messages. + * @param message ExportEvaluationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.IExportEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationsResponse.verify|verify} messages. + * @param message ExportEvaluationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.IExportEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportEvaluationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.ExportEvaluationsResponse; + + /** + * Decodes an ExportEvaluationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.ExportEvaluationsResponse; + + /** + * Verifies an ExportEvaluationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExportEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportEvaluationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.ExportEvaluationsResponse; + + /** + * Creates a plain object from an ExportEvaluationsResponse message. Also converts values to other types if specified. + * @param message ExportEvaluationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.ExportEvaluationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportEvaluationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportEvaluationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportEvaluationResultsResponse. */ + interface IExportEvaluationResultsResponse { + + /** ExportEvaluationResultsResponse evaluationResultsContent */ + evaluationResultsContent?: (Uint8Array|Buffer|string|null); + + /** ExportEvaluationResultsResponse evaluationResultsUri */ + evaluationResultsUri?: (string|null); + } + + /** Represents an ExportEvaluationResultsResponse. */ + class ExportEvaluationResultsResponse implements IExportEvaluationResultsResponse { + + /** + * Constructs a new ExportEvaluationResultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.IExportEvaluationResultsResponse); + + /** ExportEvaluationResultsResponse evaluationResultsContent. */ + public evaluationResultsContent?: (Uint8Array|Buffer|string|null); + + /** ExportEvaluationResultsResponse evaluationResultsUri. */ + public evaluationResultsUri?: (string|null); + + /** ExportEvaluationResultsResponse evaluationResults. */ + public evaluationResults?: ("evaluationResultsContent"|"evaluationResultsUri"); + + /** + * Creates a new ExportEvaluationResultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportEvaluationResultsResponse instance + */ + public static create(properties?: google.cloud.ces.v1beta.IExportEvaluationResultsResponse): google.cloud.ces.v1beta.ExportEvaluationResultsResponse; + + /** + * Encodes the specified ExportEvaluationResultsResponse message. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationResultsResponse.verify|verify} messages. + * @param message ExportEvaluationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.IExportEvaluationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportEvaluationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationResultsResponse.verify|verify} messages. + * @param message ExportEvaluationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.IExportEvaluationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportEvaluationResultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportEvaluationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.ExportEvaluationResultsResponse; + + /** + * Decodes an ExportEvaluationResultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportEvaluationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.ExportEvaluationResultsResponse; + + /** + * Verifies an ExportEvaluationResultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExportEvaluationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportEvaluationResultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.ExportEvaluationResultsResponse; + + /** + * Creates a plain object from an ExportEvaluationResultsResponse message. Also converts values to other types if specified. + * @param message ExportEvaluationResultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.ExportEvaluationResultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportEvaluationResultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportEvaluationResultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportEvaluationRunsResponse. */ + interface IExportEvaluationRunsResponse { + + /** ExportEvaluationRunsResponse evaluationRunsContent */ + evaluationRunsContent?: (Uint8Array|Buffer|string|null); + + /** ExportEvaluationRunsResponse evaluationRunsUri */ + evaluationRunsUri?: (string|null); + } + + /** Represents an ExportEvaluationRunsResponse. */ + class ExportEvaluationRunsResponse implements IExportEvaluationRunsResponse { + + /** + * Constructs a new ExportEvaluationRunsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.IExportEvaluationRunsResponse); + + /** ExportEvaluationRunsResponse evaluationRunsContent. */ + public evaluationRunsContent?: (Uint8Array|Buffer|string|null); + + /** ExportEvaluationRunsResponse evaluationRunsUri. */ + public evaluationRunsUri?: (string|null); + + /** ExportEvaluationRunsResponse evaluationRuns. */ + public evaluationRuns?: ("evaluationRunsContent"|"evaluationRunsUri"); + + /** + * Creates a new ExportEvaluationRunsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportEvaluationRunsResponse instance + */ + public static create(properties?: google.cloud.ces.v1beta.IExportEvaluationRunsResponse): google.cloud.ces.v1beta.ExportEvaluationRunsResponse; + + /** + * Encodes the specified ExportEvaluationRunsResponse message. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationRunsResponse.verify|verify} messages. + * @param message ExportEvaluationRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.IExportEvaluationRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportEvaluationRunsResponse message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationRunsResponse.verify|verify} messages. + * @param message ExportEvaluationRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.IExportEvaluationRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportEvaluationRunsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportEvaluationRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.ExportEvaluationRunsResponse; + + /** + * Decodes an ExportEvaluationRunsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportEvaluationRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.ExportEvaluationRunsResponse; + + /** + * Verifies an ExportEvaluationRunsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExportEvaluationRunsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportEvaluationRunsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.ExportEvaluationRunsResponse; + + /** + * Creates a plain object from an ExportEvaluationRunsResponse message. Also converts values to other types if specified. + * @param message ExportEvaluationRunsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.ExportEvaluationRunsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportEvaluationRunsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportEvaluationRunsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an Omnichannel. */ interface IOmnichannel { @@ -67177,6 +68236,9 @@ export namespace google { /** ExecuteToolRequest args */ args?: (google.protobuf.IStruct|null); + + /** ExecuteToolRequest mockConfig */ + mockConfig?: (google.cloud.ces.v1beta.IMockConfig|null); } /** Represents an ExecuteToolRequest. */ @@ -67206,6 +68268,9 @@ export namespace google { /** ExecuteToolRequest args. */ public args?: (google.protobuf.IStruct|null); + /** ExecuteToolRequest mockConfig. */ + public mockConfig?: (google.cloud.ces.v1beta.IMockConfig|null); + /** ExecuteToolRequest toolIdentifier. */ public toolIdentifier?: ("tool"|"toolsetTool"); diff --git a/packages/google-cloud-ces/protos/protos.js b/packages/google-cloud-ces/protos/protos.js index 08ed6fd185a2..42657b3ff60f 100644 --- a/packages/google-cloud-ces/protos/protos.js +++ b/packages/google-cloud-ces/protos/protos.js @@ -100881,6 +100881,8 @@ * @memberof google.cloud.ces.v1beta * @interface IErrorHandlingSettings * @property {google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy|null} [errorHandlingStrategy] ErrorHandlingSettings errorHandlingStrategy + * @property {google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig|null} [fallbackResponseConfig] ErrorHandlingSettings fallbackResponseConfig + * @property {google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig|null} [endSessionConfig] ErrorHandlingSettings endSessionConfig */ /** @@ -100906,6 +100908,22 @@ */ ErrorHandlingSettings.prototype.errorHandlingStrategy = 0; + /** + * ErrorHandlingSettings fallbackResponseConfig. + * @member {google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig|null|undefined} fallbackResponseConfig + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings + * @instance + */ + ErrorHandlingSettings.prototype.fallbackResponseConfig = null; + + /** + * ErrorHandlingSettings endSessionConfig. + * @member {google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig|null|undefined} endSessionConfig + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings + * @instance + */ + ErrorHandlingSettings.prototype.endSessionConfig = null; + /** * Creates a new ErrorHandlingSettings instance using the specified properties. * @function create @@ -100932,6 +100950,10 @@ writer = $Writer.create(); if (message.errorHandlingStrategy != null && Object.hasOwnProperty.call(message, "errorHandlingStrategy")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorHandlingStrategy); + if (message.fallbackResponseConfig != null && Object.hasOwnProperty.call(message, "fallbackResponseConfig")) + $root.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.encode(message.fallbackResponseConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endSessionConfig != null && Object.hasOwnProperty.call(message, "endSessionConfig")) + $root.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig.encode(message.endSessionConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -100972,6 +100994,14 @@ message.errorHandlingStrategy = reader.int32(); break; } + case 2: { + message.fallbackResponseConfig = $root.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endSessionConfig = $root.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -101017,6 +101047,16 @@ case 3: break; } + if (message.fallbackResponseConfig != null && message.hasOwnProperty("fallbackResponseConfig")) { + var error = $root.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.verify(message.fallbackResponseConfig); + if (error) + return "fallbackResponseConfig." + error; + } + if (message.endSessionConfig != null && message.hasOwnProperty("endSessionConfig")) { + var error = $root.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig.verify(message.endSessionConfig); + if (error) + return "endSessionConfig." + error; + } return null; }; @@ -101056,6 +101096,16 @@ message.errorHandlingStrategy = 3; break; } + if (object.fallbackResponseConfig != null) { + if (typeof object.fallbackResponseConfig !== "object") + throw TypeError(".google.cloud.ces.v1beta.ErrorHandlingSettings.fallbackResponseConfig: object expected"); + message.fallbackResponseConfig = $root.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.fromObject(object.fallbackResponseConfig); + } + if (object.endSessionConfig != null) { + if (typeof object.endSessionConfig !== "object") + throw TypeError(".google.cloud.ces.v1beta.ErrorHandlingSettings.endSessionConfig: object expected"); + message.endSessionConfig = $root.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig.fromObject(object.endSessionConfig); + } return message; }; @@ -101072,10 +101122,17 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.errorHandlingStrategy = options.enums === String ? "ERROR_HANDLING_STRATEGY_UNSPECIFIED" : 0; + object.fallbackResponseConfig = null; + object.endSessionConfig = null; + } if (message.errorHandlingStrategy != null && message.hasOwnProperty("errorHandlingStrategy")) object.errorHandlingStrategy = options.enums === String ? $root.google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy[message.errorHandlingStrategy] === undefined ? message.errorHandlingStrategy : $root.google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy[message.errorHandlingStrategy] : message.errorHandlingStrategy; + if (message.fallbackResponseConfig != null && message.hasOwnProperty("fallbackResponseConfig")) + object.fallbackResponseConfig = $root.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.toObject(message.fallbackResponseConfig, options); + if (message.endSessionConfig != null && message.hasOwnProperty("endSessionConfig")) + object.endSessionConfig = $root.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig.toObject(message.endSessionConfig, options); return object; }; @@ -101105,6 +101162,488 @@ return typeUrlPrefix + "/google.cloud.ces.v1beta.ErrorHandlingSettings"; }; + ErrorHandlingSettings.FallbackResponseConfig = (function() { + + /** + * Properties of a FallbackResponseConfig. + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings + * @interface IFallbackResponseConfig + * @property {Object.|null} [customFallbackMessages] FallbackResponseConfig customFallbackMessages + * @property {number|null} [maxFallbackAttempts] FallbackResponseConfig maxFallbackAttempts + */ + + /** + * Constructs a new FallbackResponseConfig. + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings + * @classdesc Represents a FallbackResponseConfig. + * @implements IFallbackResponseConfig + * @constructor + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig=} [properties] Properties to set + */ + function FallbackResponseConfig(properties) { + this.customFallbackMessages = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FallbackResponseConfig customFallbackMessages. + * @member {Object.} customFallbackMessages + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @instance + */ + FallbackResponseConfig.prototype.customFallbackMessages = $util.emptyObject; + + /** + * FallbackResponseConfig maxFallbackAttempts. + * @member {number} maxFallbackAttempts + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @instance + */ + FallbackResponseConfig.prototype.maxFallbackAttempts = 0; + + /** + * Creates a new FallbackResponseConfig instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @static + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig} FallbackResponseConfig instance + */ + FallbackResponseConfig.create = function create(properties) { + return new FallbackResponseConfig(properties); + }; + + /** + * Encodes the specified FallbackResponseConfig message. Does not implicitly {@link google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @static + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig} message FallbackResponseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FallbackResponseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customFallbackMessages != null && Object.hasOwnProperty.call(message, "customFallbackMessages")) + for (var keys = Object.keys(message.customFallbackMessages), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.customFallbackMessages[keys[i]]).ldelim(); + if (message.maxFallbackAttempts != null && Object.hasOwnProperty.call(message, "maxFallbackAttempts")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxFallbackAttempts); + return writer; + }; + + /** + * Encodes the specified FallbackResponseConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @static + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.IFallbackResponseConfig} message FallbackResponseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FallbackResponseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FallbackResponseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig} FallbackResponseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FallbackResponseConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (message.customFallbackMessages === $util.emptyObject) + message.customFallbackMessages = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.customFallbackMessages[key] = value; + break; + } + case 2: { + message.maxFallbackAttempts = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FallbackResponseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig} FallbackResponseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FallbackResponseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FallbackResponseConfig message. + * @function verify + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FallbackResponseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customFallbackMessages != null && message.hasOwnProperty("customFallbackMessages")) { + if (!$util.isObject(message.customFallbackMessages)) + return "customFallbackMessages: object expected"; + var key = Object.keys(message.customFallbackMessages); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.customFallbackMessages[key[i]])) + return "customFallbackMessages: string{k:string} expected"; + } + if (message.maxFallbackAttempts != null && message.hasOwnProperty("maxFallbackAttempts")) + if (!$util.isInteger(message.maxFallbackAttempts)) + return "maxFallbackAttempts: integer expected"; + return null; + }; + + /** + * Creates a FallbackResponseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig} FallbackResponseConfig + */ + FallbackResponseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig) + return object; + var message = new $root.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig(); + if (object.customFallbackMessages) { + if (typeof object.customFallbackMessages !== "object") + throw TypeError(".google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.customFallbackMessages: object expected"); + message.customFallbackMessages = {}; + for (var keys = Object.keys(object.customFallbackMessages), i = 0; i < keys.length; ++i) + message.customFallbackMessages[keys[i]] = String(object.customFallbackMessages[keys[i]]); + } + if (object.maxFallbackAttempts != null) + message.maxFallbackAttempts = object.maxFallbackAttempts | 0; + return message; + }; + + /** + * Creates a plain object from a FallbackResponseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @static + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig} message FallbackResponseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FallbackResponseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.customFallbackMessages = {}; + if (options.defaults) + object.maxFallbackAttempts = 0; + var keys2; + if (message.customFallbackMessages && (keys2 = Object.keys(message.customFallbackMessages)).length) { + object.customFallbackMessages = {}; + for (var j = 0; j < keys2.length; ++j) + object.customFallbackMessages[keys2[j]] = message.customFallbackMessages[keys2[j]]; + } + if (message.maxFallbackAttempts != null && message.hasOwnProperty("maxFallbackAttempts")) + object.maxFallbackAttempts = message.maxFallbackAttempts; + return object; + }; + + /** + * Converts this FallbackResponseConfig to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @instance + * @returns {Object.} JSON object + */ + FallbackResponseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FallbackResponseConfig + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FallbackResponseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig"; + }; + + return FallbackResponseConfig; + })(); + + ErrorHandlingSettings.EndSessionConfig = (function() { + + /** + * Properties of an EndSessionConfig. + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings + * @interface IEndSessionConfig + * @property {boolean|null} [escalateSession] EndSessionConfig escalateSession + */ + + /** + * Constructs a new EndSessionConfig. + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings + * @classdesc Represents an EndSessionConfig. + * @implements IEndSessionConfig + * @constructor + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig=} [properties] Properties to set + */ + function EndSessionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EndSessionConfig escalateSession. + * @member {boolean|null|undefined} escalateSession + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @instance + */ + EndSessionConfig.prototype.escalateSession = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EndSessionConfig.prototype, "_escalateSession", { + get: $util.oneOfGetter($oneOfFields = ["escalateSession"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EndSessionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @static + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig} EndSessionConfig instance + */ + EndSessionConfig.create = function create(properties) { + return new EndSessionConfig(properties); + }; + + /** + * Encodes the specified EndSessionConfig message. Does not implicitly {@link google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @static + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig} message EndSessionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndSessionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.escalateSession != null && Object.hasOwnProperty.call(message, "escalateSession")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.escalateSession); + return writer; + }; + + /** + * Encodes the specified EndSessionConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @static + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.IEndSessionConfig} message EndSessionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndSessionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EndSessionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig} EndSessionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndSessionConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.escalateSession = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EndSessionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig} EndSessionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndSessionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EndSessionConfig message. + * @function verify + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndSessionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.escalateSession != null && message.hasOwnProperty("escalateSession")) { + properties._escalateSession = 1; + if (typeof message.escalateSession !== "boolean") + return "escalateSession: boolean expected"; + } + return null; + }; + + /** + * Creates an EndSessionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig} EndSessionConfig + */ + EndSessionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig) + return object; + var message = new $root.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig(); + if (object.escalateSession != null) + message.escalateSession = Boolean(object.escalateSession); + return message; + }; + + /** + * Creates a plain object from an EndSessionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @static + * @param {google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig} message EndSessionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndSessionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.escalateSession != null && message.hasOwnProperty("escalateSession")) { + object.escalateSession = message.escalateSession; + if (options.oneofs) + object._escalateSession = "escalateSession"; + } + return object; + }; + + /** + * Converts this EndSessionConfig to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @instance + * @returns {Object.} JSON object + */ + EndSessionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EndSessionConfig + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EndSessionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig"; + }; + + return EndSessionConfig; + })(); + /** * ErrorHandlingStrategy enum. * @name google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy @@ -103185,6 +103724,7 @@ * @memberof google.cloud.ces.v1beta * @interface IConversationLoggingSettings * @property {boolean|null} [disableConversationLogging] ConversationLoggingSettings disableConversationLogging + * @property {google.protobuf.IDuration|null} [retentionWindow] ConversationLoggingSettings retentionWindow */ /** @@ -103210,6 +103750,14 @@ */ ConversationLoggingSettings.prototype.disableConversationLogging = false; + /** + * ConversationLoggingSettings retentionWindow. + * @member {google.protobuf.IDuration|null|undefined} retentionWindow + * @memberof google.cloud.ces.v1beta.ConversationLoggingSettings + * @instance + */ + ConversationLoggingSettings.prototype.retentionWindow = null; + /** * Creates a new ConversationLoggingSettings instance using the specified properties. * @function create @@ -103236,6 +103784,8 @@ writer = $Writer.create(); if (message.disableConversationLogging != null && Object.hasOwnProperty.call(message, "disableConversationLogging")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disableConversationLogging); + if (message.retentionWindow != null && Object.hasOwnProperty.call(message, "retentionWindow")) + $root.google.protobuf.Duration.encode(message.retentionWindow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -103276,6 +103826,10 @@ message.disableConversationLogging = reader.bool(); break; } + case 2: { + message.retentionWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -103314,6 +103868,11 @@ if (message.disableConversationLogging != null && message.hasOwnProperty("disableConversationLogging")) if (typeof message.disableConversationLogging !== "boolean") return "disableConversationLogging: boolean expected"; + if (message.retentionWindow != null && message.hasOwnProperty("retentionWindow")) { + var error = $root.google.protobuf.Duration.verify(message.retentionWindow); + if (error) + return "retentionWindow." + error; + } return null; }; @@ -103331,6 +103890,11 @@ var message = new $root.google.cloud.ces.v1beta.ConversationLoggingSettings(); if (object.disableConversationLogging != null) message.disableConversationLogging = Boolean(object.disableConversationLogging); + if (object.retentionWindow != null) { + if (typeof object.retentionWindow !== "object") + throw TypeError(".google.cloud.ces.v1beta.ConversationLoggingSettings.retentionWindow: object expected"); + message.retentionWindow = $root.google.protobuf.Duration.fromObject(object.retentionWindow); + } return message; }; @@ -103347,10 +103911,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.disableConversationLogging = false; + object.retentionWindow = null; + } if (message.disableConversationLogging != null && message.hasOwnProperty("disableConversationLogging")) object.disableConversationLogging = message.disableConversationLogging; + if (message.retentionWindow != null && message.hasOwnProperty("retentionWindow")) + object.retentionWindow = $root.google.protobuf.Duration.toObject(message.retentionWindow, options); return object; }; @@ -134689,6 +135257,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.evaluationRun != null && message.hasOwnProperty("evaluationRun")) @@ -134808,6 +135377,10 @@ case 2: message.evaluationStatus = 2; break; + case "SKIPPED": + case 3: + message.evaluationStatus = 3; + break; } if (object.evaluationRun != null) message.evaluationRun = String(object.evaluationRun); @@ -135304,6 +135877,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.semanticSimilarityResult != null && message.hasOwnProperty("semanticSimilarityResult")) { @@ -135375,6 +135949,10 @@ case 2: message.outcome = 2; break; + case "SKIPPED": + case 3: + message.outcome = 3; + break; } if (object.semanticSimilarityResult != null) { if (typeof object.semanticSimilarityResult !== "object") @@ -135650,6 +136228,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.explanation != null && message.hasOwnProperty("explanation")) @@ -135691,6 +136270,10 @@ case 2: message.outcome = 2; break; + case "SKIPPED": + case 3: + message.outcome = 3; + break; } if (object.explanation != null) message.explanation = String(object.explanation); @@ -135949,6 +136532,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.explanation != null && message.hasOwnProperty("explanation")) @@ -135992,6 +136576,10 @@ case 2: message.outcome = 2; break; + case "SKIPPED": + case 3: + message.outcome = 3; + break; } if (object.explanation != null) message.explanation = String(object.explanation); @@ -137357,6 +137945,7 @@ case 0: case 1: case 2: + case 3: break; } return null; @@ -137408,6 +137997,10 @@ case 2: message.outcome = 2; break; + case "SKIPPED": + case 3: + message.outcome = 3; + break; } return message; }; @@ -139932,6 +140525,7 @@ case 0: case 1: case 2: + case 3: break; } return null; @@ -139974,6 +140568,10 @@ case 2: message.outcome = 2; break; + case "SKIPPED": + case 3: + message.outcome = 3; + break; } return message; }; @@ -140209,6 +140807,7 @@ case 0: case 1: case 2: + case 3: break; } return null; @@ -140247,6 +140846,10 @@ case 2: message.outcome = 2; break; + case "SKIPPED": + case 3: + message.outcome = 3; + break; } return message; }; @@ -140578,12 +141181,14 @@ * @property {number} OUTCOME_UNSPECIFIED=0 OUTCOME_UNSPECIFIED value * @property {number} PASS=1 PASS value * @property {number} FAIL=2 FAIL value + * @property {number} SKIPPED=3 SKIPPED value */ EvaluationResult.Outcome = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "OUTCOME_UNSPECIFIED"] = 0; values[valuesById[1] = "PASS"] = 1; values[valuesById[2] = "FAIL"] = 2; + values[valuesById[3] = "SKIPPED"] = 3; return values; })(); @@ -147317,26 +147922,26 @@ return values; })(); - v1beta.InputAudioConfig = (function() { + v1beta.MockConfig = (function() { /** - * Properties of an InputAudioConfig. + * Properties of a MockConfig. * @memberof google.cloud.ces.v1beta - * @interface IInputAudioConfig - * @property {google.cloud.ces.v1beta.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz - * @property {string|null} [noiseSuppressionLevel] InputAudioConfig noiseSuppressionLevel + * @interface IMockConfig + * @property {Array.|null} [mockedToolCalls] MockConfig mockedToolCalls + * @property {google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior|null} [unmatchedToolCallBehavior] MockConfig unmatchedToolCallBehavior */ /** - * Constructs a new InputAudioConfig. + * Constructs a new MockConfig. * @memberof google.cloud.ces.v1beta - * @classdesc Represents an InputAudioConfig. - * @implements IInputAudioConfig + * @classdesc Represents a MockConfig. + * @implements IMockConfig * @constructor - * @param {google.cloud.ces.v1beta.IInputAudioConfig=} [properties] Properties to set + * @param {google.cloud.ces.v1beta.IMockConfig=} [properties] Properties to set */ - function InputAudioConfig(properties) { + function MockConfig(properties) { + this.mockedToolCalls = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -147344,105 +147949,94 @@ } /** - * InputAudioConfig audioEncoding. - * @member {google.cloud.ces.v1beta.AudioEncoding} audioEncoding - * @memberof google.cloud.ces.v1beta.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.audioEncoding = 0; - - /** - * InputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * MockConfig mockedToolCalls. + * @member {Array.} mockedToolCalls + * @memberof google.cloud.ces.v1beta.MockConfig * @instance */ - InputAudioConfig.prototype.sampleRateHertz = 0; + MockConfig.prototype.mockedToolCalls = $util.emptyArray; /** - * InputAudioConfig noiseSuppressionLevel. - * @member {string} noiseSuppressionLevel - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * MockConfig unmatchedToolCallBehavior. + * @member {google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior} unmatchedToolCallBehavior + * @memberof google.cloud.ces.v1beta.MockConfig * @instance */ - InputAudioConfig.prototype.noiseSuppressionLevel = ""; + MockConfig.prototype.unmatchedToolCallBehavior = 0; /** - * Creates a new InputAudioConfig instance using the specified properties. + * Creates a new MockConfig instance using the specified properties. * @function create - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @static - * @param {google.cloud.ces.v1beta.IInputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.ces.v1beta.InputAudioConfig} InputAudioConfig instance + * @param {google.cloud.ces.v1beta.IMockConfig=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.MockConfig} MockConfig instance */ - InputAudioConfig.create = function create(properties) { - return new InputAudioConfig(properties); + MockConfig.create = function create(properties) { + return new MockConfig(properties); }; /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.ces.v1beta.InputAudioConfig.verify|verify} messages. + * Encodes the specified MockConfig message. Does not implicitly {@link google.cloud.ces.v1beta.MockConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @static - * @param {google.cloud.ces.v1beta.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.ces.v1beta.IMockConfig} message MockConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encode = function encode(message, writer) { + MockConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); - if (message.noiseSuppressionLevel != null && Object.hasOwnProperty.call(message, "noiseSuppressionLevel")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.noiseSuppressionLevel); + if (message.mockedToolCalls != null && message.mockedToolCalls.length) + for (var i = 0; i < message.mockedToolCalls.length; ++i) + $root.google.cloud.ces.v1beta.MockedToolCall.encode(message.mockedToolCalls[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.unmatchedToolCallBehavior != null && Object.hasOwnProperty.call(message, "unmatchedToolCallBehavior")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.unmatchedToolCallBehavior); return writer; }; /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.InputAudioConfig.verify|verify} messages. + * Encodes the specified MockConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.MockConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @static - * @param {google.cloud.ces.v1beta.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.ces.v1beta.IMockConfig} message MockConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + MockConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer. + * Decodes a MockConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.ces.v1beta.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.ces.v1beta.MockConfig} MockConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputAudioConfig.decode = function decode(reader, length, error) { + MockConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.InputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.MockConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.audioEncoding = reader.int32(); + if (!(message.mockedToolCalls && message.mockedToolCalls.length)) + message.mockedToolCalls = []; + message.mockedToolCalls.push($root.google.cloud.ces.v1beta.MockedToolCall.decode(reader, reader.uint32())); break; } case 2: { - message.sampleRateHertz = reader.int32(); - break; - } - case 6: { - message.noiseSuppressionLevel = reader.string(); + message.unmatchedToolCallBehavior = reader.int32(); break; } default: @@ -147454,169 +148048,190 @@ }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a MockConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.ces.v1beta.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.ces.v1beta.MockConfig} MockConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + MockConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InputAudioConfig message. + * Verifies a MockConfig message. * @function verify - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InputAudioConfig.verify = function verify(message) { + MockConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { + if (message.mockedToolCalls != null && message.hasOwnProperty("mockedToolCalls")) { + if (!Array.isArray(message.mockedToolCalls)) + return "mockedToolCalls: array expected"; + for (var i = 0; i < message.mockedToolCalls.length; ++i) { + var error = $root.google.cloud.ces.v1beta.MockedToolCall.verify(message.mockedToolCalls[i]); + if (error) + return "mockedToolCalls." + error; + } + } + if (message.unmatchedToolCallBehavior != null && message.hasOwnProperty("unmatchedToolCallBehavior")) + switch (message.unmatchedToolCallBehavior) { default: - return "audioEncoding: enum value expected"; + return "unmatchedToolCallBehavior: enum value expected"; case 0: case 1: case 2: - case 3: break; } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - if (message.noiseSuppressionLevel != null && message.hasOwnProperty("noiseSuppressionLevel")) - if (!$util.isString(message.noiseSuppressionLevel)) - return "noiseSuppressionLevel: string expected"; return null; }; /** - * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a MockConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.ces.v1beta.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.ces.v1beta.MockConfig} MockConfig */ - InputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.ces.v1beta.InputAudioConfig) + MockConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.MockConfig) return object; - var message = new $root.google.cloud.ces.v1beta.InputAudioConfig(); - switch (object.audioEncoding) { + var message = new $root.google.cloud.ces.v1beta.MockConfig(); + if (object.mockedToolCalls) { + if (!Array.isArray(object.mockedToolCalls)) + throw TypeError(".google.cloud.ces.v1beta.MockConfig.mockedToolCalls: array expected"); + message.mockedToolCalls = []; + for (var i = 0; i < object.mockedToolCalls.length; ++i) { + if (typeof object.mockedToolCalls[i] !== "object") + throw TypeError(".google.cloud.ces.v1beta.MockConfig.mockedToolCalls: object expected"); + message.mockedToolCalls[i] = $root.google.cloud.ces.v1beta.MockedToolCall.fromObject(object.mockedToolCalls[i]); + } + } + switch (object.unmatchedToolCallBehavior) { default: - if (typeof object.audioEncoding === "number") { - message.audioEncoding = object.audioEncoding; + if (typeof object.unmatchedToolCallBehavior === "number") { + message.unmatchedToolCallBehavior = object.unmatchedToolCallBehavior; break; } break; - case "AUDIO_ENCODING_UNSPECIFIED": + case "UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED": case 0: - message.audioEncoding = 0; + message.unmatchedToolCallBehavior = 0; break; - case "LINEAR16": + case "FAIL": case 1: - message.audioEncoding = 1; + message.unmatchedToolCallBehavior = 1; break; - case "MULAW": + case "PASS_THROUGH": case 2: - message.audioEncoding = 2; - break; - case "ALAW": - case 3: - message.audioEncoding = 3; + message.unmatchedToolCallBehavior = 2; break; } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.noiseSuppressionLevel != null) - message.noiseSuppressionLevel = String(object.noiseSuppressionLevel); return message; }; /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from a MockConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @static - * @param {google.cloud.ces.v1beta.InputAudioConfig} message InputAudioConfig + * @param {google.cloud.ces.v1beta.MockConfig} message MockConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InputAudioConfig.toObject = function toObject(message, options) { + MockConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.noiseSuppressionLevel = ""; - } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.ces.v1beta.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.ces.v1beta.AudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.noiseSuppressionLevel != null && message.hasOwnProperty("noiseSuppressionLevel")) - object.noiseSuppressionLevel = message.noiseSuppressionLevel; + if (options.arrays || options.defaults) + object.mockedToolCalls = []; + if (options.defaults) + object.unmatchedToolCallBehavior = options.enums === String ? "UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED" : 0; + if (message.mockedToolCalls && message.mockedToolCalls.length) { + object.mockedToolCalls = []; + for (var j = 0; j < message.mockedToolCalls.length; ++j) + object.mockedToolCalls[j] = $root.google.cloud.ces.v1beta.MockedToolCall.toObject(message.mockedToolCalls[j], options); + } + if (message.unmatchedToolCallBehavior != null && message.hasOwnProperty("unmatchedToolCallBehavior")) + object.unmatchedToolCallBehavior = options.enums === String ? $root.google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior[message.unmatchedToolCallBehavior] === undefined ? message.unmatchedToolCallBehavior : $root.google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior[message.unmatchedToolCallBehavior] : message.unmatchedToolCallBehavior; return object; }; /** - * Converts this InputAudioConfig to JSON. + * Converts this MockConfig to JSON. * @function toJSON - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @instance * @returns {Object.} JSON object */ - InputAudioConfig.prototype.toJSON = function toJSON() { + MockConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InputAudioConfig + * Gets the default type url for MockConfig * @function getTypeUrl - * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @memberof google.cloud.ces.v1beta.MockConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MockConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.ces.v1beta.InputAudioConfig"; + return typeUrlPrefix + "/google.cloud.ces.v1beta.MockConfig"; }; - return InputAudioConfig; + /** + * UnmatchedToolCallBehavior enum. + * @name google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior + * @enum {number} + * @property {number} UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED=0 UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED value + * @property {number} FAIL=1 FAIL value + * @property {number} PASS_THROUGH=2 PASS_THROUGH value + */ + MockConfig.UnmatchedToolCallBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "FAIL"] = 1; + values[valuesById[2] = "PASS_THROUGH"] = 2; + return values; + })(); + + return MockConfig; })(); - v1beta.OutputAudioConfig = (function() { + v1beta.InputAudioConfig = (function() { /** - * Properties of an OutputAudioConfig. + * Properties of an InputAudioConfig. * @memberof google.cloud.ces.v1beta - * @interface IOutputAudioConfig - * @property {google.cloud.ces.v1beta.AudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz + * @interface IInputAudioConfig + * @property {google.cloud.ces.v1beta.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz + * @property {string|null} [noiseSuppressionLevel] InputAudioConfig noiseSuppressionLevel */ /** - * Constructs a new OutputAudioConfig. + * Constructs a new InputAudioConfig. * @memberof google.cloud.ces.v1beta - * @classdesc Represents an OutputAudioConfig. - * @implements IOutputAudioConfig + * @classdesc Represents an InputAudioConfig. + * @implements IInputAudioConfig * @constructor - * @param {google.cloud.ces.v1beta.IOutputAudioConfig=} [properties] Properties to set + * @param {google.cloud.ces.v1beta.IInputAudioConfig=} [properties] Properties to set */ - function OutputAudioConfig(properties) { + function InputAudioConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -147624,80 +148239,90 @@ } /** - * OutputAudioConfig audioEncoding. + * InputAudioConfig audioEncoding. * @member {google.cloud.ces.v1beta.AudioEncoding} audioEncoding - * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @memberof google.cloud.ces.v1beta.InputAudioConfig * @instance */ - OutputAudioConfig.prototype.audioEncoding = 0; + InputAudioConfig.prototype.audioEncoding = 0; /** - * OutputAudioConfig sampleRateHertz. + * InputAudioConfig sampleRateHertz. * @member {number} sampleRateHertz - * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @memberof google.cloud.ces.v1beta.InputAudioConfig * @instance */ - OutputAudioConfig.prototype.sampleRateHertz = 0; + InputAudioConfig.prototype.sampleRateHertz = 0; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * InputAudioConfig noiseSuppressionLevel. + * @member {string} noiseSuppressionLevel + * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.noiseSuppressionLevel = ""; + + /** + * Creates a new InputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @memberof google.cloud.ces.v1beta.InputAudioConfig * @static - * @param {google.cloud.ces.v1beta.IOutputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.ces.v1beta.OutputAudioConfig} OutputAudioConfig instance + * @param {google.cloud.ces.v1beta.IInputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.InputAudioConfig} InputAudioConfig instance */ - OutputAudioConfig.create = function create(properties) { - return new OutputAudioConfig(properties); + InputAudioConfig.create = function create(properties) { + return new InputAudioConfig(properties); }; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.ces.v1beta.OutputAudioConfig.verify|verify} messages. + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.ces.v1beta.InputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @memberof google.cloud.ces.v1beta.InputAudioConfig * @static - * @param {google.cloud.ces.v1beta.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.ces.v1beta.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encode = function encode(message, writer) { + InputAudioConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + if (message.noiseSuppressionLevel != null && Object.hasOwnProperty.call(message, "noiseSuppressionLevel")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.noiseSuppressionLevel); return writer; }; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.OutputAudioConfig.verify|verify} messages. + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.InputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @memberof google.cloud.ces.v1beta.InputAudioConfig * @static - * @param {google.cloud.ces.v1beta.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.ces.v1beta.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes an InputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @memberof google.cloud.ces.v1beta.InputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.ces.v1beta.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.ces.v1beta.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decode = function decode(reader, length, error) { + InputAudioConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.OutputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.InputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -147711,6 +148336,10 @@ message.sampleRateHertz = reader.int32(); break; } + case 6: { + message.noiseSuppressionLevel = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -147720,30 +148349,30 @@ }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @memberof google.cloud.ces.v1beta.InputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.ces.v1beta.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.ces.v1beta.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputAudioConfig message. + * Verifies an InputAudioConfig message. * @function verify - * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @memberof google.cloud.ces.v1beta.InputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputAudioConfig.verify = function verify(message) { + InputAudioConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) @@ -147759,21 +148388,287 @@ if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) if (!$util.isInteger(message.sampleRateHertz)) return "sampleRateHertz: integer expected"; + if (message.noiseSuppressionLevel != null && message.hasOwnProperty("noiseSuppressionLevel")) + if (!$util.isString(message.noiseSuppressionLevel)) + return "noiseSuppressionLevel: string expected"; return null; }; /** - * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @memberof google.cloud.ces.v1beta.InputAudioConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.ces.v1beta.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.ces.v1beta.InputAudioConfig} InputAudioConfig */ - OutputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.ces.v1beta.OutputAudioConfig) + InputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.InputAudioConfig) return object; - var message = new $root.google.cloud.ces.v1beta.OutputAudioConfig(); + var message = new $root.google.cloud.ces.v1beta.InputAudioConfig(); + switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; + } + break; + case "AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "LINEAR16": + case 1: + message.audioEncoding = 1; + break; + case "MULAW": + case 2: + message.audioEncoding = 2; + break; + case "ALAW": + case 3: + message.audioEncoding = 3; + break; + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.noiseSuppressionLevel != null) + message.noiseSuppressionLevel = String(object.noiseSuppressionLevel); + return message; + }; + + /** + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @static + * @param {google.cloud.ces.v1beta.InputAudioConfig} message InputAudioConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InputAudioConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.noiseSuppressionLevel = ""; + } + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.ces.v1beta.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.ces.v1beta.AudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.noiseSuppressionLevel != null && message.hasOwnProperty("noiseSuppressionLevel")) + object.noiseSuppressionLevel = message.noiseSuppressionLevel; + return object; + }; + + /** + * Converts this InputAudioConfig to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @instance + * @returns {Object.} JSON object + */ + InputAudioConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InputAudioConfig + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.InputAudioConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.InputAudioConfig"; + }; + + return InputAudioConfig; + })(); + + v1beta.OutputAudioConfig = (function() { + + /** + * Properties of an OutputAudioConfig. + * @memberof google.cloud.ces.v1beta + * @interface IOutputAudioConfig + * @property {google.cloud.ces.v1beta.AudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz + */ + + /** + * Constructs a new OutputAudioConfig. + * @memberof google.cloud.ces.v1beta + * @classdesc Represents an OutputAudioConfig. + * @implements IOutputAudioConfig + * @constructor + * @param {google.cloud.ces.v1beta.IOutputAudioConfig=} [properties] Properties to set + */ + function OutputAudioConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OutputAudioConfig audioEncoding. + * @member {google.cloud.ces.v1beta.AudioEncoding} audioEncoding + * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @instance + */ + OutputAudioConfig.prototype.audioEncoding = 0; + + /** + * OutputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @instance + */ + OutputAudioConfig.prototype.sampleRateHertz = 0; + + /** + * Creates a new OutputAudioConfig instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @static + * @param {google.cloud.ces.v1beta.IOutputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.OutputAudioConfig} OutputAudioConfig instance + */ + OutputAudioConfig.create = function create(properties) { + return new OutputAudioConfig(properties); + }; + + /** + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.ces.v1beta.OutputAudioConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @static + * @param {google.cloud.ces.v1beta.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudioConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + return writer; + }; + + /** + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.OutputAudioConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @static + * @param {google.cloud.ces.v1beta.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OutputAudioConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.OutputAudioConfig} OutputAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudioConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.OutputAudioConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.audioEncoding = reader.int32(); + break; + } + case 2: { + message.sampleRateHertz = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.OutputAudioConfig} OutputAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OutputAudioConfig message. + * @function verify + * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OutputAudioConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + return null; + }; + + /** + * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.OutputAudioConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.OutputAudioConfig} OutputAudioConfig + */ + OutputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.OutputAudioConfig) + return object; + var message = new $root.google.cloud.ces.v1beta.OutputAudioConfig(); switch (object.audioEncoding) { default: if (typeof object.audioEncoding === "number") { @@ -152894,6 +153789,345 @@ return BidiSessionServerMessage; })(); + v1beta.MockedToolCall = (function() { + + /** + * Properties of a MockedToolCall. + * @memberof google.cloud.ces.v1beta + * @interface IMockedToolCall + * @property {string|null} [toolId] MockedToolCall toolId + * @property {google.cloud.ces.v1beta.IToolsetTool|null} [toolset] MockedToolCall toolset + * @property {string|null} [tool] MockedToolCall tool + * @property {google.protobuf.IStruct|null} [expectedArgsPattern] MockedToolCall expectedArgsPattern + * @property {google.protobuf.IStruct|null} [mockResponse] MockedToolCall mockResponse + */ + + /** + * Constructs a new MockedToolCall. + * @memberof google.cloud.ces.v1beta + * @classdesc Represents a MockedToolCall. + * @implements IMockedToolCall + * @constructor + * @param {google.cloud.ces.v1beta.IMockedToolCall=} [properties] Properties to set + */ + function MockedToolCall(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MockedToolCall toolId. + * @member {string|null|undefined} toolId + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @instance + */ + MockedToolCall.prototype.toolId = null; + + /** + * MockedToolCall toolset. + * @member {google.cloud.ces.v1beta.IToolsetTool|null|undefined} toolset + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @instance + */ + MockedToolCall.prototype.toolset = null; + + /** + * MockedToolCall tool. + * @member {string} tool + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @instance + */ + MockedToolCall.prototype.tool = ""; + + /** + * MockedToolCall expectedArgsPattern. + * @member {google.protobuf.IStruct|null|undefined} expectedArgsPattern + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @instance + */ + MockedToolCall.prototype.expectedArgsPattern = null; + + /** + * MockedToolCall mockResponse. + * @member {google.protobuf.IStruct|null|undefined} mockResponse + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @instance + */ + MockedToolCall.prototype.mockResponse = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MockedToolCall toolIdentifier. + * @member {"toolId"|"toolset"|undefined} toolIdentifier + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @instance + */ + Object.defineProperty(MockedToolCall.prototype, "toolIdentifier", { + get: $util.oneOfGetter($oneOfFields = ["toolId", "toolset"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MockedToolCall instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @static + * @param {google.cloud.ces.v1beta.IMockedToolCall=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.MockedToolCall} MockedToolCall instance + */ + MockedToolCall.create = function create(properties) { + return new MockedToolCall(properties); + }; + + /** + * Encodes the specified MockedToolCall message. Does not implicitly {@link google.cloud.ces.v1beta.MockedToolCall.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @static + * @param {google.cloud.ces.v1beta.IMockedToolCall} message MockedToolCall message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MockedToolCall.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tool != null && Object.hasOwnProperty.call(message, "tool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tool); + if (message.expectedArgsPattern != null && Object.hasOwnProperty.call(message, "expectedArgsPattern")) + $root.google.protobuf.Struct.encode(message.expectedArgsPattern, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mockResponse != null && Object.hasOwnProperty.call(message, "mockResponse")) + $root.google.protobuf.Struct.encode(message.mockResponse, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.toolId != null && Object.hasOwnProperty.call(message, "toolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.toolId); + if (message.toolset != null && Object.hasOwnProperty.call(message, "toolset")) + $root.google.cloud.ces.v1beta.ToolsetTool.encode(message.toolset, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MockedToolCall message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.MockedToolCall.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @static + * @param {google.cloud.ces.v1beta.IMockedToolCall} message MockedToolCall message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MockedToolCall.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MockedToolCall message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.MockedToolCall} MockedToolCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MockedToolCall.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.MockedToolCall(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.toolId = reader.string(); + break; + } + case 5: { + message.toolset = $root.google.cloud.ces.v1beta.ToolsetTool.decode(reader, reader.uint32()); + break; + } + case 1: { + message.tool = reader.string(); + break; + } + case 2: { + message.expectedArgsPattern = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.mockResponse = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MockedToolCall message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.MockedToolCall} MockedToolCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MockedToolCall.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MockedToolCall message. + * @function verify + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MockedToolCall.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.toolId != null && message.hasOwnProperty("toolId")) { + properties.toolIdentifier = 1; + if (!$util.isString(message.toolId)) + return "toolId: string expected"; + } + if (message.toolset != null && message.hasOwnProperty("toolset")) { + if (properties.toolIdentifier === 1) + return "toolIdentifier: multiple values"; + properties.toolIdentifier = 1; + { + var error = $root.google.cloud.ces.v1beta.ToolsetTool.verify(message.toolset); + if (error) + return "toolset." + error; + } + } + if (message.tool != null && message.hasOwnProperty("tool")) + if (!$util.isString(message.tool)) + return "tool: string expected"; + if (message.expectedArgsPattern != null && message.hasOwnProperty("expectedArgsPattern")) { + var error = $root.google.protobuf.Struct.verify(message.expectedArgsPattern); + if (error) + return "expectedArgsPattern." + error; + } + if (message.mockResponse != null && message.hasOwnProperty("mockResponse")) { + var error = $root.google.protobuf.Struct.verify(message.mockResponse); + if (error) + return "mockResponse." + error; + } + return null; + }; + + /** + * Creates a MockedToolCall message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.MockedToolCall} MockedToolCall + */ + MockedToolCall.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.MockedToolCall) + return object; + var message = new $root.google.cloud.ces.v1beta.MockedToolCall(); + if (object.toolId != null) + message.toolId = String(object.toolId); + if (object.toolset != null) { + if (typeof object.toolset !== "object") + throw TypeError(".google.cloud.ces.v1beta.MockedToolCall.toolset: object expected"); + message.toolset = $root.google.cloud.ces.v1beta.ToolsetTool.fromObject(object.toolset); + } + if (object.tool != null) + message.tool = String(object.tool); + if (object.expectedArgsPattern != null) { + if (typeof object.expectedArgsPattern !== "object") + throw TypeError(".google.cloud.ces.v1beta.MockedToolCall.expectedArgsPattern: object expected"); + message.expectedArgsPattern = $root.google.protobuf.Struct.fromObject(object.expectedArgsPattern); + } + if (object.mockResponse != null) { + if (typeof object.mockResponse !== "object") + throw TypeError(".google.cloud.ces.v1beta.MockedToolCall.mockResponse: object expected"); + message.mockResponse = $root.google.protobuf.Struct.fromObject(object.mockResponse); + } + return message; + }; + + /** + * Creates a plain object from a MockedToolCall message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @static + * @param {google.cloud.ces.v1beta.MockedToolCall} message MockedToolCall + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MockedToolCall.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tool = ""; + object.expectedArgsPattern = null; + object.mockResponse = null; + } + if (message.tool != null && message.hasOwnProperty("tool")) + object.tool = message.tool; + if (message.expectedArgsPattern != null && message.hasOwnProperty("expectedArgsPattern")) + object.expectedArgsPattern = $root.google.protobuf.Struct.toObject(message.expectedArgsPattern, options); + if (message.mockResponse != null && message.hasOwnProperty("mockResponse")) + object.mockResponse = $root.google.protobuf.Struct.toObject(message.mockResponse, options); + if (message.toolId != null && message.hasOwnProperty("toolId")) { + object.toolId = message.toolId; + if (options.oneofs) + object.toolIdentifier = "toolId"; + } + if (message.toolset != null && message.hasOwnProperty("toolset")) { + object.toolset = $root.google.cloud.ces.v1beta.ToolsetTool.toObject(message.toolset, options); + if (options.oneofs) + object.toolIdentifier = "toolset"; + } + return object; + }; + + /** + * Converts this MockedToolCall to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @instance + * @returns {Object.} JSON object + */ + MockedToolCall.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MockedToolCall + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.MockedToolCall + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MockedToolCall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.MockedToolCall"; + }; + + return MockedToolCall; + })(); + v1beta.GoogleSearchSuggestions = (function() { /** @@ -155532,6 +156766,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.ces.v1beta.EvaluationService|exportEvaluations}. + * @memberof google.cloud.ces.v1beta.EvaluationService + * @typedef ExportEvaluationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportEvaluations. + * @function exportEvaluations + * @memberof google.cloud.ces.v1beta.EvaluationService + * @instance + * @param {google.cloud.ces.v1beta.IExportEvaluationsRequest} request ExportEvaluationsRequest message or plain object + * @param {google.cloud.ces.v1beta.EvaluationService.ExportEvaluationsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EvaluationService.prototype.exportEvaluations = function exportEvaluations(request, callback) { + return this.rpcCall(exportEvaluations, $root.google.cloud.ces.v1beta.ExportEvaluationsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportEvaluations" }); + + /** + * Calls ExportEvaluations. + * @function exportEvaluations + * @memberof google.cloud.ces.v1beta.EvaluationService + * @instance + * @param {google.cloud.ces.v1beta.IExportEvaluationsRequest} request ExportEvaluationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return EvaluationService; })(); @@ -157785,8 +159052,12 @@ * @memberof google.cloud.ces.v1beta * @interface IImportEvaluationsResponse * @property {Array.|null} [evaluations] ImportEvaluationsResponse evaluations + * @property {Array.|null} [evaluationResults] ImportEvaluationsResponse evaluationResults + * @property {Array.|null} [evaluationRuns] ImportEvaluationsResponse evaluationRuns * @property {Array.|null} [errorMessages] ImportEvaluationsResponse errorMessages * @property {number|null} [importFailureCount] ImportEvaluationsResponse importFailureCount + * @property {number|null} [evaluationResultImportFailureCount] ImportEvaluationsResponse evaluationResultImportFailureCount + * @property {number|null} [evaluationRunImportFailureCount] ImportEvaluationsResponse evaluationRunImportFailureCount */ /** @@ -157799,6 +159070,8 @@ */ function ImportEvaluationsResponse(properties) { this.evaluations = []; + this.evaluationResults = []; + this.evaluationRuns = []; this.errorMessages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -157814,6 +159087,22 @@ */ ImportEvaluationsResponse.prototype.evaluations = $util.emptyArray; + /** + * ImportEvaluationsResponse evaluationResults. + * @member {Array.} evaluationResults + * @memberof google.cloud.ces.v1beta.ImportEvaluationsResponse + * @instance + */ + ImportEvaluationsResponse.prototype.evaluationResults = $util.emptyArray; + + /** + * ImportEvaluationsResponse evaluationRuns. + * @member {Array.} evaluationRuns + * @memberof google.cloud.ces.v1beta.ImportEvaluationsResponse + * @instance + */ + ImportEvaluationsResponse.prototype.evaluationRuns = $util.emptyArray; + /** * ImportEvaluationsResponse errorMessages. * @member {Array.} errorMessages @@ -157830,6 +159119,22 @@ */ ImportEvaluationsResponse.prototype.importFailureCount = 0; + /** + * ImportEvaluationsResponse evaluationResultImportFailureCount. + * @member {number} evaluationResultImportFailureCount + * @memberof google.cloud.ces.v1beta.ImportEvaluationsResponse + * @instance + */ + ImportEvaluationsResponse.prototype.evaluationResultImportFailureCount = 0; + + /** + * ImportEvaluationsResponse evaluationRunImportFailureCount. + * @member {number} evaluationRunImportFailureCount + * @memberof google.cloud.ces.v1beta.ImportEvaluationsResponse + * @instance + */ + ImportEvaluationsResponse.prototype.evaluationRunImportFailureCount = 0; + /** * Creates a new ImportEvaluationsResponse instance using the specified properties. * @function create @@ -157862,6 +159167,16 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessages[i]); if (message.importFailureCount != null && Object.hasOwnProperty.call(message, "importFailureCount")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.importFailureCount); + if (message.evaluationResults != null && message.evaluationResults.length) + for (var i = 0; i < message.evaluationResults.length; ++i) + $root.google.cloud.ces.v1beta.EvaluationResult.encode(message.evaluationResults[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.evaluationRuns != null && message.evaluationRuns.length) + for (var i = 0; i < message.evaluationRuns.length; ++i) + $root.google.cloud.ces.v1beta.EvaluationRun.encode(message.evaluationRuns[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.evaluationResultImportFailureCount != null && Object.hasOwnProperty.call(message, "evaluationResultImportFailureCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.evaluationResultImportFailureCount); + if (message.evaluationRunImportFailureCount != null && Object.hasOwnProperty.call(message, "evaluationRunImportFailureCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.evaluationRunImportFailureCount); return writer; }; @@ -157904,6 +159219,18 @@ message.evaluations.push($root.google.cloud.ces.v1beta.Evaluation.decode(reader, reader.uint32())); break; } + case 4: { + if (!(message.evaluationResults && message.evaluationResults.length)) + message.evaluationResults = []; + message.evaluationResults.push($root.google.cloud.ces.v1beta.EvaluationResult.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.evaluationRuns && message.evaluationRuns.length)) + message.evaluationRuns = []; + message.evaluationRuns.push($root.google.cloud.ces.v1beta.EvaluationRun.decode(reader, reader.uint32())); + break; + } case 2: { if (!(message.errorMessages && message.errorMessages.length)) message.errorMessages = []; @@ -157914,6 +159241,14 @@ message.importFailureCount = reader.int32(); break; } + case 6: { + message.evaluationResultImportFailureCount = reader.int32(); + break; + } + case 7: { + message.evaluationRunImportFailureCount = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -157958,6 +159293,24 @@ return "evaluations." + error; } } + if (message.evaluationResults != null && message.hasOwnProperty("evaluationResults")) { + if (!Array.isArray(message.evaluationResults)) + return "evaluationResults: array expected"; + for (var i = 0; i < message.evaluationResults.length; ++i) { + var error = $root.google.cloud.ces.v1beta.EvaluationResult.verify(message.evaluationResults[i]); + if (error) + return "evaluationResults." + error; + } + } + if (message.evaluationRuns != null && message.hasOwnProperty("evaluationRuns")) { + if (!Array.isArray(message.evaluationRuns)) + return "evaluationRuns: array expected"; + for (var i = 0; i < message.evaluationRuns.length; ++i) { + var error = $root.google.cloud.ces.v1beta.EvaluationRun.verify(message.evaluationRuns[i]); + if (error) + return "evaluationRuns." + error; + } + } if (message.errorMessages != null && message.hasOwnProperty("errorMessages")) { if (!Array.isArray(message.errorMessages)) return "errorMessages: array expected"; @@ -157968,6 +159321,12 @@ if (message.importFailureCount != null && message.hasOwnProperty("importFailureCount")) if (!$util.isInteger(message.importFailureCount)) return "importFailureCount: integer expected"; + if (message.evaluationResultImportFailureCount != null && message.hasOwnProperty("evaluationResultImportFailureCount")) + if (!$util.isInteger(message.evaluationResultImportFailureCount)) + return "evaluationResultImportFailureCount: integer expected"; + if (message.evaluationRunImportFailureCount != null && message.hasOwnProperty("evaluationRunImportFailureCount")) + if (!$util.isInteger(message.evaluationRunImportFailureCount)) + return "evaluationRunImportFailureCount: integer expected"; return null; }; @@ -157993,6 +159352,26 @@ message.evaluations[i] = $root.google.cloud.ces.v1beta.Evaluation.fromObject(object.evaluations[i]); } } + if (object.evaluationResults) { + if (!Array.isArray(object.evaluationResults)) + throw TypeError(".google.cloud.ces.v1beta.ImportEvaluationsResponse.evaluationResults: array expected"); + message.evaluationResults = []; + for (var i = 0; i < object.evaluationResults.length; ++i) { + if (typeof object.evaluationResults[i] !== "object") + throw TypeError(".google.cloud.ces.v1beta.ImportEvaluationsResponse.evaluationResults: object expected"); + message.evaluationResults[i] = $root.google.cloud.ces.v1beta.EvaluationResult.fromObject(object.evaluationResults[i]); + } + } + if (object.evaluationRuns) { + if (!Array.isArray(object.evaluationRuns)) + throw TypeError(".google.cloud.ces.v1beta.ImportEvaluationsResponse.evaluationRuns: array expected"); + message.evaluationRuns = []; + for (var i = 0; i < object.evaluationRuns.length; ++i) { + if (typeof object.evaluationRuns[i] !== "object") + throw TypeError(".google.cloud.ces.v1beta.ImportEvaluationsResponse.evaluationRuns: object expected"); + message.evaluationRuns[i] = $root.google.cloud.ces.v1beta.EvaluationRun.fromObject(object.evaluationRuns[i]); + } + } if (object.errorMessages) { if (!Array.isArray(object.errorMessages)) throw TypeError(".google.cloud.ces.v1beta.ImportEvaluationsResponse.errorMessages: array expected"); @@ -158002,6 +159381,10 @@ } if (object.importFailureCount != null) message.importFailureCount = object.importFailureCount | 0; + if (object.evaluationResultImportFailureCount != null) + message.evaluationResultImportFailureCount = object.evaluationResultImportFailureCount | 0; + if (object.evaluationRunImportFailureCount != null) + message.evaluationRunImportFailureCount = object.evaluationRunImportFailureCount | 0; return message; }; @@ -158021,9 +159404,14 @@ if (options.arrays || options.defaults) { object.evaluations = []; object.errorMessages = []; + object.evaluationResults = []; + object.evaluationRuns = []; } - if (options.defaults) + if (options.defaults) { object.importFailureCount = 0; + object.evaluationResultImportFailureCount = 0; + object.evaluationRunImportFailureCount = 0; + } if (message.evaluations && message.evaluations.length) { object.evaluations = []; for (var j = 0; j < message.evaluations.length; ++j) @@ -158036,6 +159424,20 @@ } if (message.importFailureCount != null && message.hasOwnProperty("importFailureCount")) object.importFailureCount = message.importFailureCount; + if (message.evaluationResults && message.evaluationResults.length) { + object.evaluationResults = []; + for (var j = 0; j < message.evaluationResults.length; ++j) + object.evaluationResults[j] = $root.google.cloud.ces.v1beta.EvaluationResult.toObject(message.evaluationResults[j], options); + } + if (message.evaluationRuns && message.evaluationRuns.length) { + object.evaluationRuns = []; + for (var j = 0; j < message.evaluationRuns.length; ++j) + object.evaluationRuns[j] = $root.google.cloud.ces.v1beta.EvaluationRun.toObject(message.evaluationRuns[j], options); + } + if (message.evaluationResultImportFailureCount != null && message.hasOwnProperty("evaluationResultImportFailureCount")) + object.evaluationResultImportFailureCount = message.evaluationResultImportFailureCount; + if (message.evaluationRunImportFailureCount != null && message.hasOwnProperty("evaluationRunImportFailureCount")) + object.evaluationRunImportFailureCount = message.evaluationRunImportFailureCount; return object; }; @@ -166977,6 +168379,1419 @@ return ListEvaluationExpectationsResponse; })(); + v1beta.ExportOptions = (function() { + + /** + * Properties of an ExportOptions. + * @memberof google.cloud.ces.v1beta + * @interface IExportOptions + * @property {google.cloud.ces.v1beta.ExportOptions.ExportFormat|null} [exportFormat] ExportOptions exportFormat + * @property {string|null} [gcsUri] ExportOptions gcsUri + */ + + /** + * Constructs a new ExportOptions. + * @memberof google.cloud.ces.v1beta + * @classdesc Represents an ExportOptions. + * @implements IExportOptions + * @constructor + * @param {google.cloud.ces.v1beta.IExportOptions=} [properties] Properties to set + */ + function ExportOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportOptions exportFormat. + * @member {google.cloud.ces.v1beta.ExportOptions.ExportFormat} exportFormat + * @memberof google.cloud.ces.v1beta.ExportOptions + * @instance + */ + ExportOptions.prototype.exportFormat = 0; + + /** + * ExportOptions gcsUri. + * @member {string} gcsUri + * @memberof google.cloud.ces.v1beta.ExportOptions + * @instance + */ + ExportOptions.prototype.gcsUri = ""; + + /** + * Creates a new ExportOptions instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.ExportOptions + * @static + * @param {google.cloud.ces.v1beta.IExportOptions=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.ExportOptions} ExportOptions instance + */ + ExportOptions.create = function create(properties) { + return new ExportOptions(properties); + }; + + /** + * Encodes the specified ExportOptions message. Does not implicitly {@link google.cloud.ces.v1beta.ExportOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.ExportOptions + * @static + * @param {google.cloud.ces.v1beta.IExportOptions} message ExportOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exportFormat != null && Object.hasOwnProperty.call(message, "exportFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.exportFormat); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); + return writer; + }; + + /** + * Encodes the specified ExportOptions message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.ExportOptions + * @static + * @param {google.cloud.ces.v1beta.IExportOptions} message ExportOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.ExportOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.ExportOptions} ExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.ExportOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.exportFormat = reader.int32(); + break; + } + case 2: { + message.gcsUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.ExportOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.ExportOptions} ExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportOptions message. + * @function verify + * @memberof google.cloud.ces.v1beta.ExportOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exportFormat != null && message.hasOwnProperty("exportFormat")) + switch (message.exportFormat) { + default: + return "exportFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + return null; + }; + + /** + * Creates an ExportOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.ExportOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.ExportOptions} ExportOptions + */ + ExportOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.ExportOptions) + return object; + var message = new $root.google.cloud.ces.v1beta.ExportOptions(); + switch (object.exportFormat) { + default: + if (typeof object.exportFormat === "number") { + message.exportFormat = object.exportFormat; + break; + } + break; + case "EXPORT_FORMAT_UNSPECIFIED": + case 0: + message.exportFormat = 0; + break; + case "JSON": + case 1: + message.exportFormat = 1; + break; + case "YAML": + case 2: + message.exportFormat = 2; + break; + } + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + return message; + }; + + /** + * Creates a plain object from an ExportOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.ExportOptions + * @static + * @param {google.cloud.ces.v1beta.ExportOptions} message ExportOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.exportFormat = options.enums === String ? "EXPORT_FORMAT_UNSPECIFIED" : 0; + object.gcsUri = ""; + } + if (message.exportFormat != null && message.hasOwnProperty("exportFormat")) + object.exportFormat = options.enums === String ? $root.google.cloud.ces.v1beta.ExportOptions.ExportFormat[message.exportFormat] === undefined ? message.exportFormat : $root.google.cloud.ces.v1beta.ExportOptions.ExportFormat[message.exportFormat] : message.exportFormat; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) + object.gcsUri = message.gcsUri; + return object; + }; + + /** + * Converts this ExportOptions to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.ExportOptions + * @instance + * @returns {Object.} JSON object + */ + ExportOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportOptions + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.ExportOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.ExportOptions"; + }; + + /** + * ExportFormat enum. + * @name google.cloud.ces.v1beta.ExportOptions.ExportFormat + * @enum {number} + * @property {number} EXPORT_FORMAT_UNSPECIFIED=0 EXPORT_FORMAT_UNSPECIFIED value + * @property {number} JSON=1 JSON value + * @property {number} YAML=2 YAML value + */ + ExportOptions.ExportFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXPORT_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "JSON"] = 1; + values[valuesById[2] = "YAML"] = 2; + return values; + })(); + + return ExportOptions; + })(); + + v1beta.ExportEvaluationsRequest = (function() { + + /** + * Properties of an ExportEvaluationsRequest. + * @memberof google.cloud.ces.v1beta + * @interface IExportEvaluationsRequest + * @property {string|null} [parent] ExportEvaluationsRequest parent + * @property {Array.|null} [names] ExportEvaluationsRequest names + * @property {google.cloud.ces.v1beta.IExportOptions|null} [exportOptions] ExportEvaluationsRequest exportOptions + * @property {boolean|null} [includeEvaluationResults] ExportEvaluationsRequest includeEvaluationResults + * @property {boolean|null} [includeEvaluations] ExportEvaluationsRequest includeEvaluations + */ + + /** + * Constructs a new ExportEvaluationsRequest. + * @memberof google.cloud.ces.v1beta + * @classdesc Represents an ExportEvaluationsRequest. + * @implements IExportEvaluationsRequest + * @constructor + * @param {google.cloud.ces.v1beta.IExportEvaluationsRequest=} [properties] Properties to set + */ + function ExportEvaluationsRequest(properties) { + this.names = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportEvaluationsRequest parent. + * @member {string} parent + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @instance + */ + ExportEvaluationsRequest.prototype.parent = ""; + + /** + * ExportEvaluationsRequest names. + * @member {Array.} names + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @instance + */ + ExportEvaluationsRequest.prototype.names = $util.emptyArray; + + /** + * ExportEvaluationsRequest exportOptions. + * @member {google.cloud.ces.v1beta.IExportOptions|null|undefined} exportOptions + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @instance + */ + ExportEvaluationsRequest.prototype.exportOptions = null; + + /** + * ExportEvaluationsRequest includeEvaluationResults. + * @member {boolean} includeEvaluationResults + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @instance + */ + ExportEvaluationsRequest.prototype.includeEvaluationResults = false; + + /** + * ExportEvaluationsRequest includeEvaluations. + * @member {boolean} includeEvaluations + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @instance + */ + ExportEvaluationsRequest.prototype.includeEvaluations = false; + + /** + * Creates a new ExportEvaluationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationsRequest=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.ExportEvaluationsRequest} ExportEvaluationsRequest instance + */ + ExportEvaluationsRequest.create = function create(properties) { + return new ExportEvaluationsRequest(properties); + }; + + /** + * Encodes the specified ExportEvaluationsRequest message. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationsRequest} message ExportEvaluationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); + if (message.exportOptions != null && Object.hasOwnProperty.call(message, "exportOptions")) + $root.google.cloud.ces.v1beta.ExportOptions.encode(message.exportOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.includeEvaluationResults != null && Object.hasOwnProperty.call(message, "includeEvaluationResults")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includeEvaluationResults); + if (message.includeEvaluations != null && Object.hasOwnProperty.call(message, "includeEvaluations")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.includeEvaluations); + return writer; + }; + + /** + * Encodes the specified ExportEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationsRequest} message ExportEvaluationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportEvaluationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.ExportEvaluationsRequest} ExportEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.ExportEvaluationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; + } + case 3: { + message.exportOptions = $root.google.cloud.ces.v1beta.ExportOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + message.includeEvaluationResults = reader.bool(); + break; + } + case 5: { + message.includeEvaluations = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportEvaluationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.ExportEvaluationsRequest} ExportEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportEvaluationsRequest message. + * @function verify + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportEvaluationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } + if (message.exportOptions != null && message.hasOwnProperty("exportOptions")) { + var error = $root.google.cloud.ces.v1beta.ExportOptions.verify(message.exportOptions); + if (error) + return "exportOptions." + error; + } + if (message.includeEvaluationResults != null && message.hasOwnProperty("includeEvaluationResults")) + if (typeof message.includeEvaluationResults !== "boolean") + return "includeEvaluationResults: boolean expected"; + if (message.includeEvaluations != null && message.hasOwnProperty("includeEvaluations")) + if (typeof message.includeEvaluations !== "boolean") + return "includeEvaluations: boolean expected"; + return null; + }; + + /** + * Creates an ExportEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.ExportEvaluationsRequest} ExportEvaluationsRequest + */ + ExportEvaluationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.ExportEvaluationsRequest) + return object; + var message = new $root.google.cloud.ces.v1beta.ExportEvaluationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.cloud.ces.v1beta.ExportEvaluationsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + if (object.exportOptions != null) { + if (typeof object.exportOptions !== "object") + throw TypeError(".google.cloud.ces.v1beta.ExportEvaluationsRequest.exportOptions: object expected"); + message.exportOptions = $root.google.cloud.ces.v1beta.ExportOptions.fromObject(object.exportOptions); + } + if (object.includeEvaluationResults != null) + message.includeEvaluationResults = Boolean(object.includeEvaluationResults); + if (object.includeEvaluations != null) + message.includeEvaluations = Boolean(object.includeEvaluations); + return message; + }; + + /** + * Creates a plain object from an ExportEvaluationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @static + * @param {google.cloud.ces.v1beta.ExportEvaluationsRequest} message ExportEvaluationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportEvaluationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) { + object.parent = ""; + object.exportOptions = null; + object.includeEvaluationResults = false; + object.includeEvaluations = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } + if (message.exportOptions != null && message.hasOwnProperty("exportOptions")) + object.exportOptions = $root.google.cloud.ces.v1beta.ExportOptions.toObject(message.exportOptions, options); + if (message.includeEvaluationResults != null && message.hasOwnProperty("includeEvaluationResults")) + object.includeEvaluationResults = message.includeEvaluationResults; + if (message.includeEvaluations != null && message.hasOwnProperty("includeEvaluations")) + object.includeEvaluations = message.includeEvaluations; + return object; + }; + + /** + * Converts this ExportEvaluationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @instance + * @returns {Object.} JSON object + */ + ExportEvaluationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportEvaluationsRequest + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.ExportEvaluationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportEvaluationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.ExportEvaluationsRequest"; + }; + + return ExportEvaluationsRequest; + })(); + + v1beta.ExportEvaluationsResponse = (function() { + + /** + * Properties of an ExportEvaluationsResponse. + * @memberof google.cloud.ces.v1beta + * @interface IExportEvaluationsResponse + * @property {Uint8Array|null} [evaluationsContent] ExportEvaluationsResponse evaluationsContent + * @property {string|null} [evaluationsUri] ExportEvaluationsResponse evaluationsUri + * @property {Object.|null} [failedEvaluations] ExportEvaluationsResponse failedEvaluations + */ + + /** + * Constructs a new ExportEvaluationsResponse. + * @memberof google.cloud.ces.v1beta + * @classdesc Represents an ExportEvaluationsResponse. + * @implements IExportEvaluationsResponse + * @constructor + * @param {google.cloud.ces.v1beta.IExportEvaluationsResponse=} [properties] Properties to set + */ + function ExportEvaluationsResponse(properties) { + this.failedEvaluations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportEvaluationsResponse evaluationsContent. + * @member {Uint8Array|null|undefined} evaluationsContent + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @instance + */ + ExportEvaluationsResponse.prototype.evaluationsContent = null; + + /** + * ExportEvaluationsResponse evaluationsUri. + * @member {string|null|undefined} evaluationsUri + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @instance + */ + ExportEvaluationsResponse.prototype.evaluationsUri = null; + + /** + * ExportEvaluationsResponse failedEvaluations. + * @member {Object.} failedEvaluations + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @instance + */ + ExportEvaluationsResponse.prototype.failedEvaluations = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportEvaluationsResponse evaluations. + * @member {"evaluationsContent"|"evaluationsUri"|undefined} evaluations + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @instance + */ + Object.defineProperty(ExportEvaluationsResponse.prototype, "evaluations", { + get: $util.oneOfGetter($oneOfFields = ["evaluationsContent", "evaluationsUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportEvaluationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationsResponse=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.ExportEvaluationsResponse} ExportEvaluationsResponse instance + */ + ExportEvaluationsResponse.create = function create(properties) { + return new ExportEvaluationsResponse(properties); + }; + + /** + * Encodes the specified ExportEvaluationsResponse message. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationsResponse} message ExportEvaluationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evaluationsContent != null && Object.hasOwnProperty.call(message, "evaluationsContent")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.evaluationsContent); + if (message.evaluationsUri != null && Object.hasOwnProperty.call(message, "evaluationsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.evaluationsUri); + if (message.failedEvaluations != null && Object.hasOwnProperty.call(message, "failedEvaluations")) + for (var keys = Object.keys(message.failedEvaluations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.failedEvaluations[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationsResponse} message ExportEvaluationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportEvaluationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.ExportEvaluationsResponse} ExportEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.ExportEvaluationsResponse(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.evaluationsContent = reader.bytes(); + break; + } + case 2: { + message.evaluationsUri = reader.string(); + break; + } + case 3: { + if (message.failedEvaluations === $util.emptyObject) + message.failedEvaluations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.failedEvaluations[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportEvaluationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.ExportEvaluationsResponse} ExportEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportEvaluationsResponse message. + * @function verify + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportEvaluationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.evaluationsContent != null && message.hasOwnProperty("evaluationsContent")) { + properties.evaluations = 1; + if (!(message.evaluationsContent && typeof message.evaluationsContent.length === "number" || $util.isString(message.evaluationsContent))) + return "evaluationsContent: buffer expected"; + } + if (message.evaluationsUri != null && message.hasOwnProperty("evaluationsUri")) { + if (properties.evaluations === 1) + return "evaluations: multiple values"; + properties.evaluations = 1; + if (!$util.isString(message.evaluationsUri)) + return "evaluationsUri: string expected"; + } + if (message.failedEvaluations != null && message.hasOwnProperty("failedEvaluations")) { + if (!$util.isObject(message.failedEvaluations)) + return "failedEvaluations: object expected"; + var key = Object.keys(message.failedEvaluations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.failedEvaluations[key[i]])) + return "failedEvaluations: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an ExportEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.ExportEvaluationsResponse} ExportEvaluationsResponse + */ + ExportEvaluationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.ExportEvaluationsResponse) + return object; + var message = new $root.google.cloud.ces.v1beta.ExportEvaluationsResponse(); + if (object.evaluationsContent != null) + if (typeof object.evaluationsContent === "string") + $util.base64.decode(object.evaluationsContent, message.evaluationsContent = $util.newBuffer($util.base64.length(object.evaluationsContent)), 0); + else if (object.evaluationsContent.length >= 0) + message.evaluationsContent = object.evaluationsContent; + if (object.evaluationsUri != null) + message.evaluationsUri = String(object.evaluationsUri); + if (object.failedEvaluations) { + if (typeof object.failedEvaluations !== "object") + throw TypeError(".google.cloud.ces.v1beta.ExportEvaluationsResponse.failedEvaluations: object expected"); + message.failedEvaluations = {}; + for (var keys = Object.keys(object.failedEvaluations), i = 0; i < keys.length; ++i) + message.failedEvaluations[keys[i]] = String(object.failedEvaluations[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an ExportEvaluationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @static + * @param {google.cloud.ces.v1beta.ExportEvaluationsResponse} message ExportEvaluationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportEvaluationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.failedEvaluations = {}; + if (message.evaluationsContent != null && message.hasOwnProperty("evaluationsContent")) { + object.evaluationsContent = options.bytes === String ? $util.base64.encode(message.evaluationsContent, 0, message.evaluationsContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.evaluationsContent) : message.evaluationsContent; + if (options.oneofs) + object.evaluations = "evaluationsContent"; + } + if (message.evaluationsUri != null && message.hasOwnProperty("evaluationsUri")) { + object.evaluationsUri = message.evaluationsUri; + if (options.oneofs) + object.evaluations = "evaluationsUri"; + } + var keys2; + if (message.failedEvaluations && (keys2 = Object.keys(message.failedEvaluations)).length) { + object.failedEvaluations = {}; + for (var j = 0; j < keys2.length; ++j) + object.failedEvaluations[keys2[j]] = message.failedEvaluations[keys2[j]]; + } + return object; + }; + + /** + * Converts this ExportEvaluationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @instance + * @returns {Object.} JSON object + */ + ExportEvaluationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportEvaluationsResponse + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.ExportEvaluationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportEvaluationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.ExportEvaluationsResponse"; + }; + + return ExportEvaluationsResponse; + })(); + + v1beta.ExportEvaluationResultsResponse = (function() { + + /** + * Properties of an ExportEvaluationResultsResponse. + * @memberof google.cloud.ces.v1beta + * @interface IExportEvaluationResultsResponse + * @property {Uint8Array|null} [evaluationResultsContent] ExportEvaluationResultsResponse evaluationResultsContent + * @property {string|null} [evaluationResultsUri] ExportEvaluationResultsResponse evaluationResultsUri + */ + + /** + * Constructs a new ExportEvaluationResultsResponse. + * @memberof google.cloud.ces.v1beta + * @classdesc Represents an ExportEvaluationResultsResponse. + * @implements IExportEvaluationResultsResponse + * @constructor + * @param {google.cloud.ces.v1beta.IExportEvaluationResultsResponse=} [properties] Properties to set + */ + function ExportEvaluationResultsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportEvaluationResultsResponse evaluationResultsContent. + * @member {Uint8Array|null|undefined} evaluationResultsContent + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @instance + */ + ExportEvaluationResultsResponse.prototype.evaluationResultsContent = null; + + /** + * ExportEvaluationResultsResponse evaluationResultsUri. + * @member {string|null|undefined} evaluationResultsUri + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @instance + */ + ExportEvaluationResultsResponse.prototype.evaluationResultsUri = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportEvaluationResultsResponse evaluationResults. + * @member {"evaluationResultsContent"|"evaluationResultsUri"|undefined} evaluationResults + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @instance + */ + Object.defineProperty(ExportEvaluationResultsResponse.prototype, "evaluationResults", { + get: $util.oneOfGetter($oneOfFields = ["evaluationResultsContent", "evaluationResultsUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportEvaluationResultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationResultsResponse=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.ExportEvaluationResultsResponse} ExportEvaluationResultsResponse instance + */ + ExportEvaluationResultsResponse.create = function create(properties) { + return new ExportEvaluationResultsResponse(properties); + }; + + /** + * Encodes the specified ExportEvaluationResultsResponse message. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationResultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationResultsResponse} message ExportEvaluationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluationResultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evaluationResultsContent != null && Object.hasOwnProperty.call(message, "evaluationResultsContent")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.evaluationResultsContent); + if (message.evaluationResultsUri != null && Object.hasOwnProperty.call(message, "evaluationResultsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.evaluationResultsUri); + return writer; + }; + + /** + * Encodes the specified ExportEvaluationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationResultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationResultsResponse} message ExportEvaluationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluationResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportEvaluationResultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.ExportEvaluationResultsResponse} ExportEvaluationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluationResultsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.ExportEvaluationResultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.evaluationResultsContent = reader.bytes(); + break; + } + case 2: { + message.evaluationResultsUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportEvaluationResultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.ExportEvaluationResultsResponse} ExportEvaluationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluationResultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportEvaluationResultsResponse message. + * @function verify + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportEvaluationResultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.evaluationResultsContent != null && message.hasOwnProperty("evaluationResultsContent")) { + properties.evaluationResults = 1; + if (!(message.evaluationResultsContent && typeof message.evaluationResultsContent.length === "number" || $util.isString(message.evaluationResultsContent))) + return "evaluationResultsContent: buffer expected"; + } + if (message.evaluationResultsUri != null && message.hasOwnProperty("evaluationResultsUri")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + if (!$util.isString(message.evaluationResultsUri)) + return "evaluationResultsUri: string expected"; + } + return null; + }; + + /** + * Creates an ExportEvaluationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.ExportEvaluationResultsResponse} ExportEvaluationResultsResponse + */ + ExportEvaluationResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.ExportEvaluationResultsResponse) + return object; + var message = new $root.google.cloud.ces.v1beta.ExportEvaluationResultsResponse(); + if (object.evaluationResultsContent != null) + if (typeof object.evaluationResultsContent === "string") + $util.base64.decode(object.evaluationResultsContent, message.evaluationResultsContent = $util.newBuffer($util.base64.length(object.evaluationResultsContent)), 0); + else if (object.evaluationResultsContent.length >= 0) + message.evaluationResultsContent = object.evaluationResultsContent; + if (object.evaluationResultsUri != null) + message.evaluationResultsUri = String(object.evaluationResultsUri); + return message; + }; + + /** + * Creates a plain object from an ExportEvaluationResultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @static + * @param {google.cloud.ces.v1beta.ExportEvaluationResultsResponse} message ExportEvaluationResultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportEvaluationResultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.evaluationResultsContent != null && message.hasOwnProperty("evaluationResultsContent")) { + object.evaluationResultsContent = options.bytes === String ? $util.base64.encode(message.evaluationResultsContent, 0, message.evaluationResultsContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.evaluationResultsContent) : message.evaluationResultsContent; + if (options.oneofs) + object.evaluationResults = "evaluationResultsContent"; + } + if (message.evaluationResultsUri != null && message.hasOwnProperty("evaluationResultsUri")) { + object.evaluationResultsUri = message.evaluationResultsUri; + if (options.oneofs) + object.evaluationResults = "evaluationResultsUri"; + } + return object; + }; + + /** + * Converts this ExportEvaluationResultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @instance + * @returns {Object.} JSON object + */ + ExportEvaluationResultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportEvaluationResultsResponse + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.ExportEvaluationResultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportEvaluationResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.ExportEvaluationResultsResponse"; + }; + + return ExportEvaluationResultsResponse; + })(); + + v1beta.ExportEvaluationRunsResponse = (function() { + + /** + * Properties of an ExportEvaluationRunsResponse. + * @memberof google.cloud.ces.v1beta + * @interface IExportEvaluationRunsResponse + * @property {Uint8Array|null} [evaluationRunsContent] ExportEvaluationRunsResponse evaluationRunsContent + * @property {string|null} [evaluationRunsUri] ExportEvaluationRunsResponse evaluationRunsUri + */ + + /** + * Constructs a new ExportEvaluationRunsResponse. + * @memberof google.cloud.ces.v1beta + * @classdesc Represents an ExportEvaluationRunsResponse. + * @implements IExportEvaluationRunsResponse + * @constructor + * @param {google.cloud.ces.v1beta.IExportEvaluationRunsResponse=} [properties] Properties to set + */ + function ExportEvaluationRunsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportEvaluationRunsResponse evaluationRunsContent. + * @member {Uint8Array|null|undefined} evaluationRunsContent + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @instance + */ + ExportEvaluationRunsResponse.prototype.evaluationRunsContent = null; + + /** + * ExportEvaluationRunsResponse evaluationRunsUri. + * @member {string|null|undefined} evaluationRunsUri + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @instance + */ + ExportEvaluationRunsResponse.prototype.evaluationRunsUri = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportEvaluationRunsResponse evaluationRuns. + * @member {"evaluationRunsContent"|"evaluationRunsUri"|undefined} evaluationRuns + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @instance + */ + Object.defineProperty(ExportEvaluationRunsResponse.prototype, "evaluationRuns", { + get: $util.oneOfGetter($oneOfFields = ["evaluationRunsContent", "evaluationRunsUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportEvaluationRunsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationRunsResponse=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.ExportEvaluationRunsResponse} ExportEvaluationRunsResponse instance + */ + ExportEvaluationRunsResponse.create = function create(properties) { + return new ExportEvaluationRunsResponse(properties); + }; + + /** + * Encodes the specified ExportEvaluationRunsResponse message. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationRunsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationRunsResponse} message ExportEvaluationRunsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluationRunsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evaluationRunsContent != null && Object.hasOwnProperty.call(message, "evaluationRunsContent")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.evaluationRunsContent); + if (message.evaluationRunsUri != null && Object.hasOwnProperty.call(message, "evaluationRunsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.evaluationRunsUri); + return writer; + }; + + /** + * Encodes the specified ExportEvaluationRunsResponse message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.ExportEvaluationRunsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @static + * @param {google.cloud.ces.v1beta.IExportEvaluationRunsResponse} message ExportEvaluationRunsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEvaluationRunsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportEvaluationRunsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.ExportEvaluationRunsResponse} ExportEvaluationRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluationRunsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.ExportEvaluationRunsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.evaluationRunsContent = reader.bytes(); + break; + } + case 2: { + message.evaluationRunsUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportEvaluationRunsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.ExportEvaluationRunsResponse} ExportEvaluationRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportEvaluationRunsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportEvaluationRunsResponse message. + * @function verify + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportEvaluationRunsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.evaluationRunsContent != null && message.hasOwnProperty("evaluationRunsContent")) { + properties.evaluationRuns = 1; + if (!(message.evaluationRunsContent && typeof message.evaluationRunsContent.length === "number" || $util.isString(message.evaluationRunsContent))) + return "evaluationRunsContent: buffer expected"; + } + if (message.evaluationRunsUri != null && message.hasOwnProperty("evaluationRunsUri")) { + if (properties.evaluationRuns === 1) + return "evaluationRuns: multiple values"; + properties.evaluationRuns = 1; + if (!$util.isString(message.evaluationRunsUri)) + return "evaluationRunsUri: string expected"; + } + return null; + }; + + /** + * Creates an ExportEvaluationRunsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.ExportEvaluationRunsResponse} ExportEvaluationRunsResponse + */ + ExportEvaluationRunsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.ExportEvaluationRunsResponse) + return object; + var message = new $root.google.cloud.ces.v1beta.ExportEvaluationRunsResponse(); + if (object.evaluationRunsContent != null) + if (typeof object.evaluationRunsContent === "string") + $util.base64.decode(object.evaluationRunsContent, message.evaluationRunsContent = $util.newBuffer($util.base64.length(object.evaluationRunsContent)), 0); + else if (object.evaluationRunsContent.length >= 0) + message.evaluationRunsContent = object.evaluationRunsContent; + if (object.evaluationRunsUri != null) + message.evaluationRunsUri = String(object.evaluationRunsUri); + return message; + }; + + /** + * Creates a plain object from an ExportEvaluationRunsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @static + * @param {google.cloud.ces.v1beta.ExportEvaluationRunsResponse} message ExportEvaluationRunsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportEvaluationRunsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.evaluationRunsContent != null && message.hasOwnProperty("evaluationRunsContent")) { + object.evaluationRunsContent = options.bytes === String ? $util.base64.encode(message.evaluationRunsContent, 0, message.evaluationRunsContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.evaluationRunsContent) : message.evaluationRunsContent; + if (options.oneofs) + object.evaluationRuns = "evaluationRunsContent"; + } + if (message.evaluationRunsUri != null && message.hasOwnProperty("evaluationRunsUri")) { + object.evaluationRunsUri = message.evaluationRunsUri; + if (options.oneofs) + object.evaluationRuns = "evaluationRunsUri"; + } + return object; + }; + + /** + * Converts this ExportEvaluationRunsResponse to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @instance + * @returns {Object.} JSON object + */ + ExportEvaluationRunsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportEvaluationRunsResponse + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.ExportEvaluationRunsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportEvaluationRunsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.ExportEvaluationRunsResponse"; + }; + + return ExportEvaluationRunsResponse; + })(); + v1beta.Omnichannel = (function() { /** @@ -169332,6 +172147,7 @@ * @property {google.protobuf.IStruct|null} [context] ExecuteToolRequest context * @property {string|null} [parent] ExecuteToolRequest parent * @property {google.protobuf.IStruct|null} [args] ExecuteToolRequest args + * @property {google.cloud.ces.v1beta.IMockConfig|null} [mockConfig] ExecuteToolRequest mockConfig */ /** @@ -169397,6 +172213,14 @@ */ ExecuteToolRequest.prototype.args = null; + /** + * ExecuteToolRequest mockConfig. + * @member {google.cloud.ces.v1beta.IMockConfig|null|undefined} mockConfig + * @memberof google.cloud.ces.v1beta.ExecuteToolRequest + * @instance + */ + ExecuteToolRequest.prototype.mockConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -169458,6 +172282,8 @@ $root.google.protobuf.Struct.encode(message.variables, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.context != null && Object.hasOwnProperty.call(message, "context")) $root.google.protobuf.Struct.encode(message.context, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.mockConfig != null && Object.hasOwnProperty.call(message, "mockConfig")) + $root.google.cloud.ces.v1beta.MockConfig.encode(message.mockConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -169518,6 +172344,10 @@ message.args = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } + case 7: { + message.mockConfig = $root.google.cloud.ces.v1beta.MockConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -169595,6 +172425,11 @@ if (error) return "args." + error; } + if (message.mockConfig != null && message.hasOwnProperty("mockConfig")) { + var error = $root.google.cloud.ces.v1beta.MockConfig.verify(message.mockConfig); + if (error) + return "mockConfig." + error; + } return null; }; @@ -169634,6 +172469,11 @@ throw TypeError(".google.cloud.ces.v1beta.ExecuteToolRequest.args: object expected"); message.args = $root.google.protobuf.Struct.fromObject(object.args); } + if (object.mockConfig != null) { + if (typeof object.mockConfig !== "object") + throw TypeError(".google.cloud.ces.v1beta.ExecuteToolRequest.mockConfig: object expected"); + message.mockConfig = $root.google.cloud.ces.v1beta.MockConfig.fromObject(object.mockConfig); + } return message; }; @@ -169653,6 +172493,7 @@ if (options.defaults) { object.args = null; object.parent = ""; + object.mockConfig = null; } if (message.tool != null && message.hasOwnProperty("tool")) { object.tool = message.tool; @@ -169678,6 +172519,8 @@ if (options.oneofs) object.toolExecutionContext = "context"; } + if (message.mockConfig != null && message.hasOwnProperty("mockConfig")) + object.mockConfig = $root.google.cloud.ces.v1beta.MockConfig.toObject(message.mockConfig, options); return object; }; diff --git a/packages/google-cloud-ces/protos/protos.json b/packages/google-cloud-ces/protos/protos.json index 82b2cbc8cbed..afae0b2215d2 100644 --- a/packages/google-cloud-ces/protos/protos.json +++ b/packages/google-cloud-ces/protos/protos.json @@ -12431,9 +12431,61 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "fallbackResponseConfig": { + "type": "FallbackResponseConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "endSessionConfig": { + "type": "EndSessionConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { + "FallbackResponseConfig": { + "fields": { + "customFallbackMessages": { + "keyType": "string", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxFallbackAttempts": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EndSessionConfig": { + "oneofs": { + "_escalateSession": { + "oneof": [ + "escalateSession" + ] + } + }, + "fields": { + "escalateSession": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, "ErrorHandlingStrategy": { "values": { "ERROR_HANDLING_STRATEGY_UNSPECIFIED": 0, @@ -12675,6 +12727,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "retentionWindow": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -17460,7 +17519,8 @@ "values": { "OUTCOME_UNSPECIFIED": 0, "PASS": 1, - "FAIL": 2 + "FAIL": 2, + "SKIPPED": 3 } }, "ExecutionState": { @@ -18472,6 +18532,34 @@ "ALAW": 3 } }, + "MockConfig": { + "fields": { + "mockedToolCalls": { + "rule": "repeated", + "type": "MockedToolCall", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "unmatchedToolCallBehavior": { + "type": "UnmatchedToolCallBehavior", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "UnmatchedToolCallBehavior": { + "values": { + "UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED": 0, + "FAIL": 1, + "PASS_THROUGH": 2 + } + } + } + }, "InputAudioConfig": { "fields": { "audioEncoding": { @@ -18975,6 +19063,56 @@ } } }, + "MockedToolCall": { + "oneofs": { + "toolIdentifier": { + "oneof": [ + "toolId", + "toolset" + ] + } + }, + "fields": { + "toolId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "ces.googleapis.com/Tool" + } + }, + "toolset": { + "type": "ToolsetTool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tool": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "ces.googleapis.com/Tool" + } + }, + "expectedArgsPattern": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "mockResponse": { + "type": "google.protobuf.Struct", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "GoogleSearchSuggestions": { "fields": { "htmls": { @@ -19752,6 +19890,34 @@ "(google.api.method_signature)": "app" } ] + }, + "ExportEvaluations": { + "requestType": "ExportEvaluationsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations:export", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "ExportEvaluationsResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations:export", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ExportEvaluationsResponse", + "metadata_type": "OperationMetadata" + } + } + ] } } }, @@ -19949,6 +20115,16 @@ "type": "Evaluation", "id": 1 }, + "evaluationResults": { + "rule": "repeated", + "type": "EvaluationResult", + "id": 4 + }, + "evaluationRuns": { + "rule": "repeated", + "type": "EvaluationRun", + "id": 5 + }, "errorMessages": { "rule": "repeated", "type": "string", @@ -19960,6 +20136,14 @@ "importFailureCount": { "type": "int32", "id": 3 + }, + "evaluationResultImportFailureCount": { + "type": "int32", + "id": 6 + }, + "evaluationRunImportFailureCount": { + "type": "int32", + "id": 7 } } }, @@ -20733,6 +20917,143 @@ } } }, + "ExportOptions": { + "fields": { + "exportFormat": { + "type": "ExportFormat", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "gcsUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ExportFormat": { + "values": { + "EXPORT_FORMAT_UNSPECIFIED": 0, + "JSON": 1, + "YAML": 2 + } + } + } + }, + "ExportEvaluationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "ces.googleapis.com/App" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "ces.googleapis.com/Evaluation" + } + }, + "exportOptions": { + "type": "ExportOptions", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includeEvaluationResults": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includeEvaluations": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExportEvaluationsResponse": { + "oneofs": { + "evaluations": { + "oneof": [ + "evaluationsContent", + "evaluationsUri" + ] + } + }, + "fields": { + "evaluationsContent": { + "type": "bytes", + "id": 1 + }, + "evaluationsUri": { + "type": "string", + "id": 2 + }, + "failedEvaluations": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ExportEvaluationResultsResponse": { + "oneofs": { + "evaluationResults": { + "oneof": [ + "evaluationResultsContent", + "evaluationResultsUri" + ] + } + }, + "fields": { + "evaluationResultsContent": { + "type": "bytes", + "id": 1 + }, + "evaluationResultsUri": { + "type": "string", + "id": 2 + } + } + }, + "ExportEvaluationRunsResponse": { + "oneofs": { + "evaluationRuns": { + "oneof": [ + "evaluationRunsContent", + "evaluationRunsUri" + ] + } + }, + "fields": { + "evaluationRunsContent": { + "type": "bytes", + "id": 1 + }, + "evaluationRunsUri": { + "type": "string", + "id": 2 + } + } + }, "Omnichannel": { "options": { "(google.api.resource).type": "ces.googleapis.com/Omnichannel", @@ -21046,6 +21367,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "mockConfig": { + "type": "MockConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, diff --git a/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.export_evaluations.js b/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.export_evaluations.js new file mode 100644 index 000000000000..514da06812cf --- /dev/null +++ b/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.export_evaluations.js @@ -0,0 +1,82 @@ +// Copyright 2026 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(parent, names) { + // [START ces_v1beta_generated_EvaluationService_ExportEvaluations_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. + */ + /** + * Required. The resource name of the app to export evaluations from. + * Format: `projects/{project}/locations/{location}/apps/{app}` + */ + // const parent = 'abc123' + /** + * Required. The resource names of the evaluations to export. + */ + // const names = ['abc','def'] + /** + * Optional. The export options for the evaluations. + */ + // const exportOptions = {} + /** + * Optional. Includes evaluation results in the export. At least one of + * include_evaluation_results or include_evaluations must be set. + */ + // const includeEvaluationResults = true + /** + * Optional. Includes evaluations in the export. At least one of + * include_evaluation_results or include_evaluations must be set. + */ + // const includeEvaluations = true + + // Imports the Ces library + const {EvaluationServiceClient} = require('@google-cloud/ces').v1beta; + + // Instantiates a client + const cesClient = new EvaluationServiceClient(); + + async function callExportEvaluations() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const [operation] = await cesClient.exportEvaluations(request); + const [response] = await operation.promise(); + console.log(response); + } + + callExportEvaluations(); + // [END ces_v1beta_generated_EvaluationService_ExportEvaluations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-ces/samples/generated/v1beta/snippet_metadata_google.cloud.ces.v1beta.json b/packages/google-cloud-ces/samples/generated/v1beta/snippet_metadata_google.cloud.ces.v1beta.json index 23a56a9ba9ac..989a4ab9228b 100644 --- a/packages/google-cloud-ces/samples/generated/v1beta/snippet_metadata_google.cloud.ces.v1beta.json +++ b/packages/google-cloud-ces/samples/generated/v1beta/snippet_metadata_google.cloud.ces.v1beta.json @@ -3939,6 +3939,62 @@ } } }, + { + "regionTag": "ces_v1beta_generated_EvaluationService_ExportEvaluations_async", + "title": "AgentService exportEvaluations Sample", + "origin": "API_DEFINITION", + "description": " Exports evaluations.", + "canonical": true, + "file": "evaluation_service.export_evaluations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExportEvaluations", + "fullName": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + }, + { + "name": "export_options", + "type": ".google.cloud.ces.v1beta.ExportOptions" + }, + { + "name": "include_evaluation_results", + "type": "TYPE_BOOL" + }, + { + "name": "include_evaluations", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EvaluationServiceClient", + "fullName": "google.cloud.ces.v1beta.EvaluationServiceClient" + }, + "method": { + "shortName": "ExportEvaluations", + "fullName": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluations", + "service": { + "shortName": "EvaluationService", + "fullName": "google.cloud.ces.v1beta.EvaluationService" + } + } + } + }, { "regionTag": "ces_v1beta_generated_SessionService_RunSession_async", "title": "AgentService runSession Sample", @@ -4082,7 +4138,7 @@ "segments": [ { "start": 25, - "end": 80, + "end": 86, "type": "FULL" } ], @@ -4114,6 +4170,10 @@ { "name": "args", "type": ".google.protobuf.Struct" + }, + { + "name": "mock_config", + "type": ".google.cloud.ces.v1beta.MockConfig" } ], "resultType": ".google.cloud.ces.v1beta.ExecuteToolResponse", diff --git a/packages/google-cloud-ces/samples/generated/v1beta/tool_service.execute_tool.js b/packages/google-cloud-ces/samples/generated/v1beta/tool_service.execute_tool.js index 5fd25460cb09..64f915c9988a 100644 --- a/packages/google-cloud-ces/samples/generated/v1beta/tool_service.execute_tool.js +++ b/packages/google-cloud-ces/samples/generated/v1beta/tool_service.execute_tool.js @@ -59,6 +59,12 @@ function main(parent) { * format. */ // const args = {} + /** + * Optional. Mock configuration for the tool execution. + * If this field is set, tools that call other tools will be + * mocked based on the provided patterns and responses. + */ + // const mockConfig = {} // Imports the Ces library const {ToolServiceClient} = require('@google-cloud/ces').v1beta; diff --git a/packages/google-cloud-ces/src/v1beta/agent_service_proto_list.json b/packages/google-cloud-ces/src/v1beta/agent_service_proto_list.json index 9c794c57e7c2..65b842c5f3aa 100644 --- a/packages/google-cloud-ces/src/v1beta/agent_service_proto_list.json +++ b/packages/google-cloud-ces/src/v1beta/agent_service_proto_list.json @@ -27,6 +27,7 @@ "../../protos/google/cloud/ces/v1beta/guardrail.proto", "../../protos/google/cloud/ces/v1beta/mcp_tool.proto", "../../protos/google/cloud/ces/v1beta/mcp_toolset.proto", + "../../protos/google/cloud/ces/v1beta/mocks.proto", "../../protos/google/cloud/ces/v1beta/omnichannel.proto", "../../protos/google/cloud/ces/v1beta/omnichannel_service.proto", "../../protos/google/cloud/ces/v1beta/open_api_tool.proto", diff --git a/packages/google-cloud-ces/src/v1beta/evaluation_service_client.ts b/packages/google-cloud-ces/src/v1beta/evaluation_service_client.ts index 2c026776221b..af79cfaf786b 100644 --- a/packages/google-cloud-ces/src/v1beta/evaluation_service_client.ts +++ b/packages/google-cloud-ces/src/v1beta/evaluation_service_client.ts @@ -293,6 +293,10 @@ export class EvaluationServiceClient { '.google.protobuf.Empty') as gax.protobuf.Type; const deleteEvaluationRunMetadata = protoFilesRoot.lookup( '.google.cloud.ces.v1beta.DeleteEvaluationRunOperationMetadata') as gax.protobuf.Type; + const exportEvaluationsResponse = protoFilesRoot.lookup( + '.google.cloud.ces.v1beta.ExportEvaluationsResponse') as gax.protobuf.Type; + const exportEvaluationsMetadata = protoFilesRoot.lookup( + '.google.cloud.ces.v1beta.OperationMetadata') as gax.protobuf.Type; this.descriptors.longrunning = { runEvaluation: new this._gaxModule.LongrunningDescriptor( @@ -310,7 +314,11 @@ export class EvaluationServiceClient { deleteEvaluationRun: new this._gaxModule.LongrunningDescriptor( this.operationsClient, deleteEvaluationRunResponse.decode.bind(deleteEvaluationRunResponse), - deleteEvaluationRunMetadata.decode.bind(deleteEvaluationRunMetadata)) + deleteEvaluationRunMetadata.decode.bind(deleteEvaluationRunMetadata)), + exportEvaluations: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + exportEvaluationsResponse.decode.bind(exportEvaluationsResponse), + exportEvaluationsMetadata.decode.bind(exportEvaluationsMetadata)) }; // Put together the default options sent with requests. @@ -356,7 +364,7 @@ export class EvaluationServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const evaluationServiceStubMethods = - ['runEvaluation', 'uploadEvaluationAudio', 'createEvaluation', 'generateEvaluation', 'importEvaluations', 'createEvaluationDataset', 'updateEvaluation', 'updateEvaluationDataset', 'deleteEvaluation', 'deleteEvaluationResult', 'deleteEvaluationDataset', 'deleteEvaluationRun', 'getEvaluation', 'getEvaluationResult', 'getEvaluationDataset', 'getEvaluationRun', 'listEvaluations', 'listEvaluationResults', 'listEvaluationDatasets', 'listEvaluationRuns', 'listEvaluationExpectations', 'getEvaluationExpectation', 'createEvaluationExpectation', 'updateEvaluationExpectation', 'deleteEvaluationExpectation', 'createScheduledEvaluationRun', 'getScheduledEvaluationRun', 'listScheduledEvaluationRuns', 'updateScheduledEvaluationRun', 'deleteScheduledEvaluationRun', 'testPersonaVoice']; + ['runEvaluation', 'uploadEvaluationAudio', 'createEvaluation', 'generateEvaluation', 'importEvaluations', 'createEvaluationDataset', 'updateEvaluation', 'updateEvaluationDataset', 'deleteEvaluation', 'deleteEvaluationResult', 'deleteEvaluationDataset', 'deleteEvaluationRun', 'getEvaluation', 'getEvaluationResult', 'getEvaluationDataset', 'getEvaluationRun', 'listEvaluations', 'listEvaluationResults', 'listEvaluationDatasets', 'listEvaluationRuns', 'listEvaluationExpectations', 'getEvaluationExpectation', 'createEvaluationExpectation', 'updateEvaluationExpectation', 'deleteEvaluationExpectation', 'createScheduledEvaluationRun', 'getScheduledEvaluationRun', 'listScheduledEvaluationRuns', 'updateScheduledEvaluationRun', 'deleteScheduledEvaluationRun', 'testPersonaVoice', 'exportEvaluations']; for (const methodName of evaluationServiceStubMethods) { const callPromise = this.evaluationServiceStub.then( stub => (...args: Array<{}>) => { @@ -3009,6 +3017,124 @@ export class EvaluationServiceClient { const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteEvaluationRun, this._gaxModule.createDefaultBackoffSettings()); return decodeOperation as LROperation; } +/** + * Exports evaluations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the app to export evaluations from. + * Format: `projects/{project}/locations/{location}/apps/{app}` + * @param {string[]} request.names + * Required. The resource names of the evaluations to export. + * @param {google.cloud.ces.v1beta.ExportOptions} [request.exportOptions] + * Optional. The export options for the evaluations. + * @param {boolean} [request.includeEvaluationResults] + * Optional. Includes evaluation results in the export. At least one of + * include_evaluation_results or include_evaluations must be set. + * @param {boolean} [request.includeEvaluations] + * Optional. Includes evaluations in the export. At least one of + * include_evaluation_results or include_evaluations must be set. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/evaluation_service.export_evaluations.js + * region_tag:ces_v1beta_generated_EvaluationService_ExportEvaluations_async + */ + exportEvaluations( + request?: protos.google.cloud.ces.v1beta.IExportEvaluationsRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + exportEvaluations( + request: protos.google.cloud.ces.v1beta.IExportEvaluationsRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + exportEvaluations( + request: protos.google.cloud.ces.v1beta.IExportEvaluationsRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + exportEvaluations( + request?: protos.google.cloud.ces.v1beta.IExportEvaluationsRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('exportEvaluations response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('exportEvaluations request %j', request); + return this.innerApiCalls.exportEvaluations(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('exportEvaluations response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `exportEvaluations()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/evaluation_service.export_evaluations.js + * region_tag:ces_v1beta_generated_EvaluationService_ExportEvaluations_async + */ + async checkExportEvaluationsProgress(name: string): Promise>{ + this._log.info('exportEvaluations long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.exportEvaluations, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } /** * Lists all evaluations in the given app. * diff --git a/packages/google-cloud-ces/src/v1beta/evaluation_service_client_config.json b/packages/google-cloud-ces/src/v1beta/evaluation_service_client_config.json index c2aea510be77..d37335a54aba 100644 --- a/packages/google-cloud-ces/src/v1beta/evaluation_service_client_config.json +++ b/packages/google-cloud-ces/src/v1beta/evaluation_service_client_config.json @@ -174,6 +174,11 @@ "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" + }, + "ExportEvaluations": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-ces/src/v1beta/evaluation_service_proto_list.json b/packages/google-cloud-ces/src/v1beta/evaluation_service_proto_list.json index 9c794c57e7c2..65b842c5f3aa 100644 --- a/packages/google-cloud-ces/src/v1beta/evaluation_service_proto_list.json +++ b/packages/google-cloud-ces/src/v1beta/evaluation_service_proto_list.json @@ -27,6 +27,7 @@ "../../protos/google/cloud/ces/v1beta/guardrail.proto", "../../protos/google/cloud/ces/v1beta/mcp_tool.proto", "../../protos/google/cloud/ces/v1beta/mcp_toolset.proto", + "../../protos/google/cloud/ces/v1beta/mocks.proto", "../../protos/google/cloud/ces/v1beta/omnichannel.proto", "../../protos/google/cloud/ces/v1beta/omnichannel_service.proto", "../../protos/google/cloud/ces/v1beta/open_api_tool.proto", diff --git a/packages/google-cloud-ces/src/v1beta/gapic_metadata.json b/packages/google-cloud-ces/src/v1beta/gapic_metadata.json index c1953600bc78..cded1f7dd647 100644 --- a/packages/google-cloud-ces/src/v1beta/gapic_metadata.json +++ b/packages/google-cloud-ces/src/v1beta/gapic_metadata.json @@ -699,6 +699,11 @@ "deleteEvaluationRun" ] }, + "ExportEvaluations": { + "methods": [ + "exportEvaluations" + ] + }, "ListEvaluations": { "methods": [ "listEvaluations", @@ -871,6 +876,11 @@ "deleteEvaluationRun" ] }, + "ExportEvaluations": { + "methods": [ + "exportEvaluations" + ] + }, "ListEvaluations": { "methods": [ "listEvaluations", diff --git a/packages/google-cloud-ces/src/v1beta/session_service_proto_list.json b/packages/google-cloud-ces/src/v1beta/session_service_proto_list.json index 9c794c57e7c2..65b842c5f3aa 100644 --- a/packages/google-cloud-ces/src/v1beta/session_service_proto_list.json +++ b/packages/google-cloud-ces/src/v1beta/session_service_proto_list.json @@ -27,6 +27,7 @@ "../../protos/google/cloud/ces/v1beta/guardrail.proto", "../../protos/google/cloud/ces/v1beta/mcp_tool.proto", "../../protos/google/cloud/ces/v1beta/mcp_toolset.proto", + "../../protos/google/cloud/ces/v1beta/mocks.proto", "../../protos/google/cloud/ces/v1beta/omnichannel.proto", "../../protos/google/cloud/ces/v1beta/omnichannel_service.proto", "../../protos/google/cloud/ces/v1beta/open_api_tool.proto", diff --git a/packages/google-cloud-ces/src/v1beta/tool_service_client.ts b/packages/google-cloud-ces/src/v1beta/tool_service_client.ts index 9c0ed5e0968b..22b936336554 100644 --- a/packages/google-cloud-ces/src/v1beta/tool_service_client.ts +++ b/packages/google-cloud-ces/src/v1beta/tool_service_client.ts @@ -409,6 +409,10 @@ export class ToolServiceClient { * @param {google.protobuf.Struct} [request.args] * Optional. The input parameters and values for the tool in JSON object * format. + * @param {google.cloud.ces.v1beta.MockConfig} [request.mockConfig] + * Optional. Mock configuration for the tool execution. + * If this field is set, tools that call other tools will be + * mocked based on the provided patterns and responses. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/packages/google-cloud-ces/src/v1beta/tool_service_proto_list.json b/packages/google-cloud-ces/src/v1beta/tool_service_proto_list.json index 9c794c57e7c2..65b842c5f3aa 100644 --- a/packages/google-cloud-ces/src/v1beta/tool_service_proto_list.json +++ b/packages/google-cloud-ces/src/v1beta/tool_service_proto_list.json @@ -27,6 +27,7 @@ "../../protos/google/cloud/ces/v1beta/guardrail.proto", "../../protos/google/cloud/ces/v1beta/mcp_tool.proto", "../../protos/google/cloud/ces/v1beta/mcp_toolset.proto", + "../../protos/google/cloud/ces/v1beta/mocks.proto", "../../protos/google/cloud/ces/v1beta/omnichannel.proto", "../../protos/google/cloud/ces/v1beta/omnichannel_service.proto", "../../protos/google/cloud/ces/v1beta/open_api_tool.proto", diff --git a/packages/google-cloud-ces/src/v1beta/widget_service_proto_list.json b/packages/google-cloud-ces/src/v1beta/widget_service_proto_list.json index 9c794c57e7c2..65b842c5f3aa 100644 --- a/packages/google-cloud-ces/src/v1beta/widget_service_proto_list.json +++ b/packages/google-cloud-ces/src/v1beta/widget_service_proto_list.json @@ -27,6 +27,7 @@ "../../protos/google/cloud/ces/v1beta/guardrail.proto", "../../protos/google/cloud/ces/v1beta/mcp_tool.proto", "../../protos/google/cloud/ces/v1beta/mcp_toolset.proto", + "../../protos/google/cloud/ces/v1beta/mocks.proto", "../../protos/google/cloud/ces/v1beta/omnichannel.proto", "../../protos/google/cloud/ces/v1beta/omnichannel_service.proto", "../../protos/google/cloud/ces/v1beta/open_api_tool.proto", diff --git a/packages/google-cloud-ces/test/gapic_evaluation_service_v1beta.ts b/packages/google-cloud-ces/test/gapic_evaluation_service_v1beta.ts index abd9ec7b6c28..720c8efca7e2 100644 --- a/packages/google-cloud-ces/test/gapic_evaluation_service_v1beta.ts +++ b/packages/google-cloud-ces/test/gapic_evaluation_service_v1beta.ts @@ -3175,6 +3175,160 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); + describe('exportEvaluations', () => { + it('invokes exportEvaluations without error', async () => { + const client = new evaluationserviceModule.v1beta.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1beta.ExportEvaluationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1beta.ExportEvaluationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportEvaluations = stubLongRunningCall(expectedResponse); + const [operation] = await client.exportEvaluations(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportEvaluations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportEvaluations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportEvaluations without error using callback', async () => { + const client = new evaluationserviceModule.v1beta.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1beta.ExportEvaluationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1beta.ExportEvaluationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportEvaluations = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportEvaluations( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportEvaluations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportEvaluations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportEvaluations with call error', async () => { + const client = new evaluationserviceModule.v1beta.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1beta.ExportEvaluationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1beta.ExportEvaluationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportEvaluations = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.exportEvaluations(request), expectedError); + const actualRequest = (client.innerApiCalls.exportEvaluations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportEvaluations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportEvaluations with LRO error', async () => { + const client = new evaluationserviceModule.v1beta.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1beta.ExportEvaluationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1beta.ExportEvaluationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportEvaluations = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.exportEvaluations(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.exportEvaluations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportEvaluations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkExportEvaluationsProgress without error', async () => { + const client = new evaluationserviceModule.v1beta.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkExportEvaluationsProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkExportEvaluationsProgress with error', async () => { + const client = new evaluationserviceModule.v1beta.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkExportEvaluationsProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + describe('listEvaluations', () => { it('invokes listEvaluations without error', async () => { const client = new evaluationserviceModule.v1beta.EvaluationServiceClient({ diff --git a/packages/google-cloud-channel/package.json b/packages/google-cloud-channel/package.json index da1a4e4066c5..5a6f0b8554fa 100644 --- a/packages/google-cloud-channel/package.json +++ b/packages/google-cloud-channel/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-chronicle/.eslintrc.json b/packages/google-cloud-chronicle/.eslintrc.json index 782153495464..3e8d97ccb390 100644 --- a/packages/google-cloud-chronicle/.eslintrc.json +++ b/packages/google-cloud-chronicle/.eslintrc.json @@ -1,3 +1,4 @@ { - "extends": "./node_modules/gts" + "extends": "./node_modules/gts", + "root": true } diff --git a/packages/google-cloud-chronicle/.gitattributes b/packages/google-cloud-chronicle/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-cloud-chronicle/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-chronicle/CODE_OF_CONDUCT.md b/packages/google-cloud-chronicle/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-cloud-chronicle/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-chronicle/CONTRIBUTING.md b/packages/google-cloud-chronicle/CONTRIBUTING.md new file mode 100644 index 000000000000..3f2fe7afc3c4 --- /dev/null +++ b/packages/google-cloud-chronicle/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Chronicle API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=chronicle.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-chronicle/LICENSE b/packages/google-cloud-chronicle/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-cloud-chronicle/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://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. diff --git a/packages/google-cloud-chronicle/README.md b/packages/google-cloud-chronicle/README.md index f9a84ced902f..75305790dca4 100644 --- a/packages/google-cloud-chronicle/README.md +++ b/packages/google-cloud-chronicle/README.md @@ -67,6 +67,21 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | list data access scopes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_access_control_service.list_data_access_scopes.js) | | update data access label | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_access_control_service.update_data_access_label.js) | | update data access scope | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_access_control_service.update_data_access_scope.js) | +| bulk create data table rows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_create_data_table_rows.js) | +| bulk get data table rows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_get_data_table_rows.js) | +| bulk replace data table rows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_replace_data_table_rows.js) | +| bulk update data table rows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_update_data_table_rows.js) | +| create data table | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.create_data_table.js) | +| create data table row | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.create_data_table_row.js) | +| delete data table | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.delete_data_table.js) | +| delete data table row | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.delete_data_table_row.js) | +| get data table | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table.js) | +| get data table operation errors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table_operation_errors.js) | +| get data table row | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table_row.js) | +| list data table rows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.list_data_table_rows.js) | +| list data tables | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.list_data_tables.js) | +| update data table | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.update_data_table.js) | +| update data table row | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.update_data_table_row.js) | | create watchlist | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/entity_service.create_watchlist.js) | | delete watchlist | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/entity_service.delete_watchlist.js) | | get watchlist | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-chronicle/samples/generated/v1/entity_service.get_watchlist.js) | diff --git a/packages/google-cloud-chronicle/package.json b/packages/google-cloud-chronicle/package.json index 27822363cdca..925367099268 100644 --- a/packages/google-cloud-chronicle/package.json +++ b/packages/google-cloud-chronicle/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-chronicle", "keywords": [ diff --git a/packages/google-cloud-chronicle/protos/google/cloud/chronicle/v1/data_table.proto b/packages/google-cloud-chronicle/protos/google/cloud/chronicle/v1/data_table.proto new file mode 100644 index 000000000000..d5e6b12a673b --- /dev/null +++ b/packages/google-cloud-chronicle/protos/google/cloud/chronicle/v1/data_table.proto @@ -0,0 +1,688 @@ +// Copyright 2026 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.chronicle.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Chronicle.V1"; +option go_package = "cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb"; +option java_multiple_files = true; +option java_outer_classname = "DataTableProto"; +option java_package = "com.google.cloud.chronicle.v1"; +option php_namespace = "Google\\Cloud\\Chronicle\\V1"; +option ruby_package = "Google::Cloud::Chronicle::V1"; + +// DataTableManager provides an interface for managing data tables. +service DataTableService { + option (google.api.default_host) = "chronicle.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/chronicle," + "https://www.googleapis.com/auth/chronicle.readonly," + "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new data table. + rpc CreateDataTable(CreateDataTableRequest) returns (DataTable) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/instances/*}/dataTables" + body: "data_table" + }; + option (google.api.method_signature) = "parent,data_table,data_table_id"; + } + + // List data tables. + rpc ListDataTables(ListDataTablesRequest) returns (ListDataTablesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/instances/*}/dataTables" + }; + option (google.api.method_signature) = "parent"; + } + + // Get data table info. + rpc GetDataTable(GetDataTableRequest) returns (DataTable) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*/dataTables/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Update data table. + rpc UpdateDataTable(UpdateDataTableRequest) returns (DataTable) { + option (google.api.http) = { + patch: "/v1/{data_table.name=projects/*/locations/*/instances/*/dataTables/*}" + body: "data_table" + }; + option (google.api.method_signature) = "data_table,update_mask"; + } + + // Delete data table. + rpc DeleteDataTable(DeleteDataTableRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/instances/*/dataTables/*}" + }; + option (google.api.method_signature) = "name,force"; + } + + // Create a new data table row. + rpc CreateDataTableRow(CreateDataTableRowRequest) returns (DataTableRow) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows" + body: "data_table_row" + }; + option (google.api.method_signature) = "parent,data_table_row"; + } + + // Update data table row + rpc UpdateDataTableRow(UpdateDataTableRowRequest) returns (DataTableRow) { + option (google.api.http) = { + patch: "/v1/{data_table_row.name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}" + body: "data_table_row" + }; + option (google.api.method_signature) = "data_table_row,update_mask"; + } + + // List data table rows. + rpc ListDataTableRows(ListDataTableRowsRequest) + returns (ListDataTableRowsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows" + }; + option (google.api.method_signature) = "parent"; + } + + // Get data table row + rpc GetDataTableRow(GetDataTableRowRequest) returns (DataTableRow) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Delete data table row. + rpc DeleteDataTableRow(DeleteDataTableRowRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create data table rows in bulk. + rpc BulkCreateDataTableRows(BulkCreateDataTableRowsRequest) + returns (BulkCreateDataTableRowsResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // Get data table rows in bulk. + rpc BulkGetDataTableRows(BulkGetDataTableRowsRequest) + returns (BulkGetDataTableRowsResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkGet" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // Replace all existing data table rows with new data table rows. + rpc BulkReplaceDataTableRows(BulkReplaceDataTableRowsRequest) + returns (BulkReplaceDataTableRowsResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkReplace" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // Update data table rows in bulk. + rpc BulkUpdateDataTableRows(BulkUpdateDataTableRowsRequest) + returns (BulkUpdateDataTableRowsResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // Get the error for a data table operation. + rpc GetDataTableOperationErrors(GetDataTableOperationErrorsRequest) + returns (DataTableOperationErrors) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*/dataTableOperationErrors/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// DataTableUpdateSource denotes the source that updated the data table. +enum DataTableUpdateSource { + // The data table is updated by the user. + DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED = 0; + + // The data table is updated by the user. + USER = 1; + + // The data table is updated by the rule. + RULE = 2; + + // The data table is updated by the search. + SEARCH = 3; +} + +// A request to create DataTable. +message CreateDataTableRequest { + // Required. The parent resource where this data table will be created. + // Format: projects/{project}/locations/{location}/instances/{instance} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/DataTable" + } + ]; + + // Required. The data table being created. + DataTable data_table = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the data table. This is also the display name + // for the data table. It must satisfy the following requirements: + // - Starts with letter. + // - Contains only letters, numbers and underscore. + // - Must be unique and has length < 256. + string data_table_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request to get details about a data table. +message GetDataTableRequest { + // Required. The resource name of the data table to retrieve. + // Format: + // projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/DataTable" + } + ]; +} + +// A request to update details of data table. +message UpdateDataTableRequest { + // Required. This field is used to identify the datatable to update. + // Format: + // projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + DataTable data_table = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of metadata fields to update. Currently data tables only + // support updating the `description`, `row_time_to_live` and `scope_info` + // fields. When no field mask is supplied, all non-empty fields will be + // updated. A field mask of "*" will update all fields, whether empty or not. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A request for a list of data tables. +message ListDataTablesRequest { + // Required. The parent resource where this data table will be created. + // Format: projects/{project}/locations/{location}/instances/{instance} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/DataTable" + } + ]; + + // Optional. The maximum number of data tables to return. The service may + // return fewer than this value. If unspecified, at most 100 data tables will + // be returned. The maximum value is 1000; values above 1000 will be coerced + // to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDataTables` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to + // `ListDataTables` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configures ordering of DataTables in the response. + // Note: Our implementation currently supports order by "create_time asc" only + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for deleting data tables. +message DeleteDataTableRequest { + // Required. The resource name of the data table to delete. + // Format + // projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/DataTable" + } + ]; + + // Optional. If set to true, any rows under this data table will also be + // deleted. (Otherwise, the request will only work if the data table has no + // rows.) + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing data tables. +message ListDataTablesResponse { + // The list of the data tables returned. + repeated DataTable data_tables = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request to create data table row. +message CreateDataTableRowRequest { + // Required. The resource id of the data table. + // Format: + // /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/DataTableRow" + } + ]; + + // Required. The data table row to create. + DataTableRow data_table_row = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update data table row. +message UpdateDataTableRowRequest { + // Required. Format: + // projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + DataTableRow data_table_row = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. Currently data table rows only + // support updating the `values` field. When no field mask is supplied, all + // non-empty fields will be updated. A field mask of "*" will update all + // fields, whether empty or not. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to list data table rows. +message ListDataTableRowsRequest { + // Required. The resource id of the data table. + // Format: + // projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/DataTableRow" + } + ]; + + // Optional. The maximum number of data table rows to return. The service may + // return fewer than this value. If unspecified, at most 100 data table rows + // will be returned. The maximum value is 1000; values above 1000 will be + // coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDataTableRows` call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configures ordering of DataTables in the response. + // Note: Our implementation currently supports order by "create_time asc" only + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter facilitating search over data table rows. This filter + // performs a case-insensitive substring match on the row values. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing data table rows. +message ListDataTableRowsResponse { + // The list of the data table rows returned. + repeated DataTableRow data_table_rows = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to get data table row. +message GetDataTableRowRequest { + // Required. The resource name of the data table row i,e row_id. + // Format: + // projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/DataTableRow" + } + ]; +} + +// Request to delete data table row. +message DeleteDataTableRowRequest { + // Required. The resource name of the data table row i,e row_id. + // Format: + // projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/DataTableRow" + } + ]; +} + +// Request to create data table rows in bulk. +message BulkCreateDataTableRowsRequest { + // Required. The resource id of the data table. + // Format: + // /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/DataTableRow" + } + ]; + + // Required. Data table rows to create. A maximum of 1000 rows (for sync + // requests) or 2000 rows (for async requests) can be created in a single + // request. Total size of the rows should be less than 4MB. + repeated CreateDataTableRowRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message with created data table rows. +message BulkCreateDataTableRowsResponse { + // DataTableRows created + repeated DataTableRow data_table_rows = 1; +} + +// Request to get data table rows in bulk. +message BulkGetDataTableRowsRequest { + // Required. The resource id of the data table. + // Format: + // /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/DataTableRow" + } + ]; + + // Required. Data table rows to get. At max 1,000 rows can be there in a + // request. + repeated GetDataTableRowRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message with data table rows. +message BulkGetDataTableRowsResponse { + // The requested data table rows. + repeated DataTableRow data_table_rows = 1; +} + +// Request to replace data table rows in bulk. +message BulkReplaceDataTableRowsRequest { + // Required. The resource id of the data table. + // Format: + // /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/DataTableRow" + } + ]; + + // Required. Data table rows to replace the existing data table rows. A + // maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + // can be replaced in a single request. Total size of the rows should be less + // than 4MB. + repeated CreateDataTableRowRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message with data table rows that replaced existing data table rows. +message BulkReplaceDataTableRowsResponse { + // DataTableRows that replaced existing data table rows + repeated DataTableRow data_table_rows = 1; +} + +// Request to update data table rows in bulk. +message BulkUpdateDataTableRowsRequest { + // Required. The resource id of the data table. + // Format: + // /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/DataTableRow" + } + ]; + + // Required. Data table rows to update. At max 1,000 rows (or rows with size + // less than 2MB) can be there in a request. + repeated UpdateDataTableRowRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message with updated data table rows. +message BulkUpdateDataTableRowsResponse { + // DataTableRows updated + repeated DataTableRow data_table_rows = 1; +} + +// DataTableScopeInfo specifies the scope info of the data table. +message DataTableScopeInfo { + // Required. Contains the list of scope names of the data table. If the list + // is empty, the data table is treated as unscoped. The scope names should be + // full resource names and should be of the format: + // "projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}" + repeated string data_access_scopes = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/DataAccessScope" + } + ]; +} + +// DataTable represents the data table resource. +message DataTable { + option (google.api.resource) = { + type: "chronicle.googleapis.com/DataTable" + pattern: "projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}" + plural: "dataTables" + singular: "dataTable" + }; + + // Identifier. The resource name of the data table + // Format: + // "{project}/locations/{location}/instances/{instance}/dataTables/{data_table}" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The unique display name of the data table. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. A user-provided description of the data table. + string description = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Table create time + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Table update time + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Details of all the columns in the table + repeated DataTableColumnInfo column_info = 6 + [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Data table unique id + string data_table_uuid = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource names for the associated Rules that use this + // data table. Format: + // projects/{project}/locations/{location}/instances/{instance}/rules/{rule}. + // {rule} here refers to the rule id. + repeated string rules = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The count of rules using the data table. + int32 rule_associations_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-provided TTL of the data table. + string row_time_to_live = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The count of rows in the data table. + int64 approximate_row_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The scope info of the data table. + // During data table creation, if this field is not set, the data + // table without scopes (an unscoped table) will be created for a global + // user. For a scoped user, this field must be set. During data table + // update, if scope_info is requested to be updated, this field must be set. + DataTableScopeInfo scope_info = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Source of the data table update. + DataTableUpdateSource update_source = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update time of the TTL of the data table. + google.protobuf.Timestamp row_time_to_live_update_time = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DataTableRow represents a single row in a data table. +message DataTableRow { + option (google.api.resource) = { + type: "chronicle.googleapis.com/DataTableRow" + pattern: "projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}" + plural: "dataTableRows" + singular: "dataTableRow" + }; + + // Identifier. The resource name of the data table + // Format: + // projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. All column values for a single row. The values should be in the + // same order as the columns of the data tables. + repeated string values = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. DataTableRow create time + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. DataTableRow update time + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-provided TTL of the data table row. + string row_time_to_live = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// DataTableColumnInfo represents the column metadata of the +// datatable. The column_index represents the ordering of the +// values in DataTableRow. +message DataTableColumnInfo { + // DataTableColumnType denotes the type of the column to be referenced in the + // rule. + enum DataTableColumnType { + // The default Data Table Column Type. + DATA_TABLE_COLUMN_TYPE_UNSPECIFIED = 0; + + // Denotes the type of the column as STRING. + STRING = 1; + + // Denotes the type of the column as REGEX. + REGEX = 2; + + // Denotes the type of the column as CIDR. + CIDR = 3; + + // Denotes the type of the column as NUMBER (includes int and float). + NUMBER = 4; + } + + oneof path_or_type { + // Entity proto field path that the column is mapped to + string mapped_column_path = 3; + + // Column type can be STRING, CIDR (Ex- 10.1.1.0/24), REGEX + DataTableColumnType column_type = 4; + } + + // Required. Column Index. 0,1,2... + int32 column_index = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Original column name of the Data Table (present in the CSV header + // in case of creation of data tables using file uploads). It must satisfy the + // following requirements: + // - Starts with letter. + // - Contains only letters, numbers and underscore. + // - Must be unique and has length < 256. + string original_column = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to include this column in the calculation of the row ID. + // If no columns have key_column = true, all columns will be included in the + // calculation of the row ID. + bool key_column = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the column is a repeated values column. + bool repeated_values = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for GetDataTableOperationErrors. +message GetDataTableOperationErrorsRequest { + // Required. Resource name for the data table operation errors. + // Format: + // projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/DataTableOperationErrors" + } + ]; +} + +// The message containing the errors for a data table operation. +message DataTableOperationErrors { + option (google.api.resource) = { + type: "chronicle.googleapis.com/DataTableOperationErrors" + pattern: "projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}" + plural: "dataTableOperationErrors" + singular: "dataTableOperationErrors" + }; + + // Identifier. Resource name for the data table operation errors. + // Format: + // projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The list of errors. + // Replaces the deprecated `errors` field. + repeated google.rpc.Status rpc_errors = 3; +} diff --git a/packages/google-cloud-chronicle/protos/protos.d.ts b/packages/google-cloud-chronicle/protos/protos.d.ts index c09289b30174..92270af4daab 100644 --- a/packages/google-cloud-chronicle/protos/protos.d.ts +++ b/packages/google-cloud-chronicle/protos/protos.d.ts @@ -2034,6 +2034,3142 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Represents a DataTableService */ + class DataTableService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataTableService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new DataTableService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataTableService; + + /** + * Calls CreateDataTable. + * @param request CreateDataTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataTable + */ + public createDataTable(request: google.cloud.chronicle.v1.ICreateDataTableRequest, callback: google.cloud.chronicle.v1.DataTableService.CreateDataTableCallback): void; + + /** + * Calls CreateDataTable. + * @param request CreateDataTableRequest message or plain object + * @returns Promise + */ + public createDataTable(request: google.cloud.chronicle.v1.ICreateDataTableRequest): Promise; + + /** + * Calls ListDataTables. + * @param request ListDataTablesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataTablesResponse + */ + public listDataTables(request: google.cloud.chronicle.v1.IListDataTablesRequest, callback: google.cloud.chronicle.v1.DataTableService.ListDataTablesCallback): void; + + /** + * Calls ListDataTables. + * @param request ListDataTablesRequest message or plain object + * @returns Promise + */ + public listDataTables(request: google.cloud.chronicle.v1.IListDataTablesRequest): Promise; + + /** + * Calls GetDataTable. + * @param request GetDataTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataTable + */ + public getDataTable(request: google.cloud.chronicle.v1.IGetDataTableRequest, callback: google.cloud.chronicle.v1.DataTableService.GetDataTableCallback): void; + + /** + * Calls GetDataTable. + * @param request GetDataTableRequest message or plain object + * @returns Promise + */ + public getDataTable(request: google.cloud.chronicle.v1.IGetDataTableRequest): Promise; + + /** + * Calls UpdateDataTable. + * @param request UpdateDataTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataTable + */ + public updateDataTable(request: google.cloud.chronicle.v1.IUpdateDataTableRequest, callback: google.cloud.chronicle.v1.DataTableService.UpdateDataTableCallback): void; + + /** + * Calls UpdateDataTable. + * @param request UpdateDataTableRequest message or plain object + * @returns Promise + */ + public updateDataTable(request: google.cloud.chronicle.v1.IUpdateDataTableRequest): Promise; + + /** + * Calls DeleteDataTable. + * @param request DeleteDataTableRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDataTable(request: google.cloud.chronicle.v1.IDeleteDataTableRequest, callback: google.cloud.chronicle.v1.DataTableService.DeleteDataTableCallback): void; + + /** + * Calls DeleteDataTable. + * @param request DeleteDataTableRequest message or plain object + * @returns Promise + */ + public deleteDataTable(request: google.cloud.chronicle.v1.IDeleteDataTableRequest): Promise; + + /** + * Calls CreateDataTableRow. + * @param request CreateDataTableRowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataTableRow + */ + public createDataTableRow(request: google.cloud.chronicle.v1.ICreateDataTableRowRequest, callback: google.cloud.chronicle.v1.DataTableService.CreateDataTableRowCallback): void; + + /** + * Calls CreateDataTableRow. + * @param request CreateDataTableRowRequest message or plain object + * @returns Promise + */ + public createDataTableRow(request: google.cloud.chronicle.v1.ICreateDataTableRowRequest): Promise; + + /** + * Calls UpdateDataTableRow. + * @param request UpdateDataTableRowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataTableRow + */ + public updateDataTableRow(request: google.cloud.chronicle.v1.IUpdateDataTableRowRequest, callback: google.cloud.chronicle.v1.DataTableService.UpdateDataTableRowCallback): void; + + /** + * Calls UpdateDataTableRow. + * @param request UpdateDataTableRowRequest message or plain object + * @returns Promise + */ + public updateDataTableRow(request: google.cloud.chronicle.v1.IUpdateDataTableRowRequest): Promise; + + /** + * Calls ListDataTableRows. + * @param request ListDataTableRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataTableRowsResponse + */ + public listDataTableRows(request: google.cloud.chronicle.v1.IListDataTableRowsRequest, callback: google.cloud.chronicle.v1.DataTableService.ListDataTableRowsCallback): void; + + /** + * Calls ListDataTableRows. + * @param request ListDataTableRowsRequest message or plain object + * @returns Promise + */ + public listDataTableRows(request: google.cloud.chronicle.v1.IListDataTableRowsRequest): Promise; + + /** + * Calls GetDataTableRow. + * @param request GetDataTableRowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataTableRow + */ + public getDataTableRow(request: google.cloud.chronicle.v1.IGetDataTableRowRequest, callback: google.cloud.chronicle.v1.DataTableService.GetDataTableRowCallback): void; + + /** + * Calls GetDataTableRow. + * @param request GetDataTableRowRequest message or plain object + * @returns Promise + */ + public getDataTableRow(request: google.cloud.chronicle.v1.IGetDataTableRowRequest): Promise; + + /** + * Calls DeleteDataTableRow. + * @param request DeleteDataTableRowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDataTableRow(request: google.cloud.chronicle.v1.IDeleteDataTableRowRequest, callback: google.cloud.chronicle.v1.DataTableService.DeleteDataTableRowCallback): void; + + /** + * Calls DeleteDataTableRow. + * @param request DeleteDataTableRowRequest message or plain object + * @returns Promise + */ + public deleteDataTableRow(request: google.cloud.chronicle.v1.IDeleteDataTableRowRequest): Promise; + + /** + * Calls BulkCreateDataTableRows. + * @param request BulkCreateDataTableRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BulkCreateDataTableRowsResponse + */ + public bulkCreateDataTableRows(request: google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest, callback: google.cloud.chronicle.v1.DataTableService.BulkCreateDataTableRowsCallback): void; + + /** + * Calls BulkCreateDataTableRows. + * @param request BulkCreateDataTableRowsRequest message or plain object + * @returns Promise + */ + public bulkCreateDataTableRows(request: google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest): Promise; + + /** + * Calls BulkGetDataTableRows. + * @param request BulkGetDataTableRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BulkGetDataTableRowsResponse + */ + public bulkGetDataTableRows(request: google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest, callback: google.cloud.chronicle.v1.DataTableService.BulkGetDataTableRowsCallback): void; + + /** + * Calls BulkGetDataTableRows. + * @param request BulkGetDataTableRowsRequest message or plain object + * @returns Promise + */ + public bulkGetDataTableRows(request: google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest): Promise; + + /** + * Calls BulkReplaceDataTableRows. + * @param request BulkReplaceDataTableRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BulkReplaceDataTableRowsResponse + */ + public bulkReplaceDataTableRows(request: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest, callback: google.cloud.chronicle.v1.DataTableService.BulkReplaceDataTableRowsCallback): void; + + /** + * Calls BulkReplaceDataTableRows. + * @param request BulkReplaceDataTableRowsRequest message or plain object + * @returns Promise + */ + public bulkReplaceDataTableRows(request: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest): Promise; + + /** + * Calls BulkUpdateDataTableRows. + * @param request BulkUpdateDataTableRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BulkUpdateDataTableRowsResponse + */ + public bulkUpdateDataTableRows(request: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest, callback: google.cloud.chronicle.v1.DataTableService.BulkUpdateDataTableRowsCallback): void; + + /** + * Calls BulkUpdateDataTableRows. + * @param request BulkUpdateDataTableRowsRequest message or plain object + * @returns Promise + */ + public bulkUpdateDataTableRows(request: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest): Promise; + + /** + * Calls GetDataTableOperationErrors. + * @param request GetDataTableOperationErrorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataTableOperationErrors + */ + public getDataTableOperationErrors(request: google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest, callback: google.cloud.chronicle.v1.DataTableService.GetDataTableOperationErrorsCallback): void; + + /** + * Calls GetDataTableOperationErrors. + * @param request GetDataTableOperationErrorsRequest message or plain object + * @returns Promise + */ + public getDataTableOperationErrors(request: google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest): Promise; + } + + namespace DataTableService { + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|createDataTable}. + * @param error Error, if any + * @param [response] DataTable + */ + type CreateDataTableCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.DataTable) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|listDataTables}. + * @param error Error, if any + * @param [response] ListDataTablesResponse + */ + type ListDataTablesCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.ListDataTablesResponse) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|getDataTable}. + * @param error Error, if any + * @param [response] DataTable + */ + type GetDataTableCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.DataTable) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|updateDataTable}. + * @param error Error, if any + * @param [response] DataTable + */ + type UpdateDataTableCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.DataTable) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|deleteDataTable}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDataTableCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|createDataTableRow}. + * @param error Error, if any + * @param [response] DataTableRow + */ + type CreateDataTableRowCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.DataTableRow) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|updateDataTableRow}. + * @param error Error, if any + * @param [response] DataTableRow + */ + type UpdateDataTableRowCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.DataTableRow) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|listDataTableRows}. + * @param error Error, if any + * @param [response] ListDataTableRowsResponse + */ + type ListDataTableRowsCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.ListDataTableRowsResponse) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|getDataTableRow}. + * @param error Error, if any + * @param [response] DataTableRow + */ + type GetDataTableRowCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.DataTableRow) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|deleteDataTableRow}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDataTableRowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|bulkCreateDataTableRows}. + * @param error Error, if any + * @param [response] BulkCreateDataTableRowsResponse + */ + type BulkCreateDataTableRowsCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|bulkGetDataTableRows}. + * @param error Error, if any + * @param [response] BulkGetDataTableRowsResponse + */ + type BulkGetDataTableRowsCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.BulkGetDataTableRowsResponse) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|bulkReplaceDataTableRows}. + * @param error Error, if any + * @param [response] BulkReplaceDataTableRowsResponse + */ + type BulkReplaceDataTableRowsCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|bulkUpdateDataTableRows}. + * @param error Error, if any + * @param [response] BulkUpdateDataTableRowsResponse + */ + type BulkUpdateDataTableRowsCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse) => void; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|getDataTableOperationErrors}. + * @param error Error, if any + * @param [response] DataTableOperationErrors + */ + type GetDataTableOperationErrorsCallback = (error: (Error|null), response?: google.cloud.chronicle.v1.DataTableOperationErrors) => void; + } + + /** DataTableUpdateSource enum. */ + enum DataTableUpdateSource { + DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED = 0, + USER = 1, + RULE = 2, + SEARCH = 3 + } + + /** Properties of a CreateDataTableRequest. */ + interface ICreateDataTableRequest { + + /** CreateDataTableRequest parent */ + parent?: (string|null); + + /** CreateDataTableRequest dataTable */ + dataTable?: (google.cloud.chronicle.v1.IDataTable|null); + + /** CreateDataTableRequest dataTableId */ + dataTableId?: (string|null); + } + + /** Represents a CreateDataTableRequest. */ + class CreateDataTableRequest implements ICreateDataTableRequest { + + /** + * Constructs a new CreateDataTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.ICreateDataTableRequest); + + /** CreateDataTableRequest parent. */ + public parent: string; + + /** CreateDataTableRequest dataTable. */ + public dataTable?: (google.cloud.chronicle.v1.IDataTable|null); + + /** CreateDataTableRequest dataTableId. */ + public dataTableId: string; + + /** + * Creates a new CreateDataTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataTableRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.ICreateDataTableRequest): google.cloud.chronicle.v1.CreateDataTableRequest; + + /** + * Encodes the specified CreateDataTableRequest message. Does not implicitly {@link google.cloud.chronicle.v1.CreateDataTableRequest.verify|verify} messages. + * @param message CreateDataTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.ICreateDataTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataTableRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.CreateDataTableRequest.verify|verify} messages. + * @param message CreateDataTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.ICreateDataTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.CreateDataTableRequest; + + /** + * Decodes a CreateDataTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.CreateDataTableRequest; + + /** + * Verifies a CreateDataTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.CreateDataTableRequest; + + /** + * Creates a plain object from a CreateDataTableRequest message. Also converts values to other types if specified. + * @param message CreateDataTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.CreateDataTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataTableRequest. */ + interface IGetDataTableRequest { + + /** GetDataTableRequest name */ + name?: (string|null); + } + + /** Represents a GetDataTableRequest. */ + class GetDataTableRequest implements IGetDataTableRequest { + + /** + * Constructs a new GetDataTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IGetDataTableRequest); + + /** GetDataTableRequest name. */ + public name: string; + + /** + * Creates a new GetDataTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataTableRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IGetDataTableRequest): google.cloud.chronicle.v1.GetDataTableRequest; + + /** + * Encodes the specified GetDataTableRequest message. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableRequest.verify|verify} messages. + * @param message GetDataTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IGetDataTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataTableRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableRequest.verify|verify} messages. + * @param message GetDataTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IGetDataTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.GetDataTableRequest; + + /** + * Decodes a GetDataTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.GetDataTableRequest; + + /** + * Verifies a GetDataTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.GetDataTableRequest; + + /** + * Creates a plain object from a GetDataTableRequest message. Also converts values to other types if specified. + * @param message GetDataTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.GetDataTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataTableRequest. */ + interface IUpdateDataTableRequest { + + /** UpdateDataTableRequest dataTable */ + dataTable?: (google.cloud.chronicle.v1.IDataTable|null); + + /** UpdateDataTableRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDataTableRequest. */ + class UpdateDataTableRequest implements IUpdateDataTableRequest { + + /** + * Constructs a new UpdateDataTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IUpdateDataTableRequest); + + /** UpdateDataTableRequest dataTable. */ + public dataTable?: (google.cloud.chronicle.v1.IDataTable|null); + + /** UpdateDataTableRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDataTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataTableRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IUpdateDataTableRequest): google.cloud.chronicle.v1.UpdateDataTableRequest; + + /** + * Encodes the specified UpdateDataTableRequest message. Does not implicitly {@link google.cloud.chronicle.v1.UpdateDataTableRequest.verify|verify} messages. + * @param message UpdateDataTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IUpdateDataTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataTableRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.UpdateDataTableRequest.verify|verify} messages. + * @param message UpdateDataTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IUpdateDataTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.UpdateDataTableRequest; + + /** + * Decodes an UpdateDataTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.UpdateDataTableRequest; + + /** + * Verifies an UpdateDataTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.UpdateDataTableRequest; + + /** + * Creates a plain object from an UpdateDataTableRequest message. Also converts values to other types if specified. + * @param message UpdateDataTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.UpdateDataTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataTablesRequest. */ + interface IListDataTablesRequest { + + /** ListDataTablesRequest parent */ + parent?: (string|null); + + /** ListDataTablesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataTablesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataTablesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataTablesRequest. */ + class ListDataTablesRequest implements IListDataTablesRequest { + + /** + * Constructs a new ListDataTablesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IListDataTablesRequest); + + /** ListDataTablesRequest parent. */ + public parent: string; + + /** ListDataTablesRequest pageSize. */ + public pageSize: number; + + /** ListDataTablesRequest pageToken. */ + public pageToken: string; + + /** ListDataTablesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataTablesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataTablesRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IListDataTablesRequest): google.cloud.chronicle.v1.ListDataTablesRequest; + + /** + * Encodes the specified ListDataTablesRequest message. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTablesRequest.verify|verify} messages. + * @param message ListDataTablesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IListDataTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataTablesRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTablesRequest.verify|verify} messages. + * @param message ListDataTablesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IListDataTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataTablesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.ListDataTablesRequest; + + /** + * Decodes a ListDataTablesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.ListDataTablesRequest; + + /** + * Verifies a ListDataTablesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataTablesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataTablesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.ListDataTablesRequest; + + /** + * Creates a plain object from a ListDataTablesRequest message. Also converts values to other types if specified. + * @param message ListDataTablesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.ListDataTablesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataTablesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataTablesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataTableRequest. */ + interface IDeleteDataTableRequest { + + /** DeleteDataTableRequest name */ + name?: (string|null); + + /** DeleteDataTableRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteDataTableRequest. */ + class DeleteDataTableRequest implements IDeleteDataTableRequest { + + /** + * Constructs a new DeleteDataTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IDeleteDataTableRequest); + + /** DeleteDataTableRequest name. */ + public name: string; + + /** DeleteDataTableRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteDataTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataTableRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IDeleteDataTableRequest): google.cloud.chronicle.v1.DeleteDataTableRequest; + + /** + * Encodes the specified DeleteDataTableRequest message. Does not implicitly {@link google.cloud.chronicle.v1.DeleteDataTableRequest.verify|verify} messages. + * @param message DeleteDataTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IDeleteDataTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataTableRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DeleteDataTableRequest.verify|verify} messages. + * @param message DeleteDataTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IDeleteDataTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.DeleteDataTableRequest; + + /** + * Decodes a DeleteDataTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.DeleteDataTableRequest; + + /** + * Verifies a DeleteDataTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.DeleteDataTableRequest; + + /** + * Creates a plain object from a DeleteDataTableRequest message. Also converts values to other types if specified. + * @param message DeleteDataTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.DeleteDataTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataTablesResponse. */ + interface IListDataTablesResponse { + + /** ListDataTablesResponse dataTables */ + dataTables?: (google.cloud.chronicle.v1.IDataTable[]|null); + + /** ListDataTablesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDataTablesResponse. */ + class ListDataTablesResponse implements IListDataTablesResponse { + + /** + * Constructs a new ListDataTablesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IListDataTablesResponse); + + /** ListDataTablesResponse dataTables. */ + public dataTables: google.cloud.chronicle.v1.IDataTable[]; + + /** ListDataTablesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDataTablesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataTablesResponse instance + */ + public static create(properties?: google.cloud.chronicle.v1.IListDataTablesResponse): google.cloud.chronicle.v1.ListDataTablesResponse; + + /** + * Encodes the specified ListDataTablesResponse message. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTablesResponse.verify|verify} messages. + * @param message ListDataTablesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IListDataTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataTablesResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTablesResponse.verify|verify} messages. + * @param message ListDataTablesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IListDataTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataTablesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataTablesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.ListDataTablesResponse; + + /** + * Decodes a ListDataTablesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataTablesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.ListDataTablesResponse; + + /** + * Verifies a ListDataTablesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataTablesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataTablesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.ListDataTablesResponse; + + /** + * Creates a plain object from a ListDataTablesResponse message. Also converts values to other types if specified. + * @param message ListDataTablesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.ListDataTablesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataTablesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataTablesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDataTableRowRequest. */ + interface ICreateDataTableRowRequest { + + /** CreateDataTableRowRequest parent */ + parent?: (string|null); + + /** CreateDataTableRowRequest dataTableRow */ + dataTableRow?: (google.cloud.chronicle.v1.IDataTableRow|null); + } + + /** Represents a CreateDataTableRowRequest. */ + class CreateDataTableRowRequest implements ICreateDataTableRowRequest { + + /** + * Constructs a new CreateDataTableRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.ICreateDataTableRowRequest); + + /** CreateDataTableRowRequest parent. */ + public parent: string; + + /** CreateDataTableRowRequest dataTableRow. */ + public dataTableRow?: (google.cloud.chronicle.v1.IDataTableRow|null); + + /** + * Creates a new CreateDataTableRowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataTableRowRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.ICreateDataTableRowRequest): google.cloud.chronicle.v1.CreateDataTableRowRequest; + + /** + * Encodes the specified CreateDataTableRowRequest message. Does not implicitly {@link google.cloud.chronicle.v1.CreateDataTableRowRequest.verify|verify} messages. + * @param message CreateDataTableRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.ICreateDataTableRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataTableRowRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.CreateDataTableRowRequest.verify|verify} messages. + * @param message CreateDataTableRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.ICreateDataTableRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataTableRowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.CreateDataTableRowRequest; + + /** + * Decodes a CreateDataTableRowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.CreateDataTableRowRequest; + + /** + * Verifies a CreateDataTableRowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataTableRowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataTableRowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.CreateDataTableRowRequest; + + /** + * Creates a plain object from a CreateDataTableRowRequest message. Also converts values to other types if specified. + * @param message CreateDataTableRowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.CreateDataTableRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataTableRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataTableRowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataTableRowRequest. */ + interface IUpdateDataTableRowRequest { + + /** UpdateDataTableRowRequest dataTableRow */ + dataTableRow?: (google.cloud.chronicle.v1.IDataTableRow|null); + + /** UpdateDataTableRowRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDataTableRowRequest. */ + class UpdateDataTableRowRequest implements IUpdateDataTableRowRequest { + + /** + * Constructs a new UpdateDataTableRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IUpdateDataTableRowRequest); + + /** UpdateDataTableRowRequest dataTableRow. */ + public dataTableRow?: (google.cloud.chronicle.v1.IDataTableRow|null); + + /** UpdateDataTableRowRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDataTableRowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataTableRowRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IUpdateDataTableRowRequest): google.cloud.chronicle.v1.UpdateDataTableRowRequest; + + /** + * Encodes the specified UpdateDataTableRowRequest message. Does not implicitly {@link google.cloud.chronicle.v1.UpdateDataTableRowRequest.verify|verify} messages. + * @param message UpdateDataTableRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IUpdateDataTableRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataTableRowRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.UpdateDataTableRowRequest.verify|verify} messages. + * @param message UpdateDataTableRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IUpdateDataTableRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataTableRowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.UpdateDataTableRowRequest; + + /** + * Decodes an UpdateDataTableRowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.UpdateDataTableRowRequest; + + /** + * Verifies an UpdateDataTableRowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataTableRowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataTableRowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.UpdateDataTableRowRequest; + + /** + * Creates a plain object from an UpdateDataTableRowRequest message. Also converts values to other types if specified. + * @param message UpdateDataTableRowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.UpdateDataTableRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataTableRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataTableRowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataTableRowsRequest. */ + interface IListDataTableRowsRequest { + + /** ListDataTableRowsRequest parent */ + parent?: (string|null); + + /** ListDataTableRowsRequest pageSize */ + pageSize?: (number|null); + + /** ListDataTableRowsRequest pageToken */ + pageToken?: (string|null); + + /** ListDataTableRowsRequest orderBy */ + orderBy?: (string|null); + + /** ListDataTableRowsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListDataTableRowsRequest. */ + class ListDataTableRowsRequest implements IListDataTableRowsRequest { + + /** + * Constructs a new ListDataTableRowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IListDataTableRowsRequest); + + /** ListDataTableRowsRequest parent. */ + public parent: string; + + /** ListDataTableRowsRequest pageSize. */ + public pageSize: number; + + /** ListDataTableRowsRequest pageToken. */ + public pageToken: string; + + /** ListDataTableRowsRequest orderBy. */ + public orderBy: string; + + /** ListDataTableRowsRequest filter. */ + public filter: string; + + /** + * Creates a new ListDataTableRowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataTableRowsRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IListDataTableRowsRequest): google.cloud.chronicle.v1.ListDataTableRowsRequest; + + /** + * Encodes the specified ListDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTableRowsRequest.verify|verify} messages. + * @param message ListDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IListDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTableRowsRequest.verify|verify} messages. + * @param message ListDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IListDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataTableRowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.ListDataTableRowsRequest; + + /** + * Decodes a ListDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.ListDataTableRowsRequest; + + /** + * Verifies a ListDataTableRowsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataTableRowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.ListDataTableRowsRequest; + + /** + * Creates a plain object from a ListDataTableRowsRequest message. Also converts values to other types if specified. + * @param message ListDataTableRowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.ListDataTableRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataTableRowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataTableRowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataTableRowsResponse. */ + interface IListDataTableRowsResponse { + + /** ListDataTableRowsResponse dataTableRows */ + dataTableRows?: (google.cloud.chronicle.v1.IDataTableRow[]|null); + + /** ListDataTableRowsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDataTableRowsResponse. */ + class ListDataTableRowsResponse implements IListDataTableRowsResponse { + + /** + * Constructs a new ListDataTableRowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IListDataTableRowsResponse); + + /** ListDataTableRowsResponse dataTableRows. */ + public dataTableRows: google.cloud.chronicle.v1.IDataTableRow[]; + + /** ListDataTableRowsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDataTableRowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataTableRowsResponse instance + */ + public static create(properties?: google.cloud.chronicle.v1.IListDataTableRowsResponse): google.cloud.chronicle.v1.ListDataTableRowsResponse; + + /** + * Encodes the specified ListDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTableRowsResponse.verify|verify} messages. + * @param message ListDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IListDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTableRowsResponse.verify|verify} messages. + * @param message ListDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IListDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataTableRowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.ListDataTableRowsResponse; + + /** + * Decodes a ListDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.ListDataTableRowsResponse; + + /** + * Verifies a ListDataTableRowsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataTableRowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.ListDataTableRowsResponse; + + /** + * Creates a plain object from a ListDataTableRowsResponse message. Also converts values to other types if specified. + * @param message ListDataTableRowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.ListDataTableRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataTableRowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataTableRowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataTableRowRequest. */ + interface IGetDataTableRowRequest { + + /** GetDataTableRowRequest name */ + name?: (string|null); + } + + /** Represents a GetDataTableRowRequest. */ + class GetDataTableRowRequest implements IGetDataTableRowRequest { + + /** + * Constructs a new GetDataTableRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IGetDataTableRowRequest); + + /** GetDataTableRowRequest name. */ + public name: string; + + /** + * Creates a new GetDataTableRowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataTableRowRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IGetDataTableRowRequest): google.cloud.chronicle.v1.GetDataTableRowRequest; + + /** + * Encodes the specified GetDataTableRowRequest message. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableRowRequest.verify|verify} messages. + * @param message GetDataTableRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IGetDataTableRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataTableRowRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableRowRequest.verify|verify} messages. + * @param message GetDataTableRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IGetDataTableRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataTableRowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.GetDataTableRowRequest; + + /** + * Decodes a GetDataTableRowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.GetDataTableRowRequest; + + /** + * Verifies a GetDataTableRowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataTableRowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataTableRowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.GetDataTableRowRequest; + + /** + * Creates a plain object from a GetDataTableRowRequest message. Also converts values to other types if specified. + * @param message GetDataTableRowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.GetDataTableRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataTableRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataTableRowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataTableRowRequest. */ + interface IDeleteDataTableRowRequest { + + /** DeleteDataTableRowRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDataTableRowRequest. */ + class DeleteDataTableRowRequest implements IDeleteDataTableRowRequest { + + /** + * Constructs a new DeleteDataTableRowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IDeleteDataTableRowRequest); + + /** DeleteDataTableRowRequest name. */ + public name: string; + + /** + * Creates a new DeleteDataTableRowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataTableRowRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IDeleteDataTableRowRequest): google.cloud.chronicle.v1.DeleteDataTableRowRequest; + + /** + * Encodes the specified DeleteDataTableRowRequest message. Does not implicitly {@link google.cloud.chronicle.v1.DeleteDataTableRowRequest.verify|verify} messages. + * @param message DeleteDataTableRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IDeleteDataTableRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataTableRowRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DeleteDataTableRowRequest.verify|verify} messages. + * @param message DeleteDataTableRowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IDeleteDataTableRowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataTableRowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.DeleteDataTableRowRequest; + + /** + * Decodes a DeleteDataTableRowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.DeleteDataTableRowRequest; + + /** + * Verifies a DeleteDataTableRowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataTableRowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataTableRowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.DeleteDataTableRowRequest; + + /** + * Creates a plain object from a DeleteDataTableRowRequest message. Also converts values to other types if specified. + * @param message DeleteDataTableRowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.DeleteDataTableRowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataTableRowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataTableRowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkCreateDataTableRowsRequest. */ + interface IBulkCreateDataTableRowsRequest { + + /** BulkCreateDataTableRowsRequest parent */ + parent?: (string|null); + + /** BulkCreateDataTableRowsRequest requests */ + requests?: (google.cloud.chronicle.v1.ICreateDataTableRowRequest[]|null); + } + + /** Represents a BulkCreateDataTableRowsRequest. */ + class BulkCreateDataTableRowsRequest implements IBulkCreateDataTableRowsRequest { + + /** + * Constructs a new BulkCreateDataTableRowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest); + + /** BulkCreateDataTableRowsRequest parent. */ + public parent: string; + + /** BulkCreateDataTableRowsRequest requests. */ + public requests: google.cloud.chronicle.v1.ICreateDataTableRowRequest[]; + + /** + * Creates a new BulkCreateDataTableRowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkCreateDataTableRowsRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest): google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest; + + /** + * Encodes the specified BulkCreateDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest.verify|verify} messages. + * @param message BulkCreateDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkCreateDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest.verify|verify} messages. + * @param message BulkCreateDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkCreateDataTableRowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkCreateDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest; + + /** + * Decodes a BulkCreateDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkCreateDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest; + + /** + * Verifies a BulkCreateDataTableRowsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkCreateDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkCreateDataTableRowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest; + + /** + * Creates a plain object from a BulkCreateDataTableRowsRequest message. Also converts values to other types if specified. + * @param message BulkCreateDataTableRowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkCreateDataTableRowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkCreateDataTableRowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkCreateDataTableRowsResponse. */ + interface IBulkCreateDataTableRowsResponse { + + /** BulkCreateDataTableRowsResponse dataTableRows */ + dataTableRows?: (google.cloud.chronicle.v1.IDataTableRow[]|null); + } + + /** Represents a BulkCreateDataTableRowsResponse. */ + class BulkCreateDataTableRowsResponse implements IBulkCreateDataTableRowsResponse { + + /** + * Constructs a new BulkCreateDataTableRowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse); + + /** BulkCreateDataTableRowsResponse dataTableRows. */ + public dataTableRows: google.cloud.chronicle.v1.IDataTableRow[]; + + /** + * Creates a new BulkCreateDataTableRowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkCreateDataTableRowsResponse instance + */ + public static create(properties?: google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse): google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse; + + /** + * Encodes the specified BulkCreateDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse.verify|verify} messages. + * @param message BulkCreateDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkCreateDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse.verify|verify} messages. + * @param message BulkCreateDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkCreateDataTableRowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkCreateDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse; + + /** + * Decodes a BulkCreateDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkCreateDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse; + + /** + * Verifies a BulkCreateDataTableRowsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkCreateDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkCreateDataTableRowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse; + + /** + * Creates a plain object from a BulkCreateDataTableRowsResponse message. Also converts values to other types if specified. + * @param message BulkCreateDataTableRowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkCreateDataTableRowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkCreateDataTableRowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkGetDataTableRowsRequest. */ + interface IBulkGetDataTableRowsRequest { + + /** BulkGetDataTableRowsRequest parent */ + parent?: (string|null); + + /** BulkGetDataTableRowsRequest requests */ + requests?: (google.cloud.chronicle.v1.IGetDataTableRowRequest[]|null); + } + + /** Represents a BulkGetDataTableRowsRequest. */ + class BulkGetDataTableRowsRequest implements IBulkGetDataTableRowsRequest { + + /** + * Constructs a new BulkGetDataTableRowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest); + + /** BulkGetDataTableRowsRequest parent. */ + public parent: string; + + /** BulkGetDataTableRowsRequest requests. */ + public requests: google.cloud.chronicle.v1.IGetDataTableRowRequest[]; + + /** + * Creates a new BulkGetDataTableRowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkGetDataTableRowsRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest): google.cloud.chronicle.v1.BulkGetDataTableRowsRequest; + + /** + * Encodes the specified BulkGetDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.BulkGetDataTableRowsRequest.verify|verify} messages. + * @param message BulkGetDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkGetDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkGetDataTableRowsRequest.verify|verify} messages. + * @param message BulkGetDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkGetDataTableRowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkGetDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.BulkGetDataTableRowsRequest; + + /** + * Decodes a BulkGetDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkGetDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.BulkGetDataTableRowsRequest; + + /** + * Verifies a BulkGetDataTableRowsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkGetDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkGetDataTableRowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.BulkGetDataTableRowsRequest; + + /** + * Creates a plain object from a BulkGetDataTableRowsRequest message. Also converts values to other types if specified. + * @param message BulkGetDataTableRowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.BulkGetDataTableRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkGetDataTableRowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkGetDataTableRowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkGetDataTableRowsResponse. */ + interface IBulkGetDataTableRowsResponse { + + /** BulkGetDataTableRowsResponse dataTableRows */ + dataTableRows?: (google.cloud.chronicle.v1.IDataTableRow[]|null); + } + + /** Represents a BulkGetDataTableRowsResponse. */ + class BulkGetDataTableRowsResponse implements IBulkGetDataTableRowsResponse { + + /** + * Constructs a new BulkGetDataTableRowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse); + + /** BulkGetDataTableRowsResponse dataTableRows. */ + public dataTableRows: google.cloud.chronicle.v1.IDataTableRow[]; + + /** + * Creates a new BulkGetDataTableRowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkGetDataTableRowsResponse instance + */ + public static create(properties?: google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse): google.cloud.chronicle.v1.BulkGetDataTableRowsResponse; + + /** + * Encodes the specified BulkGetDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.BulkGetDataTableRowsResponse.verify|verify} messages. + * @param message BulkGetDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkGetDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkGetDataTableRowsResponse.verify|verify} messages. + * @param message BulkGetDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkGetDataTableRowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkGetDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.BulkGetDataTableRowsResponse; + + /** + * Decodes a BulkGetDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkGetDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.BulkGetDataTableRowsResponse; + + /** + * Verifies a BulkGetDataTableRowsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkGetDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkGetDataTableRowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.BulkGetDataTableRowsResponse; + + /** + * Creates a plain object from a BulkGetDataTableRowsResponse message. Also converts values to other types if specified. + * @param message BulkGetDataTableRowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.BulkGetDataTableRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkGetDataTableRowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkGetDataTableRowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkReplaceDataTableRowsRequest. */ + interface IBulkReplaceDataTableRowsRequest { + + /** BulkReplaceDataTableRowsRequest parent */ + parent?: (string|null); + + /** BulkReplaceDataTableRowsRequest requests */ + requests?: (google.cloud.chronicle.v1.ICreateDataTableRowRequest[]|null); + } + + /** Represents a BulkReplaceDataTableRowsRequest. */ + class BulkReplaceDataTableRowsRequest implements IBulkReplaceDataTableRowsRequest { + + /** + * Constructs a new BulkReplaceDataTableRowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest); + + /** BulkReplaceDataTableRowsRequest parent. */ + public parent: string; + + /** BulkReplaceDataTableRowsRequest requests. */ + public requests: google.cloud.chronicle.v1.ICreateDataTableRowRequest[]; + + /** + * Creates a new BulkReplaceDataTableRowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkReplaceDataTableRowsRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest): google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest; + + /** + * Encodes the specified BulkReplaceDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest.verify|verify} messages. + * @param message BulkReplaceDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkReplaceDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest.verify|verify} messages. + * @param message BulkReplaceDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkReplaceDataTableRowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkReplaceDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest; + + /** + * Decodes a BulkReplaceDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkReplaceDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest; + + /** + * Verifies a BulkReplaceDataTableRowsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkReplaceDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkReplaceDataTableRowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest; + + /** + * Creates a plain object from a BulkReplaceDataTableRowsRequest message. Also converts values to other types if specified. + * @param message BulkReplaceDataTableRowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkReplaceDataTableRowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkReplaceDataTableRowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkReplaceDataTableRowsResponse. */ + interface IBulkReplaceDataTableRowsResponse { + + /** BulkReplaceDataTableRowsResponse dataTableRows */ + dataTableRows?: (google.cloud.chronicle.v1.IDataTableRow[]|null); + } + + /** Represents a BulkReplaceDataTableRowsResponse. */ + class BulkReplaceDataTableRowsResponse implements IBulkReplaceDataTableRowsResponse { + + /** + * Constructs a new BulkReplaceDataTableRowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse); + + /** BulkReplaceDataTableRowsResponse dataTableRows. */ + public dataTableRows: google.cloud.chronicle.v1.IDataTableRow[]; + + /** + * Creates a new BulkReplaceDataTableRowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkReplaceDataTableRowsResponse instance + */ + public static create(properties?: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse): google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse; + + /** + * Encodes the specified BulkReplaceDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse.verify|verify} messages. + * @param message BulkReplaceDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkReplaceDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse.verify|verify} messages. + * @param message BulkReplaceDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkReplaceDataTableRowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkReplaceDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse; + + /** + * Decodes a BulkReplaceDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkReplaceDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse; + + /** + * Verifies a BulkReplaceDataTableRowsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkReplaceDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkReplaceDataTableRowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse; + + /** + * Creates a plain object from a BulkReplaceDataTableRowsResponse message. Also converts values to other types if specified. + * @param message BulkReplaceDataTableRowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkReplaceDataTableRowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkReplaceDataTableRowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkUpdateDataTableRowsRequest. */ + interface IBulkUpdateDataTableRowsRequest { + + /** BulkUpdateDataTableRowsRequest parent */ + parent?: (string|null); + + /** BulkUpdateDataTableRowsRequest requests */ + requests?: (google.cloud.chronicle.v1.IUpdateDataTableRowRequest[]|null); + } + + /** Represents a BulkUpdateDataTableRowsRequest. */ + class BulkUpdateDataTableRowsRequest implements IBulkUpdateDataTableRowsRequest { + + /** + * Constructs a new BulkUpdateDataTableRowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest); + + /** BulkUpdateDataTableRowsRequest parent. */ + public parent: string; + + /** BulkUpdateDataTableRowsRequest requests. */ + public requests: google.cloud.chronicle.v1.IUpdateDataTableRowRequest[]; + + /** + * Creates a new BulkUpdateDataTableRowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkUpdateDataTableRowsRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest): google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest; + + /** + * Encodes the specified BulkUpdateDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest.verify|verify} messages. + * @param message BulkUpdateDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkUpdateDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest.verify|verify} messages. + * @param message BulkUpdateDataTableRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkUpdateDataTableRowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkUpdateDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest; + + /** + * Decodes a BulkUpdateDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkUpdateDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest; + + /** + * Verifies a BulkUpdateDataTableRowsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkUpdateDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkUpdateDataTableRowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest; + + /** + * Creates a plain object from a BulkUpdateDataTableRowsRequest message. Also converts values to other types if specified. + * @param message BulkUpdateDataTableRowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkUpdateDataTableRowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkUpdateDataTableRowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkUpdateDataTableRowsResponse. */ + interface IBulkUpdateDataTableRowsResponse { + + /** BulkUpdateDataTableRowsResponse dataTableRows */ + dataTableRows?: (google.cloud.chronicle.v1.IDataTableRow[]|null); + } + + /** Represents a BulkUpdateDataTableRowsResponse. */ + class BulkUpdateDataTableRowsResponse implements IBulkUpdateDataTableRowsResponse { + + /** + * Constructs a new BulkUpdateDataTableRowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse); + + /** BulkUpdateDataTableRowsResponse dataTableRows. */ + public dataTableRows: google.cloud.chronicle.v1.IDataTableRow[]; + + /** + * Creates a new BulkUpdateDataTableRowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkUpdateDataTableRowsResponse instance + */ + public static create(properties?: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse): google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse; + + /** + * Encodes the specified BulkUpdateDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse.verify|verify} messages. + * @param message BulkUpdateDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkUpdateDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse.verify|verify} messages. + * @param message BulkUpdateDataTableRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkUpdateDataTableRowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkUpdateDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse; + + /** + * Decodes a BulkUpdateDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkUpdateDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse; + + /** + * Verifies a BulkUpdateDataTableRowsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkUpdateDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkUpdateDataTableRowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse; + + /** + * Creates a plain object from a BulkUpdateDataTableRowsResponse message. Also converts values to other types if specified. + * @param message BulkUpdateDataTableRowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkUpdateDataTableRowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkUpdateDataTableRowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataTableScopeInfo. */ + interface IDataTableScopeInfo { + + /** DataTableScopeInfo dataAccessScopes */ + dataAccessScopes?: (string[]|null); + } + + /** Represents a DataTableScopeInfo. */ + class DataTableScopeInfo implements IDataTableScopeInfo { + + /** + * Constructs a new DataTableScopeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IDataTableScopeInfo); + + /** DataTableScopeInfo dataAccessScopes. */ + public dataAccessScopes: string[]; + + /** + * Creates a new DataTableScopeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DataTableScopeInfo instance + */ + public static create(properties?: google.cloud.chronicle.v1.IDataTableScopeInfo): google.cloud.chronicle.v1.DataTableScopeInfo; + + /** + * Encodes the specified DataTableScopeInfo message. Does not implicitly {@link google.cloud.chronicle.v1.DataTableScopeInfo.verify|verify} messages. + * @param message DataTableScopeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IDataTableScopeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataTableScopeInfo message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTableScopeInfo.verify|verify} messages. + * @param message DataTableScopeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IDataTableScopeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataTableScopeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataTableScopeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.DataTableScopeInfo; + + /** + * Decodes a DataTableScopeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataTableScopeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.DataTableScopeInfo; + + /** + * Verifies a DataTableScopeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataTableScopeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataTableScopeInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.DataTableScopeInfo; + + /** + * Creates a plain object from a DataTableScopeInfo message. Also converts values to other types if specified. + * @param message DataTableScopeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.DataTableScopeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataTableScopeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataTableScopeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataTable. */ + interface IDataTable { + + /** DataTable name */ + name?: (string|null); + + /** DataTable displayName */ + displayName?: (string|null); + + /** DataTable description */ + description?: (string|null); + + /** DataTable createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataTable updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataTable columnInfo */ + columnInfo?: (google.cloud.chronicle.v1.IDataTableColumnInfo[]|null); + + /** DataTable dataTableUuid */ + dataTableUuid?: (string|null); + + /** DataTable rules */ + rules?: (string[]|null); + + /** DataTable ruleAssociationsCount */ + ruleAssociationsCount?: (number|null); + + /** DataTable rowTimeToLive */ + rowTimeToLive?: (string|null); + + /** DataTable approximateRowCount */ + approximateRowCount?: (number|Long|string|null); + + /** DataTable scopeInfo */ + scopeInfo?: (google.cloud.chronicle.v1.IDataTableScopeInfo|null); + + /** DataTable updateSource */ + updateSource?: (google.cloud.chronicle.v1.DataTableUpdateSource|keyof typeof google.cloud.chronicle.v1.DataTableUpdateSource|null); + + /** DataTable rowTimeToLiveUpdateTime */ + rowTimeToLiveUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DataTable. */ + class DataTable implements IDataTable { + + /** + * Constructs a new DataTable. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IDataTable); + + /** DataTable name. */ + public name: string; + + /** DataTable displayName. */ + public displayName: string; + + /** DataTable description. */ + public description: string; + + /** DataTable createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataTable updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataTable columnInfo. */ + public columnInfo: google.cloud.chronicle.v1.IDataTableColumnInfo[]; + + /** DataTable dataTableUuid. */ + public dataTableUuid: string; + + /** DataTable rules. */ + public rules: string[]; + + /** DataTable ruleAssociationsCount. */ + public ruleAssociationsCount: number; + + /** DataTable rowTimeToLive. */ + public rowTimeToLive: string; + + /** DataTable approximateRowCount. */ + public approximateRowCount: (number|Long|string); + + /** DataTable scopeInfo. */ + public scopeInfo?: (google.cloud.chronicle.v1.IDataTableScopeInfo|null); + + /** DataTable updateSource. */ + public updateSource: (google.cloud.chronicle.v1.DataTableUpdateSource|keyof typeof google.cloud.chronicle.v1.DataTableUpdateSource); + + /** DataTable rowTimeToLiveUpdateTime. */ + public rowTimeToLiveUpdateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new DataTable instance using the specified properties. + * @param [properties] Properties to set + * @returns DataTable instance + */ + public static create(properties?: google.cloud.chronicle.v1.IDataTable): google.cloud.chronicle.v1.DataTable; + + /** + * Encodes the specified DataTable message. Does not implicitly {@link google.cloud.chronicle.v1.DataTable.verify|verify} messages. + * @param message DataTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IDataTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataTable message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTable.verify|verify} messages. + * @param message DataTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IDataTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataTable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.DataTable; + + /** + * Decodes a DataTable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.DataTable; + + /** + * Verifies a DataTable message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataTable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataTable + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.DataTable; + + /** + * Creates a plain object from a DataTable message. Also converts values to other types if specified. + * @param message DataTable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.DataTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataTable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataTable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataTableRow. */ + interface IDataTableRow { + + /** DataTableRow name */ + name?: (string|null); + + /** DataTableRow values */ + values?: (string[]|null); + + /** DataTableRow createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataTableRow updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataTableRow rowTimeToLive */ + rowTimeToLive?: (string|null); + } + + /** Represents a DataTableRow. */ + class DataTableRow implements IDataTableRow { + + /** + * Constructs a new DataTableRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IDataTableRow); + + /** DataTableRow name. */ + public name: string; + + /** DataTableRow values. */ + public values: string[]; + + /** DataTableRow createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataTableRow updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataTableRow rowTimeToLive. */ + public rowTimeToLive: string; + + /** + * Creates a new DataTableRow instance using the specified properties. + * @param [properties] Properties to set + * @returns DataTableRow instance + */ + public static create(properties?: google.cloud.chronicle.v1.IDataTableRow): google.cloud.chronicle.v1.DataTableRow; + + /** + * Encodes the specified DataTableRow message. Does not implicitly {@link google.cloud.chronicle.v1.DataTableRow.verify|verify} messages. + * @param message DataTableRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IDataTableRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataTableRow message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTableRow.verify|verify} messages. + * @param message DataTableRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IDataTableRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataTableRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.DataTableRow; + + /** + * Decodes a DataTableRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.DataTableRow; + + /** + * Verifies a DataTableRow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataTableRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataTableRow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.DataTableRow; + + /** + * Creates a plain object from a DataTableRow message. Also converts values to other types if specified. + * @param message DataTableRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.DataTableRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataTableRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataTableRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataTableColumnInfo. */ + interface IDataTableColumnInfo { + + /** DataTableColumnInfo mappedColumnPath */ + mappedColumnPath?: (string|null); + + /** DataTableColumnInfo columnType */ + columnType?: (google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType|keyof typeof google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType|null); + + /** DataTableColumnInfo columnIndex */ + columnIndex?: (number|null); + + /** DataTableColumnInfo originalColumn */ + originalColumn?: (string|null); + + /** DataTableColumnInfo keyColumn */ + keyColumn?: (boolean|null); + + /** DataTableColumnInfo repeatedValues */ + repeatedValues?: (boolean|null); + } + + /** Represents a DataTableColumnInfo. */ + class DataTableColumnInfo implements IDataTableColumnInfo { + + /** + * Constructs a new DataTableColumnInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IDataTableColumnInfo); + + /** DataTableColumnInfo mappedColumnPath. */ + public mappedColumnPath?: (string|null); + + /** DataTableColumnInfo columnType. */ + public columnType?: (google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType|keyof typeof google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType|null); + + /** DataTableColumnInfo columnIndex. */ + public columnIndex: number; + + /** DataTableColumnInfo originalColumn. */ + public originalColumn: string; + + /** DataTableColumnInfo keyColumn. */ + public keyColumn: boolean; + + /** DataTableColumnInfo repeatedValues. */ + public repeatedValues: boolean; + + /** DataTableColumnInfo pathOrType. */ + public pathOrType?: ("mappedColumnPath"|"columnType"); + + /** + * Creates a new DataTableColumnInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DataTableColumnInfo instance + */ + public static create(properties?: google.cloud.chronicle.v1.IDataTableColumnInfo): google.cloud.chronicle.v1.DataTableColumnInfo; + + /** + * Encodes the specified DataTableColumnInfo message. Does not implicitly {@link google.cloud.chronicle.v1.DataTableColumnInfo.verify|verify} messages. + * @param message DataTableColumnInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IDataTableColumnInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataTableColumnInfo message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTableColumnInfo.verify|verify} messages. + * @param message DataTableColumnInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IDataTableColumnInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataTableColumnInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataTableColumnInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.DataTableColumnInfo; + + /** + * Decodes a DataTableColumnInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataTableColumnInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.DataTableColumnInfo; + + /** + * Verifies a DataTableColumnInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataTableColumnInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataTableColumnInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.DataTableColumnInfo; + + /** + * Creates a plain object from a DataTableColumnInfo message. Also converts values to other types if specified. + * @param message DataTableColumnInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.DataTableColumnInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataTableColumnInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataTableColumnInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataTableColumnInfo { + + /** DataTableColumnType enum. */ + enum DataTableColumnType { + DATA_TABLE_COLUMN_TYPE_UNSPECIFIED = 0, + STRING = 1, + REGEX = 2, + CIDR = 3, + NUMBER = 4 + } + } + + /** Properties of a GetDataTableOperationErrorsRequest. */ + interface IGetDataTableOperationErrorsRequest { + + /** GetDataTableOperationErrorsRequest name */ + name?: (string|null); + } + + /** Represents a GetDataTableOperationErrorsRequest. */ + class GetDataTableOperationErrorsRequest implements IGetDataTableOperationErrorsRequest { + + /** + * Constructs a new GetDataTableOperationErrorsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest); + + /** GetDataTableOperationErrorsRequest name. */ + public name: string; + + /** + * Creates a new GetDataTableOperationErrorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataTableOperationErrorsRequest instance + */ + public static create(properties?: google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest): google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest; + + /** + * Encodes the specified GetDataTableOperationErrorsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest.verify|verify} messages. + * @param message GetDataTableOperationErrorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataTableOperationErrorsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest.verify|verify} messages. + * @param message GetDataTableOperationErrorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataTableOperationErrorsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataTableOperationErrorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest; + + /** + * Decodes a GetDataTableOperationErrorsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataTableOperationErrorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest; + + /** + * Verifies a GetDataTableOperationErrorsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataTableOperationErrorsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataTableOperationErrorsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest; + + /** + * Creates a plain object from a GetDataTableOperationErrorsRequest message. Also converts values to other types if specified. + * @param message GetDataTableOperationErrorsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataTableOperationErrorsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataTableOperationErrorsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataTableOperationErrors. */ + interface IDataTableOperationErrors { + + /** DataTableOperationErrors name */ + name?: (string|null); + + /** DataTableOperationErrors rpcErrors */ + rpcErrors?: (google.rpc.IStatus[]|null); + } + + /** Represents a DataTableOperationErrors. */ + class DataTableOperationErrors implements IDataTableOperationErrors { + + /** + * Constructs a new DataTableOperationErrors. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.chronicle.v1.IDataTableOperationErrors); + + /** DataTableOperationErrors name. */ + public name: string; + + /** DataTableOperationErrors rpcErrors. */ + public rpcErrors: google.rpc.IStatus[]; + + /** + * Creates a new DataTableOperationErrors instance using the specified properties. + * @param [properties] Properties to set + * @returns DataTableOperationErrors instance + */ + public static create(properties?: google.cloud.chronicle.v1.IDataTableOperationErrors): google.cloud.chronicle.v1.DataTableOperationErrors; + + /** + * Encodes the specified DataTableOperationErrors message. Does not implicitly {@link google.cloud.chronicle.v1.DataTableOperationErrors.verify|verify} messages. + * @param message DataTableOperationErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.chronicle.v1.IDataTableOperationErrors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataTableOperationErrors message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTableOperationErrors.verify|verify} messages. + * @param message DataTableOperationErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.chronicle.v1.IDataTableOperationErrors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataTableOperationErrors message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataTableOperationErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.chronicle.v1.DataTableOperationErrors; + + /** + * Decodes a DataTableOperationErrors message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataTableOperationErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.chronicle.v1.DataTableOperationErrors; + + /** + * Verifies a DataTableOperationErrors message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataTableOperationErrors message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataTableOperationErrors + */ + public static fromObject(object: { [k: string]: any }): google.cloud.chronicle.v1.DataTableOperationErrors; + + /** + * Creates a plain object from a DataTableOperationErrors message. Also converts values to other types if specified. + * @param message DataTableOperationErrors + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.chronicle.v1.DataTableOperationErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataTableOperationErrors to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataTableOperationErrors + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents an EntityService */ class EntityService extends $protobuf.rpc.Service { @@ -14448,6 +17584,119 @@ export namespace google { } } + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Namespace longrunning. */ namespace longrunning { @@ -15420,119 +18669,6 @@ export namespace google { } } - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - /** Namespace type. */ namespace type { diff --git a/packages/google-cloud-chronicle/protos/protos.js b/packages/google-cloud-chronicle/protos/protos.js index 52184571276a..924cce7f9c20 100644 --- a/packages/google-cloud-chronicle/protos/protos.js +++ b/packages/google-cloud-chronicle/protos/protos.js @@ -4762,6 +4762,7352 @@ return IngestionLabel; })(); + v1.DataTableService = (function() { + + /** + * Constructs a new DataTableService service. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a DataTableService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function DataTableService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataTableService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataTableService; + + /** + * Creates new DataTableService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.chronicle.v1.DataTableService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataTableService} RPC service. Useful where requests and/or responses are streamed. + */ + DataTableService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|createDataTable}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef CreateDataTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.DataTable} [response] DataTable + */ + + /** + * Calls CreateDataTable. + * @function createDataTable + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.ICreateDataTableRequest} request CreateDataTableRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.CreateDataTableCallback} callback Node-style callback called with the error, if any, and DataTable + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.createDataTable = function createDataTable(request, callback) { + return this.rpcCall(createDataTable, $root.google.cloud.chronicle.v1.CreateDataTableRequest, $root.google.cloud.chronicle.v1.DataTable, request, callback); + }, "name", { value: "CreateDataTable" }); + + /** + * Calls CreateDataTable. + * @function createDataTable + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.ICreateDataTableRequest} request CreateDataTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|listDataTables}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef ListDataTablesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.ListDataTablesResponse} [response] ListDataTablesResponse + */ + + /** + * Calls ListDataTables. + * @function listDataTables + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IListDataTablesRequest} request ListDataTablesRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.ListDataTablesCallback} callback Node-style callback called with the error, if any, and ListDataTablesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.listDataTables = function listDataTables(request, callback) { + return this.rpcCall(listDataTables, $root.google.cloud.chronicle.v1.ListDataTablesRequest, $root.google.cloud.chronicle.v1.ListDataTablesResponse, request, callback); + }, "name", { value: "ListDataTables" }); + + /** + * Calls ListDataTables. + * @function listDataTables + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IListDataTablesRequest} request ListDataTablesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|getDataTable}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef GetDataTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.DataTable} [response] DataTable + */ + + /** + * Calls GetDataTable. + * @function getDataTable + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IGetDataTableRequest} request GetDataTableRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.GetDataTableCallback} callback Node-style callback called with the error, if any, and DataTable + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.getDataTable = function getDataTable(request, callback) { + return this.rpcCall(getDataTable, $root.google.cloud.chronicle.v1.GetDataTableRequest, $root.google.cloud.chronicle.v1.DataTable, request, callback); + }, "name", { value: "GetDataTable" }); + + /** + * Calls GetDataTable. + * @function getDataTable + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IGetDataTableRequest} request GetDataTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|updateDataTable}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef UpdateDataTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.DataTable} [response] DataTable + */ + + /** + * Calls UpdateDataTable. + * @function updateDataTable + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IUpdateDataTableRequest} request UpdateDataTableRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.UpdateDataTableCallback} callback Node-style callback called with the error, if any, and DataTable + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.updateDataTable = function updateDataTable(request, callback) { + return this.rpcCall(updateDataTable, $root.google.cloud.chronicle.v1.UpdateDataTableRequest, $root.google.cloud.chronicle.v1.DataTable, request, callback); + }, "name", { value: "UpdateDataTable" }); + + /** + * Calls UpdateDataTable. + * @function updateDataTable + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IUpdateDataTableRequest} request UpdateDataTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|deleteDataTable}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef DeleteDataTableCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDataTable. + * @function deleteDataTable + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IDeleteDataTableRequest} request DeleteDataTableRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.DeleteDataTableCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.deleteDataTable = function deleteDataTable(request, callback) { + return this.rpcCall(deleteDataTable, $root.google.cloud.chronicle.v1.DeleteDataTableRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDataTable" }); + + /** + * Calls DeleteDataTable. + * @function deleteDataTable + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IDeleteDataTableRequest} request DeleteDataTableRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|createDataTableRow}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef CreateDataTableRowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.DataTableRow} [response] DataTableRow + */ + + /** + * Calls CreateDataTableRow. + * @function createDataTableRow + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.ICreateDataTableRowRequest} request CreateDataTableRowRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.CreateDataTableRowCallback} callback Node-style callback called with the error, if any, and DataTableRow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.createDataTableRow = function createDataTableRow(request, callback) { + return this.rpcCall(createDataTableRow, $root.google.cloud.chronicle.v1.CreateDataTableRowRequest, $root.google.cloud.chronicle.v1.DataTableRow, request, callback); + }, "name", { value: "CreateDataTableRow" }); + + /** + * Calls CreateDataTableRow. + * @function createDataTableRow + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.ICreateDataTableRowRequest} request CreateDataTableRowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|updateDataTableRow}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef UpdateDataTableRowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.DataTableRow} [response] DataTableRow + */ + + /** + * Calls UpdateDataTableRow. + * @function updateDataTableRow + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IUpdateDataTableRowRequest} request UpdateDataTableRowRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.UpdateDataTableRowCallback} callback Node-style callback called with the error, if any, and DataTableRow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.updateDataTableRow = function updateDataTableRow(request, callback) { + return this.rpcCall(updateDataTableRow, $root.google.cloud.chronicle.v1.UpdateDataTableRowRequest, $root.google.cloud.chronicle.v1.DataTableRow, request, callback); + }, "name", { value: "UpdateDataTableRow" }); + + /** + * Calls UpdateDataTableRow. + * @function updateDataTableRow + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IUpdateDataTableRowRequest} request UpdateDataTableRowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|listDataTableRows}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef ListDataTableRowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.ListDataTableRowsResponse} [response] ListDataTableRowsResponse + */ + + /** + * Calls ListDataTableRows. + * @function listDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IListDataTableRowsRequest} request ListDataTableRowsRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.ListDataTableRowsCallback} callback Node-style callback called with the error, if any, and ListDataTableRowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.listDataTableRows = function listDataTableRows(request, callback) { + return this.rpcCall(listDataTableRows, $root.google.cloud.chronicle.v1.ListDataTableRowsRequest, $root.google.cloud.chronicle.v1.ListDataTableRowsResponse, request, callback); + }, "name", { value: "ListDataTableRows" }); + + /** + * Calls ListDataTableRows. + * @function listDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IListDataTableRowsRequest} request ListDataTableRowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|getDataTableRow}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef GetDataTableRowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.DataTableRow} [response] DataTableRow + */ + + /** + * Calls GetDataTableRow. + * @function getDataTableRow + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IGetDataTableRowRequest} request GetDataTableRowRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.GetDataTableRowCallback} callback Node-style callback called with the error, if any, and DataTableRow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.getDataTableRow = function getDataTableRow(request, callback) { + return this.rpcCall(getDataTableRow, $root.google.cloud.chronicle.v1.GetDataTableRowRequest, $root.google.cloud.chronicle.v1.DataTableRow, request, callback); + }, "name", { value: "GetDataTableRow" }); + + /** + * Calls GetDataTableRow. + * @function getDataTableRow + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IGetDataTableRowRequest} request GetDataTableRowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|deleteDataTableRow}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef DeleteDataTableRowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDataTableRow. + * @function deleteDataTableRow + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IDeleteDataTableRowRequest} request DeleteDataTableRowRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.DeleteDataTableRowCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.deleteDataTableRow = function deleteDataTableRow(request, callback) { + return this.rpcCall(deleteDataTableRow, $root.google.cloud.chronicle.v1.DeleteDataTableRowRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDataTableRow" }); + + /** + * Calls DeleteDataTableRow. + * @function deleteDataTableRow + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IDeleteDataTableRowRequest} request DeleteDataTableRowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|bulkCreateDataTableRows}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef BulkCreateDataTableRowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse} [response] BulkCreateDataTableRowsResponse + */ + + /** + * Calls BulkCreateDataTableRows. + * @function bulkCreateDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest} request BulkCreateDataTableRowsRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.BulkCreateDataTableRowsCallback} callback Node-style callback called with the error, if any, and BulkCreateDataTableRowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.bulkCreateDataTableRows = function bulkCreateDataTableRows(request, callback) { + return this.rpcCall(bulkCreateDataTableRows, $root.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest, $root.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse, request, callback); + }, "name", { value: "BulkCreateDataTableRows" }); + + /** + * Calls BulkCreateDataTableRows. + * @function bulkCreateDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest} request BulkCreateDataTableRowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|bulkGetDataTableRows}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef BulkGetDataTableRowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.BulkGetDataTableRowsResponse} [response] BulkGetDataTableRowsResponse + */ + + /** + * Calls BulkGetDataTableRows. + * @function bulkGetDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest} request BulkGetDataTableRowsRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.BulkGetDataTableRowsCallback} callback Node-style callback called with the error, if any, and BulkGetDataTableRowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.bulkGetDataTableRows = function bulkGetDataTableRows(request, callback) { + return this.rpcCall(bulkGetDataTableRows, $root.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest, $root.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse, request, callback); + }, "name", { value: "BulkGetDataTableRows" }); + + /** + * Calls BulkGetDataTableRows. + * @function bulkGetDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest} request BulkGetDataTableRowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|bulkReplaceDataTableRows}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef BulkReplaceDataTableRowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse} [response] BulkReplaceDataTableRowsResponse + */ + + /** + * Calls BulkReplaceDataTableRows. + * @function bulkReplaceDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest} request BulkReplaceDataTableRowsRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.BulkReplaceDataTableRowsCallback} callback Node-style callback called with the error, if any, and BulkReplaceDataTableRowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.bulkReplaceDataTableRows = function bulkReplaceDataTableRows(request, callback) { + return this.rpcCall(bulkReplaceDataTableRows, $root.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest, $root.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse, request, callback); + }, "name", { value: "BulkReplaceDataTableRows" }); + + /** + * Calls BulkReplaceDataTableRows. + * @function bulkReplaceDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest} request BulkReplaceDataTableRowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|bulkUpdateDataTableRows}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef BulkUpdateDataTableRowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse} [response] BulkUpdateDataTableRowsResponse + */ + + /** + * Calls BulkUpdateDataTableRows. + * @function bulkUpdateDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest} request BulkUpdateDataTableRowsRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.BulkUpdateDataTableRowsCallback} callback Node-style callback called with the error, if any, and BulkUpdateDataTableRowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.bulkUpdateDataTableRows = function bulkUpdateDataTableRows(request, callback) { + return this.rpcCall(bulkUpdateDataTableRows, $root.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest, $root.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse, request, callback); + }, "name", { value: "BulkUpdateDataTableRows" }); + + /** + * Calls BulkUpdateDataTableRows. + * @function bulkUpdateDataTableRows + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest} request BulkUpdateDataTableRowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.chronicle.v1.DataTableService|getDataTableOperationErrors}. + * @memberof google.cloud.chronicle.v1.DataTableService + * @typedef GetDataTableOperationErrorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.chronicle.v1.DataTableOperationErrors} [response] DataTableOperationErrors + */ + + /** + * Calls GetDataTableOperationErrors. + * @function getDataTableOperationErrors + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest} request GetDataTableOperationErrorsRequest message or plain object + * @param {google.cloud.chronicle.v1.DataTableService.GetDataTableOperationErrorsCallback} callback Node-style callback called with the error, if any, and DataTableOperationErrors + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTableService.prototype.getDataTableOperationErrors = function getDataTableOperationErrors(request, callback) { + return this.rpcCall(getDataTableOperationErrors, $root.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest, $root.google.cloud.chronicle.v1.DataTableOperationErrors, request, callback); + }, "name", { value: "GetDataTableOperationErrors" }); + + /** + * Calls GetDataTableOperationErrors. + * @function getDataTableOperationErrors + * @memberof google.cloud.chronicle.v1.DataTableService + * @instance + * @param {google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest} request GetDataTableOperationErrorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataTableService; + })(); + + /** + * DataTableUpdateSource enum. + * @name google.cloud.chronicle.v1.DataTableUpdateSource + * @enum {number} + * @property {number} DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED=0 DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED value + * @property {number} USER=1 USER value + * @property {number} RULE=2 RULE value + * @property {number} SEARCH=3 SEARCH value + */ + v1.DataTableUpdateSource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER"] = 1; + values[valuesById[2] = "RULE"] = 2; + values[valuesById[3] = "SEARCH"] = 3; + return values; + })(); + + v1.CreateDataTableRequest = (function() { + + /** + * Properties of a CreateDataTableRequest. + * @memberof google.cloud.chronicle.v1 + * @interface ICreateDataTableRequest + * @property {string|null} [parent] CreateDataTableRequest parent + * @property {google.cloud.chronicle.v1.IDataTable|null} [dataTable] CreateDataTableRequest dataTable + * @property {string|null} [dataTableId] CreateDataTableRequest dataTableId + */ + + /** + * Constructs a new CreateDataTableRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a CreateDataTableRequest. + * @implements ICreateDataTableRequest + * @constructor + * @param {google.cloud.chronicle.v1.ICreateDataTableRequest=} [properties] Properties to set + */ + function CreateDataTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataTableRequest parent. + * @member {string} parent + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @instance + */ + CreateDataTableRequest.prototype.parent = ""; + + /** + * CreateDataTableRequest dataTable. + * @member {google.cloud.chronicle.v1.IDataTable|null|undefined} dataTable + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @instance + */ + CreateDataTableRequest.prototype.dataTable = null; + + /** + * CreateDataTableRequest dataTableId. + * @member {string} dataTableId + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @instance + */ + CreateDataTableRequest.prototype.dataTableId = ""; + + /** + * Creates a new CreateDataTableRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.ICreateDataTableRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.CreateDataTableRequest} CreateDataTableRequest instance + */ + CreateDataTableRequest.create = function create(properties) { + return new CreateDataTableRequest(properties); + }; + + /** + * Encodes the specified CreateDataTableRequest message. Does not implicitly {@link google.cloud.chronicle.v1.CreateDataTableRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.ICreateDataTableRequest} message CreateDataTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataTableRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.dataTable != null && Object.hasOwnProperty.call(message, "dataTable")) + $root.google.cloud.chronicle.v1.DataTable.encode(message.dataTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dataTableId != null && Object.hasOwnProperty.call(message, "dataTableId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dataTableId); + return writer; + }; + + /** + * Encodes the specified CreateDataTableRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.CreateDataTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.ICreateDataTableRequest} message CreateDataTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.CreateDataTableRequest} CreateDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataTableRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.CreateDataTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataTable = $root.google.cloud.chronicle.v1.DataTable.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dataTableId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.CreateDataTableRequest} CreateDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataTableRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataTableRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.dataTable != null && message.hasOwnProperty("dataTable")) { + var error = $root.google.cloud.chronicle.v1.DataTable.verify(message.dataTable); + if (error) + return "dataTable." + error; + } + if (message.dataTableId != null && message.hasOwnProperty("dataTableId")) + if (!$util.isString(message.dataTableId)) + return "dataTableId: string expected"; + return null; + }; + + /** + * Creates a CreateDataTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.CreateDataTableRequest} CreateDataTableRequest + */ + CreateDataTableRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.CreateDataTableRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.CreateDataTableRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataTable != null) { + if (typeof object.dataTable !== "object") + throw TypeError(".google.cloud.chronicle.v1.CreateDataTableRequest.dataTable: object expected"); + message.dataTable = $root.google.cloud.chronicle.v1.DataTable.fromObject(object.dataTable); + } + if (object.dataTableId != null) + message.dataTableId = String(object.dataTableId); + return message; + }; + + /** + * Creates a plain object from a CreateDataTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.CreateDataTableRequest} message CreateDataTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataTableRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataTable = null; + object.dataTableId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataTable != null && message.hasOwnProperty("dataTable")) + object.dataTable = $root.google.cloud.chronicle.v1.DataTable.toObject(message.dataTable, options); + if (message.dataTableId != null && message.hasOwnProperty("dataTableId")) + object.dataTableId = message.dataTableId; + return object; + }; + + /** + * Converts this CreateDataTableRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataTableRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.CreateDataTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.CreateDataTableRequest"; + }; + + return CreateDataTableRequest; + })(); + + v1.GetDataTableRequest = (function() { + + /** + * Properties of a GetDataTableRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IGetDataTableRequest + * @property {string|null} [name] GetDataTableRequest name + */ + + /** + * Constructs a new GetDataTableRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a GetDataTableRequest. + * @implements IGetDataTableRequest + * @constructor + * @param {google.cloud.chronicle.v1.IGetDataTableRequest=} [properties] Properties to set + */ + function GetDataTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataTableRequest name. + * @member {string} name + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @instance + */ + GetDataTableRequest.prototype.name = ""; + + /** + * Creates a new GetDataTableRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.IGetDataTableRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.GetDataTableRequest} GetDataTableRequest instance + */ + GetDataTableRequest.create = function create(properties) { + return new GetDataTableRequest(properties); + }; + + /** + * Encodes the specified GetDataTableRequest message. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.IGetDataTableRequest} message GetDataTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataTableRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDataTableRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.IGetDataTableRequest} message GetDataTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.GetDataTableRequest} GetDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataTableRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.GetDataTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.GetDataTableRequest} GetDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataTableRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataTableRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetDataTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.GetDataTableRequest} GetDataTableRequest + */ + GetDataTableRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.GetDataTableRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.GetDataTableRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.GetDataTableRequest} message GetDataTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataTableRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetDataTableRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataTableRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.GetDataTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.GetDataTableRequest"; + }; + + return GetDataTableRequest; + })(); + + v1.UpdateDataTableRequest = (function() { + + /** + * Properties of an UpdateDataTableRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IUpdateDataTableRequest + * @property {google.cloud.chronicle.v1.IDataTable|null} [dataTable] UpdateDataTableRequest dataTable + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataTableRequest updateMask + */ + + /** + * Constructs a new UpdateDataTableRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents an UpdateDataTableRequest. + * @implements IUpdateDataTableRequest + * @constructor + * @param {google.cloud.chronicle.v1.IUpdateDataTableRequest=} [properties] Properties to set + */ + function UpdateDataTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataTableRequest dataTable. + * @member {google.cloud.chronicle.v1.IDataTable|null|undefined} dataTable + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @instance + */ + UpdateDataTableRequest.prototype.dataTable = null; + + /** + * UpdateDataTableRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @instance + */ + UpdateDataTableRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDataTableRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.IUpdateDataTableRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.UpdateDataTableRequest} UpdateDataTableRequest instance + */ + UpdateDataTableRequest.create = function create(properties) { + return new UpdateDataTableRequest(properties); + }; + + /** + * Encodes the specified UpdateDataTableRequest message. Does not implicitly {@link google.cloud.chronicle.v1.UpdateDataTableRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.IUpdateDataTableRequest} message UpdateDataTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataTableRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataTable != null && Object.hasOwnProperty.call(message, "dataTable")) + $root.google.cloud.chronicle.v1.DataTable.encode(message.dataTable, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateDataTableRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.UpdateDataTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.IUpdateDataTableRequest} message UpdateDataTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.UpdateDataTableRequest} UpdateDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataTableRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.UpdateDataTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataTable = $root.google.cloud.chronicle.v1.DataTable.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.UpdateDataTableRequest} UpdateDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataTableRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataTableRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataTable != null && message.hasOwnProperty("dataTable")) { + var error = $root.google.cloud.chronicle.v1.DataTable.verify(message.dataTable); + if (error) + return "dataTable." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateDataTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.UpdateDataTableRequest} UpdateDataTableRequest + */ + UpdateDataTableRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.UpdateDataTableRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.UpdateDataTableRequest(); + if (object.dataTable != null) { + if (typeof object.dataTable !== "object") + throw TypeError(".google.cloud.chronicle.v1.UpdateDataTableRequest.dataTable: object expected"); + message.dataTable = $root.google.cloud.chronicle.v1.DataTable.fromObject(object.dataTable); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.chronicle.v1.UpdateDataTableRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDataTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.UpdateDataTableRequest} message UpdateDataTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataTableRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataTable = null; + object.updateMask = null; + } + if (message.dataTable != null && message.hasOwnProperty("dataTable")) + object.dataTable = $root.google.cloud.chronicle.v1.DataTable.toObject(message.dataTable, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDataTableRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataTableRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.UpdateDataTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.UpdateDataTableRequest"; + }; + + return UpdateDataTableRequest; + })(); + + v1.ListDataTablesRequest = (function() { + + /** + * Properties of a ListDataTablesRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IListDataTablesRequest + * @property {string|null} [parent] ListDataTablesRequest parent + * @property {number|null} [pageSize] ListDataTablesRequest pageSize + * @property {string|null} [pageToken] ListDataTablesRequest pageToken + * @property {string|null} [orderBy] ListDataTablesRequest orderBy + */ + + /** + * Constructs a new ListDataTablesRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a ListDataTablesRequest. + * @implements IListDataTablesRequest + * @constructor + * @param {google.cloud.chronicle.v1.IListDataTablesRequest=} [properties] Properties to set + */ + function ListDataTablesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataTablesRequest parent. + * @member {string} parent + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @instance + */ + ListDataTablesRequest.prototype.parent = ""; + + /** + * ListDataTablesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @instance + */ + ListDataTablesRequest.prototype.pageSize = 0; + + /** + * ListDataTablesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @instance + */ + ListDataTablesRequest.prototype.pageToken = ""; + + /** + * ListDataTablesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @instance + */ + ListDataTablesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataTablesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @static + * @param {google.cloud.chronicle.v1.IListDataTablesRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.ListDataTablesRequest} ListDataTablesRequest instance + */ + ListDataTablesRequest.create = function create(properties) { + return new ListDataTablesRequest(properties); + }; + + /** + * Encodes the specified ListDataTablesRequest message. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTablesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @static + * @param {google.cloud.chronicle.v1.IListDataTablesRequest} message ListDataTablesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTablesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDataTablesRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTablesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @static + * @param {google.cloud.chronicle.v1.IListDataTablesRequest} message ListDataTablesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTablesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataTablesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.ListDataTablesRequest} ListDataTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTablesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.ListDataTablesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataTablesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.ListDataTablesRequest} ListDataTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTablesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataTablesRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataTablesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDataTablesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.ListDataTablesRequest} ListDataTablesRequest + */ + ListDataTablesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.ListDataTablesRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.ListDataTablesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDataTablesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @static + * @param {google.cloud.chronicle.v1.ListDataTablesRequest} message ListDataTablesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataTablesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDataTablesRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataTablesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataTablesRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.ListDataTablesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataTablesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.ListDataTablesRequest"; + }; + + return ListDataTablesRequest; + })(); + + v1.DeleteDataTableRequest = (function() { + + /** + * Properties of a DeleteDataTableRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IDeleteDataTableRequest + * @property {string|null} [name] DeleteDataTableRequest name + * @property {boolean|null} [force] DeleteDataTableRequest force + */ + + /** + * Constructs a new DeleteDataTableRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a DeleteDataTableRequest. + * @implements IDeleteDataTableRequest + * @constructor + * @param {google.cloud.chronicle.v1.IDeleteDataTableRequest=} [properties] Properties to set + */ + function DeleteDataTableRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataTableRequest name. + * @member {string} name + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @instance + */ + DeleteDataTableRequest.prototype.name = ""; + + /** + * DeleteDataTableRequest force. + * @member {boolean} force + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @instance + */ + DeleteDataTableRequest.prototype.force = false; + + /** + * Creates a new DeleteDataTableRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.IDeleteDataTableRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.DeleteDataTableRequest} DeleteDataTableRequest instance + */ + DeleteDataTableRequest.create = function create(properties) { + return new DeleteDataTableRequest(properties); + }; + + /** + * Encodes the specified DeleteDataTableRequest message. Does not implicitly {@link google.cloud.chronicle.v1.DeleteDataTableRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.IDeleteDataTableRequest} message DeleteDataTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataTableRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteDataTableRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DeleteDataTableRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.IDeleteDataTableRequest} message DeleteDataTableRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataTableRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataTableRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.DeleteDataTableRequest} DeleteDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataTableRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.DeleteDataTableRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataTableRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.DeleteDataTableRequest} DeleteDataTableRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataTableRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataTableRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataTableRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteDataTableRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.DeleteDataTableRequest} DeleteDataTableRequest + */ + DeleteDataTableRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.DeleteDataTableRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.DeleteDataTableRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteDataTableRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @static + * @param {google.cloud.chronicle.v1.DeleteDataTableRequest} message DeleteDataTableRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataTableRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteDataTableRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataTableRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataTableRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.DeleteDataTableRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataTableRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.DeleteDataTableRequest"; + }; + + return DeleteDataTableRequest; + })(); + + v1.ListDataTablesResponse = (function() { + + /** + * Properties of a ListDataTablesResponse. + * @memberof google.cloud.chronicle.v1 + * @interface IListDataTablesResponse + * @property {Array.|null} [dataTables] ListDataTablesResponse dataTables + * @property {string|null} [nextPageToken] ListDataTablesResponse nextPageToken + */ + + /** + * Constructs a new ListDataTablesResponse. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a ListDataTablesResponse. + * @implements IListDataTablesResponse + * @constructor + * @param {google.cloud.chronicle.v1.IListDataTablesResponse=} [properties] Properties to set + */ + function ListDataTablesResponse(properties) { + this.dataTables = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataTablesResponse dataTables. + * @member {Array.} dataTables + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @instance + */ + ListDataTablesResponse.prototype.dataTables = $util.emptyArray; + + /** + * ListDataTablesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @instance + */ + ListDataTablesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDataTablesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @static + * @param {google.cloud.chronicle.v1.IListDataTablesResponse=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.ListDataTablesResponse} ListDataTablesResponse instance + */ + ListDataTablesResponse.create = function create(properties) { + return new ListDataTablesResponse(properties); + }; + + /** + * Encodes the specified ListDataTablesResponse message. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTablesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @static + * @param {google.cloud.chronicle.v1.IListDataTablesResponse} message ListDataTablesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTablesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataTables != null && message.dataTables.length) + for (var i = 0; i < message.dataTables.length; ++i) + $root.google.cloud.chronicle.v1.DataTable.encode(message.dataTables[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListDataTablesResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTablesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @static + * @param {google.cloud.chronicle.v1.IListDataTablesResponse} message ListDataTablesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTablesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataTablesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.ListDataTablesResponse} ListDataTablesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTablesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.ListDataTablesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataTables && message.dataTables.length)) + message.dataTables = []; + message.dataTables.push($root.google.cloud.chronicle.v1.DataTable.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataTablesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.ListDataTablesResponse} ListDataTablesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTablesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataTablesResponse message. + * @function verify + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataTablesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataTables != null && message.hasOwnProperty("dataTables")) { + if (!Array.isArray(message.dataTables)) + return "dataTables: array expected"; + for (var i = 0; i < message.dataTables.length; ++i) { + var error = $root.google.cloud.chronicle.v1.DataTable.verify(message.dataTables[i]); + if (error) + return "dataTables." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataTablesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.ListDataTablesResponse} ListDataTablesResponse + */ + ListDataTablesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.ListDataTablesResponse) + return object; + var message = new $root.google.cloud.chronicle.v1.ListDataTablesResponse(); + if (object.dataTables) { + if (!Array.isArray(object.dataTables)) + throw TypeError(".google.cloud.chronicle.v1.ListDataTablesResponse.dataTables: array expected"); + message.dataTables = []; + for (var i = 0; i < object.dataTables.length; ++i) { + if (typeof object.dataTables[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.ListDataTablesResponse.dataTables: object expected"); + message.dataTables[i] = $root.google.cloud.chronicle.v1.DataTable.fromObject(object.dataTables[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataTablesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @static + * @param {google.cloud.chronicle.v1.ListDataTablesResponse} message ListDataTablesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataTablesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataTables = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dataTables && message.dataTables.length) { + object.dataTables = []; + for (var j = 0; j < message.dataTables.length; ++j) + object.dataTables[j] = $root.google.cloud.chronicle.v1.DataTable.toObject(message.dataTables[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDataTablesResponse to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataTablesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataTablesResponse + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.ListDataTablesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataTablesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.ListDataTablesResponse"; + }; + + return ListDataTablesResponse; + })(); + + v1.CreateDataTableRowRequest = (function() { + + /** + * Properties of a CreateDataTableRowRequest. + * @memberof google.cloud.chronicle.v1 + * @interface ICreateDataTableRowRequest + * @property {string|null} [parent] CreateDataTableRowRequest parent + * @property {google.cloud.chronicle.v1.IDataTableRow|null} [dataTableRow] CreateDataTableRowRequest dataTableRow + */ + + /** + * Constructs a new CreateDataTableRowRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a CreateDataTableRowRequest. + * @implements ICreateDataTableRowRequest + * @constructor + * @param {google.cloud.chronicle.v1.ICreateDataTableRowRequest=} [properties] Properties to set + */ + function CreateDataTableRowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataTableRowRequest parent. + * @member {string} parent + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @instance + */ + CreateDataTableRowRequest.prototype.parent = ""; + + /** + * CreateDataTableRowRequest dataTableRow. + * @member {google.cloud.chronicle.v1.IDataTableRow|null|undefined} dataTableRow + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @instance + */ + CreateDataTableRowRequest.prototype.dataTableRow = null; + + /** + * Creates a new CreateDataTableRowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.ICreateDataTableRowRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.CreateDataTableRowRequest} CreateDataTableRowRequest instance + */ + CreateDataTableRowRequest.create = function create(properties) { + return new CreateDataTableRowRequest(properties); + }; + + /** + * Encodes the specified CreateDataTableRowRequest message. Does not implicitly {@link google.cloud.chronicle.v1.CreateDataTableRowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.ICreateDataTableRowRequest} message CreateDataTableRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataTableRowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.dataTableRow != null && Object.hasOwnProperty.call(message, "dataTableRow")) + $root.google.cloud.chronicle.v1.DataTableRow.encode(message.dataTableRow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateDataTableRowRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.CreateDataTableRowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.ICreateDataTableRowRequest} message CreateDataTableRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataTableRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataTableRowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.CreateDataTableRowRequest} CreateDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataTableRowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.CreateDataTableRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataTableRow = $root.google.cloud.chronicle.v1.DataTableRow.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataTableRowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.CreateDataTableRowRequest} CreateDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataTableRowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataTableRowRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataTableRowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.dataTableRow != null && message.hasOwnProperty("dataTableRow")) { + var error = $root.google.cloud.chronicle.v1.DataTableRow.verify(message.dataTableRow); + if (error) + return "dataTableRow." + error; + } + return null; + }; + + /** + * Creates a CreateDataTableRowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.CreateDataTableRowRequest} CreateDataTableRowRequest + */ + CreateDataTableRowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.CreateDataTableRowRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.CreateDataTableRowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataTableRow != null) { + if (typeof object.dataTableRow !== "object") + throw TypeError(".google.cloud.chronicle.v1.CreateDataTableRowRequest.dataTableRow: object expected"); + message.dataTableRow = $root.google.cloud.chronicle.v1.DataTableRow.fromObject(object.dataTableRow); + } + return message; + }; + + /** + * Creates a plain object from a CreateDataTableRowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.CreateDataTableRowRequest} message CreateDataTableRowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataTableRowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataTableRow = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataTableRow != null && message.hasOwnProperty("dataTableRow")) + object.dataTableRow = $root.google.cloud.chronicle.v1.DataTableRow.toObject(message.dataTableRow, options); + return object; + }; + + /** + * Converts this CreateDataTableRowRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataTableRowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataTableRowRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.CreateDataTableRowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataTableRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.CreateDataTableRowRequest"; + }; + + return CreateDataTableRowRequest; + })(); + + v1.UpdateDataTableRowRequest = (function() { + + /** + * Properties of an UpdateDataTableRowRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IUpdateDataTableRowRequest + * @property {google.cloud.chronicle.v1.IDataTableRow|null} [dataTableRow] UpdateDataTableRowRequest dataTableRow + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataTableRowRequest updateMask + */ + + /** + * Constructs a new UpdateDataTableRowRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents an UpdateDataTableRowRequest. + * @implements IUpdateDataTableRowRequest + * @constructor + * @param {google.cloud.chronicle.v1.IUpdateDataTableRowRequest=} [properties] Properties to set + */ + function UpdateDataTableRowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataTableRowRequest dataTableRow. + * @member {google.cloud.chronicle.v1.IDataTableRow|null|undefined} dataTableRow + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @instance + */ + UpdateDataTableRowRequest.prototype.dataTableRow = null; + + /** + * UpdateDataTableRowRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @instance + */ + UpdateDataTableRowRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDataTableRowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.IUpdateDataTableRowRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.UpdateDataTableRowRequest} UpdateDataTableRowRequest instance + */ + UpdateDataTableRowRequest.create = function create(properties) { + return new UpdateDataTableRowRequest(properties); + }; + + /** + * Encodes the specified UpdateDataTableRowRequest message. Does not implicitly {@link google.cloud.chronicle.v1.UpdateDataTableRowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.IUpdateDataTableRowRequest} message UpdateDataTableRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataTableRowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataTableRow != null && Object.hasOwnProperty.call(message, "dataTableRow")) + $root.google.cloud.chronicle.v1.DataTableRow.encode(message.dataTableRow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateDataTableRowRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.UpdateDataTableRowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.IUpdateDataTableRowRequest} message UpdateDataTableRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataTableRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataTableRowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.UpdateDataTableRowRequest} UpdateDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataTableRowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.UpdateDataTableRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataTableRow = $root.google.cloud.chronicle.v1.DataTableRow.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataTableRowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.UpdateDataTableRowRequest} UpdateDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataTableRowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataTableRowRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataTableRowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataTableRow != null && message.hasOwnProperty("dataTableRow")) { + var error = $root.google.cloud.chronicle.v1.DataTableRow.verify(message.dataTableRow); + if (error) + return "dataTableRow." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateDataTableRowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.UpdateDataTableRowRequest} UpdateDataTableRowRequest + */ + UpdateDataTableRowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.UpdateDataTableRowRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.UpdateDataTableRowRequest(); + if (object.dataTableRow != null) { + if (typeof object.dataTableRow !== "object") + throw TypeError(".google.cloud.chronicle.v1.UpdateDataTableRowRequest.dataTableRow: object expected"); + message.dataTableRow = $root.google.cloud.chronicle.v1.DataTableRow.fromObject(object.dataTableRow); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.chronicle.v1.UpdateDataTableRowRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDataTableRowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.UpdateDataTableRowRequest} message UpdateDataTableRowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataTableRowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataTableRow = null; + object.updateMask = null; + } + if (message.dataTableRow != null && message.hasOwnProperty("dataTableRow")) + object.dataTableRow = $root.google.cloud.chronicle.v1.DataTableRow.toObject(message.dataTableRow, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDataTableRowRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataTableRowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataTableRowRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.UpdateDataTableRowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataTableRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.UpdateDataTableRowRequest"; + }; + + return UpdateDataTableRowRequest; + })(); + + v1.ListDataTableRowsRequest = (function() { + + /** + * Properties of a ListDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IListDataTableRowsRequest + * @property {string|null} [parent] ListDataTableRowsRequest parent + * @property {number|null} [pageSize] ListDataTableRowsRequest pageSize + * @property {string|null} [pageToken] ListDataTableRowsRequest pageToken + * @property {string|null} [orderBy] ListDataTableRowsRequest orderBy + * @property {string|null} [filter] ListDataTableRowsRequest filter + */ + + /** + * Constructs a new ListDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a ListDataTableRowsRequest. + * @implements IListDataTableRowsRequest + * @constructor + * @param {google.cloud.chronicle.v1.IListDataTableRowsRequest=} [properties] Properties to set + */ + function ListDataTableRowsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataTableRowsRequest parent. + * @member {string} parent + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @instance + */ + ListDataTableRowsRequest.prototype.parent = ""; + + /** + * ListDataTableRowsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @instance + */ + ListDataTableRowsRequest.prototype.pageSize = 0; + + /** + * ListDataTableRowsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @instance + */ + ListDataTableRowsRequest.prototype.pageToken = ""; + + /** + * ListDataTableRowsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @instance + */ + ListDataTableRowsRequest.prototype.orderBy = ""; + + /** + * ListDataTableRowsRequest filter. + * @member {string} filter + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @instance + */ + ListDataTableRowsRequest.prototype.filter = ""; + + /** + * Creates a new ListDataTableRowsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IListDataTableRowsRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.ListDataTableRowsRequest} ListDataTableRowsRequest instance + */ + ListDataTableRowsRequest.create = function create(properties) { + return new ListDataTableRowsRequest(properties); + }; + + /** + * Encodes the specified ListDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTableRowsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IListDataTableRowsRequest} message ListDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTableRowsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTableRowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IListDataTableRowsRequest} message ListDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTableRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataTableRowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.ListDataTableRowsRequest} ListDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTableRowsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.ListDataTableRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.ListDataTableRowsRequest} ListDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTableRowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataTableRowsRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataTableRowsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.ListDataTableRowsRequest} ListDataTableRowsRequest + */ + ListDataTableRowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.ListDataTableRowsRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.ListDataTableRowsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListDataTableRowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.ListDataTableRowsRequest} message ListDataTableRowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataTableRowsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListDataTableRowsRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataTableRowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataTableRowsRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.ListDataTableRowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataTableRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.ListDataTableRowsRequest"; + }; + + return ListDataTableRowsRequest; + })(); + + v1.ListDataTableRowsResponse = (function() { + + /** + * Properties of a ListDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @interface IListDataTableRowsResponse + * @property {Array.|null} [dataTableRows] ListDataTableRowsResponse dataTableRows + * @property {string|null} [nextPageToken] ListDataTableRowsResponse nextPageToken + */ + + /** + * Constructs a new ListDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a ListDataTableRowsResponse. + * @implements IListDataTableRowsResponse + * @constructor + * @param {google.cloud.chronicle.v1.IListDataTableRowsResponse=} [properties] Properties to set + */ + function ListDataTableRowsResponse(properties) { + this.dataTableRows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataTableRowsResponse dataTableRows. + * @member {Array.} dataTableRows + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @instance + */ + ListDataTableRowsResponse.prototype.dataTableRows = $util.emptyArray; + + /** + * ListDataTableRowsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @instance + */ + ListDataTableRowsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDataTableRowsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IListDataTableRowsResponse=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.ListDataTableRowsResponse} ListDataTableRowsResponse instance + */ + ListDataTableRowsResponse.create = function create(properties) { + return new ListDataTableRowsResponse(properties); + }; + + /** + * Encodes the specified ListDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTableRowsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IListDataTableRowsResponse} message ListDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTableRowsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataTableRows != null && message.dataTableRows.length) + for (var i = 0; i < message.dataTableRows.length; ++i) + $root.google.cloud.chronicle.v1.DataTableRow.encode(message.dataTableRows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.ListDataTableRowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IListDataTableRowsResponse} message ListDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTableRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataTableRowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.ListDataTableRowsResponse} ListDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTableRowsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.ListDataTableRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataTableRows && message.dataTableRows.length)) + message.dataTableRows = []; + message.dataTableRows.push($root.google.cloud.chronicle.v1.DataTableRow.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.ListDataTableRowsResponse} ListDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTableRowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataTableRowsResponse message. + * @function verify + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataTableRowsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataTableRows != null && message.hasOwnProperty("dataTableRows")) { + if (!Array.isArray(message.dataTableRows)) + return "dataTableRows: array expected"; + for (var i = 0; i < message.dataTableRows.length; ++i) { + var error = $root.google.cloud.chronicle.v1.DataTableRow.verify(message.dataTableRows[i]); + if (error) + return "dataTableRows." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.ListDataTableRowsResponse} ListDataTableRowsResponse + */ + ListDataTableRowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.ListDataTableRowsResponse) + return object; + var message = new $root.google.cloud.chronicle.v1.ListDataTableRowsResponse(); + if (object.dataTableRows) { + if (!Array.isArray(object.dataTableRows)) + throw TypeError(".google.cloud.chronicle.v1.ListDataTableRowsResponse.dataTableRows: array expected"); + message.dataTableRows = []; + for (var i = 0; i < object.dataTableRows.length; ++i) { + if (typeof object.dataTableRows[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.ListDataTableRowsResponse.dataTableRows: object expected"); + message.dataTableRows[i] = $root.google.cloud.chronicle.v1.DataTableRow.fromObject(object.dataTableRows[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataTableRowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.ListDataTableRowsResponse} message ListDataTableRowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataTableRowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataTableRows = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dataTableRows && message.dataTableRows.length) { + object.dataTableRows = []; + for (var j = 0; j < message.dataTableRows.length; ++j) + object.dataTableRows[j] = $root.google.cloud.chronicle.v1.DataTableRow.toObject(message.dataTableRows[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDataTableRowsResponse to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataTableRowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataTableRowsResponse + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.ListDataTableRowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataTableRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.ListDataTableRowsResponse"; + }; + + return ListDataTableRowsResponse; + })(); + + v1.GetDataTableRowRequest = (function() { + + /** + * Properties of a GetDataTableRowRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IGetDataTableRowRequest + * @property {string|null} [name] GetDataTableRowRequest name + */ + + /** + * Constructs a new GetDataTableRowRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a GetDataTableRowRequest. + * @implements IGetDataTableRowRequest + * @constructor + * @param {google.cloud.chronicle.v1.IGetDataTableRowRequest=} [properties] Properties to set + */ + function GetDataTableRowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataTableRowRequest name. + * @member {string} name + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @instance + */ + GetDataTableRowRequest.prototype.name = ""; + + /** + * Creates a new GetDataTableRowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.IGetDataTableRowRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.GetDataTableRowRequest} GetDataTableRowRequest instance + */ + GetDataTableRowRequest.create = function create(properties) { + return new GetDataTableRowRequest(properties); + }; + + /** + * Encodes the specified GetDataTableRowRequest message. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableRowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.IGetDataTableRowRequest} message GetDataTableRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataTableRowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDataTableRowRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableRowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.IGetDataTableRowRequest} message GetDataTableRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataTableRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataTableRowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.GetDataTableRowRequest} GetDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataTableRowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.GetDataTableRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataTableRowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.GetDataTableRowRequest} GetDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataTableRowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataTableRowRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataTableRowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetDataTableRowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.GetDataTableRowRequest} GetDataTableRowRequest + */ + GetDataTableRowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.GetDataTableRowRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.GetDataTableRowRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataTableRowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.GetDataTableRowRequest} message GetDataTableRowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataTableRowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetDataTableRowRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataTableRowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataTableRowRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.GetDataTableRowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataTableRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.GetDataTableRowRequest"; + }; + + return GetDataTableRowRequest; + })(); + + v1.DeleteDataTableRowRequest = (function() { + + /** + * Properties of a DeleteDataTableRowRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IDeleteDataTableRowRequest + * @property {string|null} [name] DeleteDataTableRowRequest name + */ + + /** + * Constructs a new DeleteDataTableRowRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a DeleteDataTableRowRequest. + * @implements IDeleteDataTableRowRequest + * @constructor + * @param {google.cloud.chronicle.v1.IDeleteDataTableRowRequest=} [properties] Properties to set + */ + function DeleteDataTableRowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataTableRowRequest name. + * @member {string} name + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @instance + */ + DeleteDataTableRowRequest.prototype.name = ""; + + /** + * Creates a new DeleteDataTableRowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.IDeleteDataTableRowRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.DeleteDataTableRowRequest} DeleteDataTableRowRequest instance + */ + DeleteDataTableRowRequest.create = function create(properties) { + return new DeleteDataTableRowRequest(properties); + }; + + /** + * Encodes the specified DeleteDataTableRowRequest message. Does not implicitly {@link google.cloud.chronicle.v1.DeleteDataTableRowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.IDeleteDataTableRowRequest} message DeleteDataTableRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataTableRowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteDataTableRowRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DeleteDataTableRowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.IDeleteDataTableRowRequest} message DeleteDataTableRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataTableRowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataTableRowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.DeleteDataTableRowRequest} DeleteDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataTableRowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.DeleteDataTableRowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataTableRowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.DeleteDataTableRowRequest} DeleteDataTableRowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataTableRowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataTableRowRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataTableRowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteDataTableRowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.DeleteDataTableRowRequest} DeleteDataTableRowRequest + */ + DeleteDataTableRowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.DeleteDataTableRowRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.DeleteDataTableRowRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDataTableRowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @static + * @param {google.cloud.chronicle.v1.DeleteDataTableRowRequest} message DeleteDataTableRowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataTableRowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteDataTableRowRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataTableRowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataTableRowRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.DeleteDataTableRowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataTableRowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.DeleteDataTableRowRequest"; + }; + + return DeleteDataTableRowRequest; + })(); + + v1.BulkCreateDataTableRowsRequest = (function() { + + /** + * Properties of a BulkCreateDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IBulkCreateDataTableRowsRequest + * @property {string|null} [parent] BulkCreateDataTableRowsRequest parent + * @property {Array.|null} [requests] BulkCreateDataTableRowsRequest requests + */ + + /** + * Constructs a new BulkCreateDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a BulkCreateDataTableRowsRequest. + * @implements IBulkCreateDataTableRowsRequest + * @constructor + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest=} [properties] Properties to set + */ + function BulkCreateDataTableRowsRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkCreateDataTableRowsRequest parent. + * @member {string} parent + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @instance + */ + BulkCreateDataTableRowsRequest.prototype.parent = ""; + + /** + * BulkCreateDataTableRowsRequest requests. + * @member {Array.} requests + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @instance + */ + BulkCreateDataTableRowsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BulkCreateDataTableRowsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest} BulkCreateDataTableRowsRequest instance + */ + BulkCreateDataTableRowsRequest.create = function create(properties) { + return new BulkCreateDataTableRowsRequest(properties); + }; + + /** + * Encodes the specified BulkCreateDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest} message BulkCreateDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkCreateDataTableRowsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.cloud.chronicle.v1.CreateDataTableRowRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkCreateDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest} message BulkCreateDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkCreateDataTableRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkCreateDataTableRowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest} BulkCreateDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkCreateDataTableRowsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.cloud.chronicle.v1.CreateDataTableRowRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkCreateDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest} BulkCreateDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkCreateDataTableRowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkCreateDataTableRowsRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkCreateDataTableRowsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.cloud.chronicle.v1.CreateDataTableRowRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BulkCreateDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest} BulkCreateDataTableRowsRequest + */ + BulkCreateDataTableRowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest.requests: object expected"); + message.requests[i] = $root.google.cloud.chronicle.v1.CreateDataTableRowRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BulkCreateDataTableRowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest} message BulkCreateDataTableRowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkCreateDataTableRowsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.cloud.chronicle.v1.CreateDataTableRowRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BulkCreateDataTableRowsRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @instance + * @returns {Object.} JSON object + */ + BulkCreateDataTableRowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkCreateDataTableRowsRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkCreateDataTableRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest"; + }; + + return BulkCreateDataTableRowsRequest; + })(); + + v1.BulkCreateDataTableRowsResponse = (function() { + + /** + * Properties of a BulkCreateDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @interface IBulkCreateDataTableRowsResponse + * @property {Array.|null} [dataTableRows] BulkCreateDataTableRowsResponse dataTableRows + */ + + /** + * Constructs a new BulkCreateDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a BulkCreateDataTableRowsResponse. + * @implements IBulkCreateDataTableRowsResponse + * @constructor + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse=} [properties] Properties to set + */ + function BulkCreateDataTableRowsResponse(properties) { + this.dataTableRows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkCreateDataTableRowsResponse dataTableRows. + * @member {Array.} dataTableRows + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @instance + */ + BulkCreateDataTableRowsResponse.prototype.dataTableRows = $util.emptyArray; + + /** + * Creates a new BulkCreateDataTableRowsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse} BulkCreateDataTableRowsResponse instance + */ + BulkCreateDataTableRowsResponse.create = function create(properties) { + return new BulkCreateDataTableRowsResponse(properties); + }; + + /** + * Encodes the specified BulkCreateDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse} message BulkCreateDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkCreateDataTableRowsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataTableRows != null && message.dataTableRows.length) + for (var i = 0; i < message.dataTableRows.length; ++i) + $root.google.cloud.chronicle.v1.DataTableRow.encode(message.dataTableRows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkCreateDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse} message BulkCreateDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkCreateDataTableRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkCreateDataTableRowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse} BulkCreateDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkCreateDataTableRowsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataTableRows && message.dataTableRows.length)) + message.dataTableRows = []; + message.dataTableRows.push($root.google.cloud.chronicle.v1.DataTableRow.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkCreateDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse} BulkCreateDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkCreateDataTableRowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkCreateDataTableRowsResponse message. + * @function verify + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkCreateDataTableRowsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataTableRows != null && message.hasOwnProperty("dataTableRows")) { + if (!Array.isArray(message.dataTableRows)) + return "dataTableRows: array expected"; + for (var i = 0; i < message.dataTableRows.length; ++i) { + var error = $root.google.cloud.chronicle.v1.DataTableRow.verify(message.dataTableRows[i]); + if (error) + return "dataTableRows." + error; + } + } + return null; + }; + + /** + * Creates a BulkCreateDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse} BulkCreateDataTableRowsResponse + */ + BulkCreateDataTableRowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse) + return object; + var message = new $root.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse(); + if (object.dataTableRows) { + if (!Array.isArray(object.dataTableRows)) + throw TypeError(".google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse.dataTableRows: array expected"); + message.dataTableRows = []; + for (var i = 0; i < object.dataTableRows.length; ++i) { + if (typeof object.dataTableRows[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse.dataTableRows: object expected"); + message.dataTableRows[i] = $root.google.cloud.chronicle.v1.DataTableRow.fromObject(object.dataTableRows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BulkCreateDataTableRowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse} message BulkCreateDataTableRowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkCreateDataTableRowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataTableRows = []; + if (message.dataTableRows && message.dataTableRows.length) { + object.dataTableRows = []; + for (var j = 0; j < message.dataTableRows.length; ++j) + object.dataTableRows[j] = $root.google.cloud.chronicle.v1.DataTableRow.toObject(message.dataTableRows[j], options); + } + return object; + }; + + /** + * Converts this BulkCreateDataTableRowsResponse to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @instance + * @returns {Object.} JSON object + */ + BulkCreateDataTableRowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkCreateDataTableRowsResponse + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkCreateDataTableRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse"; + }; + + return BulkCreateDataTableRowsResponse; + })(); + + v1.BulkGetDataTableRowsRequest = (function() { + + /** + * Properties of a BulkGetDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IBulkGetDataTableRowsRequest + * @property {string|null} [parent] BulkGetDataTableRowsRequest parent + * @property {Array.|null} [requests] BulkGetDataTableRowsRequest requests + */ + + /** + * Constructs a new BulkGetDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a BulkGetDataTableRowsRequest. + * @implements IBulkGetDataTableRowsRequest + * @constructor + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest=} [properties] Properties to set + */ + function BulkGetDataTableRowsRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkGetDataTableRowsRequest parent. + * @member {string} parent + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @instance + */ + BulkGetDataTableRowsRequest.prototype.parent = ""; + + /** + * BulkGetDataTableRowsRequest requests. + * @member {Array.} requests + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @instance + */ + BulkGetDataTableRowsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BulkGetDataTableRowsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.BulkGetDataTableRowsRequest} BulkGetDataTableRowsRequest instance + */ + BulkGetDataTableRowsRequest.create = function create(properties) { + return new BulkGetDataTableRowsRequest(properties); + }; + + /** + * Encodes the specified BulkGetDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.BulkGetDataTableRowsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest} message BulkGetDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkGetDataTableRowsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.cloud.chronicle.v1.GetDataTableRowRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkGetDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkGetDataTableRowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest} message BulkGetDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkGetDataTableRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkGetDataTableRowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.BulkGetDataTableRowsRequest} BulkGetDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkGetDataTableRowsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.cloud.chronicle.v1.GetDataTableRowRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkGetDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.BulkGetDataTableRowsRequest} BulkGetDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkGetDataTableRowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkGetDataTableRowsRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkGetDataTableRowsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.cloud.chronicle.v1.GetDataTableRowRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BulkGetDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.BulkGetDataTableRowsRequest} BulkGetDataTableRowsRequest + */ + BulkGetDataTableRowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.cloud.chronicle.v1.BulkGetDataTableRowsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.BulkGetDataTableRowsRequest.requests: object expected"); + message.requests[i] = $root.google.cloud.chronicle.v1.GetDataTableRowRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BulkGetDataTableRowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.BulkGetDataTableRowsRequest} message BulkGetDataTableRowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkGetDataTableRowsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.cloud.chronicle.v1.GetDataTableRowRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BulkGetDataTableRowsRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @instance + * @returns {Object.} JSON object + */ + BulkGetDataTableRowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkGetDataTableRowsRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkGetDataTableRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.BulkGetDataTableRowsRequest"; + }; + + return BulkGetDataTableRowsRequest; + })(); + + v1.BulkGetDataTableRowsResponse = (function() { + + /** + * Properties of a BulkGetDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @interface IBulkGetDataTableRowsResponse + * @property {Array.|null} [dataTableRows] BulkGetDataTableRowsResponse dataTableRows + */ + + /** + * Constructs a new BulkGetDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a BulkGetDataTableRowsResponse. + * @implements IBulkGetDataTableRowsResponse + * @constructor + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse=} [properties] Properties to set + */ + function BulkGetDataTableRowsResponse(properties) { + this.dataTableRows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkGetDataTableRowsResponse dataTableRows. + * @member {Array.} dataTableRows + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @instance + */ + BulkGetDataTableRowsResponse.prototype.dataTableRows = $util.emptyArray; + + /** + * Creates a new BulkGetDataTableRowsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.BulkGetDataTableRowsResponse} BulkGetDataTableRowsResponse instance + */ + BulkGetDataTableRowsResponse.create = function create(properties) { + return new BulkGetDataTableRowsResponse(properties); + }; + + /** + * Encodes the specified BulkGetDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.BulkGetDataTableRowsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse} message BulkGetDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkGetDataTableRowsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataTableRows != null && message.dataTableRows.length) + for (var i = 0; i < message.dataTableRows.length; ++i) + $root.google.cloud.chronicle.v1.DataTableRow.encode(message.dataTableRows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkGetDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkGetDataTableRowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse} message BulkGetDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkGetDataTableRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkGetDataTableRowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.BulkGetDataTableRowsResponse} BulkGetDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkGetDataTableRowsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataTableRows && message.dataTableRows.length)) + message.dataTableRows = []; + message.dataTableRows.push($root.google.cloud.chronicle.v1.DataTableRow.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkGetDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.BulkGetDataTableRowsResponse} BulkGetDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkGetDataTableRowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkGetDataTableRowsResponse message. + * @function verify + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkGetDataTableRowsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataTableRows != null && message.hasOwnProperty("dataTableRows")) { + if (!Array.isArray(message.dataTableRows)) + return "dataTableRows: array expected"; + for (var i = 0; i < message.dataTableRows.length; ++i) { + var error = $root.google.cloud.chronicle.v1.DataTableRow.verify(message.dataTableRows[i]); + if (error) + return "dataTableRows." + error; + } + } + return null; + }; + + /** + * Creates a BulkGetDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.BulkGetDataTableRowsResponse} BulkGetDataTableRowsResponse + */ + BulkGetDataTableRowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse) + return object; + var message = new $root.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse(); + if (object.dataTableRows) { + if (!Array.isArray(object.dataTableRows)) + throw TypeError(".google.cloud.chronicle.v1.BulkGetDataTableRowsResponse.dataTableRows: array expected"); + message.dataTableRows = []; + for (var i = 0; i < object.dataTableRows.length; ++i) { + if (typeof object.dataTableRows[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.BulkGetDataTableRowsResponse.dataTableRows: object expected"); + message.dataTableRows[i] = $root.google.cloud.chronicle.v1.DataTableRow.fromObject(object.dataTableRows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BulkGetDataTableRowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.BulkGetDataTableRowsResponse} message BulkGetDataTableRowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkGetDataTableRowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataTableRows = []; + if (message.dataTableRows && message.dataTableRows.length) { + object.dataTableRows = []; + for (var j = 0; j < message.dataTableRows.length; ++j) + object.dataTableRows[j] = $root.google.cloud.chronicle.v1.DataTableRow.toObject(message.dataTableRows[j], options); + } + return object; + }; + + /** + * Converts this BulkGetDataTableRowsResponse to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @instance + * @returns {Object.} JSON object + */ + BulkGetDataTableRowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkGetDataTableRowsResponse + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkGetDataTableRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.BulkGetDataTableRowsResponse"; + }; + + return BulkGetDataTableRowsResponse; + })(); + + v1.BulkReplaceDataTableRowsRequest = (function() { + + /** + * Properties of a BulkReplaceDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IBulkReplaceDataTableRowsRequest + * @property {string|null} [parent] BulkReplaceDataTableRowsRequest parent + * @property {Array.|null} [requests] BulkReplaceDataTableRowsRequest requests + */ + + /** + * Constructs a new BulkReplaceDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a BulkReplaceDataTableRowsRequest. + * @implements IBulkReplaceDataTableRowsRequest + * @constructor + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest=} [properties] Properties to set + */ + function BulkReplaceDataTableRowsRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkReplaceDataTableRowsRequest parent. + * @member {string} parent + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @instance + */ + BulkReplaceDataTableRowsRequest.prototype.parent = ""; + + /** + * BulkReplaceDataTableRowsRequest requests. + * @member {Array.} requests + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @instance + */ + BulkReplaceDataTableRowsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BulkReplaceDataTableRowsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest} BulkReplaceDataTableRowsRequest instance + */ + BulkReplaceDataTableRowsRequest.create = function create(properties) { + return new BulkReplaceDataTableRowsRequest(properties); + }; + + /** + * Encodes the specified BulkReplaceDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest} message BulkReplaceDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkReplaceDataTableRowsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.cloud.chronicle.v1.CreateDataTableRowRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkReplaceDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest} message BulkReplaceDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkReplaceDataTableRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkReplaceDataTableRowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest} BulkReplaceDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkReplaceDataTableRowsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.cloud.chronicle.v1.CreateDataTableRowRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkReplaceDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest} BulkReplaceDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkReplaceDataTableRowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkReplaceDataTableRowsRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkReplaceDataTableRowsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.cloud.chronicle.v1.CreateDataTableRowRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BulkReplaceDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest} BulkReplaceDataTableRowsRequest + */ + BulkReplaceDataTableRowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest.requests: object expected"); + message.requests[i] = $root.google.cloud.chronicle.v1.CreateDataTableRowRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BulkReplaceDataTableRowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest} message BulkReplaceDataTableRowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkReplaceDataTableRowsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.cloud.chronicle.v1.CreateDataTableRowRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BulkReplaceDataTableRowsRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @instance + * @returns {Object.} JSON object + */ + BulkReplaceDataTableRowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkReplaceDataTableRowsRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkReplaceDataTableRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest"; + }; + + return BulkReplaceDataTableRowsRequest; + })(); + + v1.BulkReplaceDataTableRowsResponse = (function() { + + /** + * Properties of a BulkReplaceDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @interface IBulkReplaceDataTableRowsResponse + * @property {Array.|null} [dataTableRows] BulkReplaceDataTableRowsResponse dataTableRows + */ + + /** + * Constructs a new BulkReplaceDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a BulkReplaceDataTableRowsResponse. + * @implements IBulkReplaceDataTableRowsResponse + * @constructor + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse=} [properties] Properties to set + */ + function BulkReplaceDataTableRowsResponse(properties) { + this.dataTableRows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkReplaceDataTableRowsResponse dataTableRows. + * @member {Array.} dataTableRows + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @instance + */ + BulkReplaceDataTableRowsResponse.prototype.dataTableRows = $util.emptyArray; + + /** + * Creates a new BulkReplaceDataTableRowsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse} BulkReplaceDataTableRowsResponse instance + */ + BulkReplaceDataTableRowsResponse.create = function create(properties) { + return new BulkReplaceDataTableRowsResponse(properties); + }; + + /** + * Encodes the specified BulkReplaceDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse} message BulkReplaceDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkReplaceDataTableRowsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataTableRows != null && message.dataTableRows.length) + for (var i = 0; i < message.dataTableRows.length; ++i) + $root.google.cloud.chronicle.v1.DataTableRow.encode(message.dataTableRows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkReplaceDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse} message BulkReplaceDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkReplaceDataTableRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkReplaceDataTableRowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse} BulkReplaceDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkReplaceDataTableRowsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataTableRows && message.dataTableRows.length)) + message.dataTableRows = []; + message.dataTableRows.push($root.google.cloud.chronicle.v1.DataTableRow.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkReplaceDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse} BulkReplaceDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkReplaceDataTableRowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkReplaceDataTableRowsResponse message. + * @function verify + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkReplaceDataTableRowsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataTableRows != null && message.hasOwnProperty("dataTableRows")) { + if (!Array.isArray(message.dataTableRows)) + return "dataTableRows: array expected"; + for (var i = 0; i < message.dataTableRows.length; ++i) { + var error = $root.google.cloud.chronicle.v1.DataTableRow.verify(message.dataTableRows[i]); + if (error) + return "dataTableRows." + error; + } + } + return null; + }; + + /** + * Creates a BulkReplaceDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse} BulkReplaceDataTableRowsResponse + */ + BulkReplaceDataTableRowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse) + return object; + var message = new $root.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse(); + if (object.dataTableRows) { + if (!Array.isArray(object.dataTableRows)) + throw TypeError(".google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse.dataTableRows: array expected"); + message.dataTableRows = []; + for (var i = 0; i < object.dataTableRows.length; ++i) { + if (typeof object.dataTableRows[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse.dataTableRows: object expected"); + message.dataTableRows[i] = $root.google.cloud.chronicle.v1.DataTableRow.fromObject(object.dataTableRows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BulkReplaceDataTableRowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse} message BulkReplaceDataTableRowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkReplaceDataTableRowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataTableRows = []; + if (message.dataTableRows && message.dataTableRows.length) { + object.dataTableRows = []; + for (var j = 0; j < message.dataTableRows.length; ++j) + object.dataTableRows[j] = $root.google.cloud.chronicle.v1.DataTableRow.toObject(message.dataTableRows[j], options); + } + return object; + }; + + /** + * Converts this BulkReplaceDataTableRowsResponse to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @instance + * @returns {Object.} JSON object + */ + BulkReplaceDataTableRowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkReplaceDataTableRowsResponse + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkReplaceDataTableRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse"; + }; + + return BulkReplaceDataTableRowsResponse; + })(); + + v1.BulkUpdateDataTableRowsRequest = (function() { + + /** + * Properties of a BulkUpdateDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IBulkUpdateDataTableRowsRequest + * @property {string|null} [parent] BulkUpdateDataTableRowsRequest parent + * @property {Array.|null} [requests] BulkUpdateDataTableRowsRequest requests + */ + + /** + * Constructs a new BulkUpdateDataTableRowsRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a BulkUpdateDataTableRowsRequest. + * @implements IBulkUpdateDataTableRowsRequest + * @constructor + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest=} [properties] Properties to set + */ + function BulkUpdateDataTableRowsRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkUpdateDataTableRowsRequest parent. + * @member {string} parent + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @instance + */ + BulkUpdateDataTableRowsRequest.prototype.parent = ""; + + /** + * BulkUpdateDataTableRowsRequest requests. + * @member {Array.} requests + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @instance + */ + BulkUpdateDataTableRowsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BulkUpdateDataTableRowsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest} BulkUpdateDataTableRowsRequest instance + */ + BulkUpdateDataTableRowsRequest.create = function create(properties) { + return new BulkUpdateDataTableRowsRequest(properties); + }; + + /** + * Encodes the specified BulkUpdateDataTableRowsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest} message BulkUpdateDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUpdateDataTableRowsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.cloud.chronicle.v1.UpdateDataTableRowRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkUpdateDataTableRowsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest} message BulkUpdateDataTableRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUpdateDataTableRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkUpdateDataTableRowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest} BulkUpdateDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUpdateDataTableRowsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.cloud.chronicle.v1.UpdateDataTableRowRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkUpdateDataTableRowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest} BulkUpdateDataTableRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUpdateDataTableRowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkUpdateDataTableRowsRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkUpdateDataTableRowsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.cloud.chronicle.v1.UpdateDataTableRowRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BulkUpdateDataTableRowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest} BulkUpdateDataTableRowsRequest + */ + BulkUpdateDataTableRowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest.requests: object expected"); + message.requests[i] = $root.google.cloud.chronicle.v1.UpdateDataTableRowRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BulkUpdateDataTableRowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @static + * @param {google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest} message BulkUpdateDataTableRowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkUpdateDataTableRowsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.cloud.chronicle.v1.UpdateDataTableRowRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BulkUpdateDataTableRowsRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @instance + * @returns {Object.} JSON object + */ + BulkUpdateDataTableRowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkUpdateDataTableRowsRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkUpdateDataTableRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest"; + }; + + return BulkUpdateDataTableRowsRequest; + })(); + + v1.BulkUpdateDataTableRowsResponse = (function() { + + /** + * Properties of a BulkUpdateDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @interface IBulkUpdateDataTableRowsResponse + * @property {Array.|null} [dataTableRows] BulkUpdateDataTableRowsResponse dataTableRows + */ + + /** + * Constructs a new BulkUpdateDataTableRowsResponse. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a BulkUpdateDataTableRowsResponse. + * @implements IBulkUpdateDataTableRowsResponse + * @constructor + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse=} [properties] Properties to set + */ + function BulkUpdateDataTableRowsResponse(properties) { + this.dataTableRows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkUpdateDataTableRowsResponse dataTableRows. + * @member {Array.} dataTableRows + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @instance + */ + BulkUpdateDataTableRowsResponse.prototype.dataTableRows = $util.emptyArray; + + /** + * Creates a new BulkUpdateDataTableRowsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse} BulkUpdateDataTableRowsResponse instance + */ + BulkUpdateDataTableRowsResponse.create = function create(properties) { + return new BulkUpdateDataTableRowsResponse(properties); + }; + + /** + * Encodes the specified BulkUpdateDataTableRowsResponse message. Does not implicitly {@link google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse} message BulkUpdateDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUpdateDataTableRowsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataTableRows != null && message.dataTableRows.length) + for (var i = 0; i < message.dataTableRows.length; ++i) + $root.google.cloud.chronicle.v1.DataTableRow.encode(message.dataTableRows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkUpdateDataTableRowsResponse message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse} message BulkUpdateDataTableRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUpdateDataTableRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkUpdateDataTableRowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse} BulkUpdateDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUpdateDataTableRowsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataTableRows && message.dataTableRows.length)) + message.dataTableRows = []; + message.dataTableRows.push($root.google.cloud.chronicle.v1.DataTableRow.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkUpdateDataTableRowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse} BulkUpdateDataTableRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUpdateDataTableRowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkUpdateDataTableRowsResponse message. + * @function verify + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkUpdateDataTableRowsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataTableRows != null && message.hasOwnProperty("dataTableRows")) { + if (!Array.isArray(message.dataTableRows)) + return "dataTableRows: array expected"; + for (var i = 0; i < message.dataTableRows.length; ++i) { + var error = $root.google.cloud.chronicle.v1.DataTableRow.verify(message.dataTableRows[i]); + if (error) + return "dataTableRows." + error; + } + } + return null; + }; + + /** + * Creates a BulkUpdateDataTableRowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse} BulkUpdateDataTableRowsResponse + */ + BulkUpdateDataTableRowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse) + return object; + var message = new $root.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse(); + if (object.dataTableRows) { + if (!Array.isArray(object.dataTableRows)) + throw TypeError(".google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse.dataTableRows: array expected"); + message.dataTableRows = []; + for (var i = 0; i < object.dataTableRows.length; ++i) { + if (typeof object.dataTableRows[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse.dataTableRows: object expected"); + message.dataTableRows[i] = $root.google.cloud.chronicle.v1.DataTableRow.fromObject(object.dataTableRows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BulkUpdateDataTableRowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @static + * @param {google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse} message BulkUpdateDataTableRowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkUpdateDataTableRowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataTableRows = []; + if (message.dataTableRows && message.dataTableRows.length) { + object.dataTableRows = []; + for (var j = 0; j < message.dataTableRows.length; ++j) + object.dataTableRows[j] = $root.google.cloud.chronicle.v1.DataTableRow.toObject(message.dataTableRows[j], options); + } + return object; + }; + + /** + * Converts this BulkUpdateDataTableRowsResponse to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @instance + * @returns {Object.} JSON object + */ + BulkUpdateDataTableRowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkUpdateDataTableRowsResponse + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkUpdateDataTableRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse"; + }; + + return BulkUpdateDataTableRowsResponse; + })(); + + v1.DataTableScopeInfo = (function() { + + /** + * Properties of a DataTableScopeInfo. + * @memberof google.cloud.chronicle.v1 + * @interface IDataTableScopeInfo + * @property {Array.|null} [dataAccessScopes] DataTableScopeInfo dataAccessScopes + */ + + /** + * Constructs a new DataTableScopeInfo. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a DataTableScopeInfo. + * @implements IDataTableScopeInfo + * @constructor + * @param {google.cloud.chronicle.v1.IDataTableScopeInfo=} [properties] Properties to set + */ + function DataTableScopeInfo(properties) { + this.dataAccessScopes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataTableScopeInfo dataAccessScopes. + * @member {Array.} dataAccessScopes + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @instance + */ + DataTableScopeInfo.prototype.dataAccessScopes = $util.emptyArray; + + /** + * Creates a new DataTableScopeInfo instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @static + * @param {google.cloud.chronicle.v1.IDataTableScopeInfo=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.DataTableScopeInfo} DataTableScopeInfo instance + */ + DataTableScopeInfo.create = function create(properties) { + return new DataTableScopeInfo(properties); + }; + + /** + * Encodes the specified DataTableScopeInfo message. Does not implicitly {@link google.cloud.chronicle.v1.DataTableScopeInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @static + * @param {google.cloud.chronicle.v1.IDataTableScopeInfo} message DataTableScopeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTableScopeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataAccessScopes != null && message.dataAccessScopes.length) + for (var i = 0; i < message.dataAccessScopes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataAccessScopes[i]); + return writer; + }; + + /** + * Encodes the specified DataTableScopeInfo message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTableScopeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @static + * @param {google.cloud.chronicle.v1.IDataTableScopeInfo} message DataTableScopeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTableScopeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataTableScopeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.DataTableScopeInfo} DataTableScopeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTableScopeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.DataTableScopeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataAccessScopes && message.dataAccessScopes.length)) + message.dataAccessScopes = []; + message.dataAccessScopes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataTableScopeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.DataTableScopeInfo} DataTableScopeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTableScopeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataTableScopeInfo message. + * @function verify + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataTableScopeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataAccessScopes != null && message.hasOwnProperty("dataAccessScopes")) { + if (!Array.isArray(message.dataAccessScopes)) + return "dataAccessScopes: array expected"; + for (var i = 0; i < message.dataAccessScopes.length; ++i) + if (!$util.isString(message.dataAccessScopes[i])) + return "dataAccessScopes: string[] expected"; + } + return null; + }; + + /** + * Creates a DataTableScopeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.DataTableScopeInfo} DataTableScopeInfo + */ + DataTableScopeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.DataTableScopeInfo) + return object; + var message = new $root.google.cloud.chronicle.v1.DataTableScopeInfo(); + if (object.dataAccessScopes) { + if (!Array.isArray(object.dataAccessScopes)) + throw TypeError(".google.cloud.chronicle.v1.DataTableScopeInfo.dataAccessScopes: array expected"); + message.dataAccessScopes = []; + for (var i = 0; i < object.dataAccessScopes.length; ++i) + message.dataAccessScopes[i] = String(object.dataAccessScopes[i]); + } + return message; + }; + + /** + * Creates a plain object from a DataTableScopeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @static + * @param {google.cloud.chronicle.v1.DataTableScopeInfo} message DataTableScopeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataTableScopeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataAccessScopes = []; + if (message.dataAccessScopes && message.dataAccessScopes.length) { + object.dataAccessScopes = []; + for (var j = 0; j < message.dataAccessScopes.length; ++j) + object.dataAccessScopes[j] = message.dataAccessScopes[j]; + } + return object; + }; + + /** + * Converts this DataTableScopeInfo to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @instance + * @returns {Object.} JSON object + */ + DataTableScopeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataTableScopeInfo + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.DataTableScopeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataTableScopeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.DataTableScopeInfo"; + }; + + return DataTableScopeInfo; + })(); + + v1.DataTable = (function() { + + /** + * Properties of a DataTable. + * @memberof google.cloud.chronicle.v1 + * @interface IDataTable + * @property {string|null} [name] DataTable name + * @property {string|null} [displayName] DataTable displayName + * @property {string|null} [description] DataTable description + * @property {google.protobuf.ITimestamp|null} [createTime] DataTable createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataTable updateTime + * @property {Array.|null} [columnInfo] DataTable columnInfo + * @property {string|null} [dataTableUuid] DataTable dataTableUuid + * @property {Array.|null} [rules] DataTable rules + * @property {number|null} [ruleAssociationsCount] DataTable ruleAssociationsCount + * @property {string|null} [rowTimeToLive] DataTable rowTimeToLive + * @property {number|Long|null} [approximateRowCount] DataTable approximateRowCount + * @property {google.cloud.chronicle.v1.IDataTableScopeInfo|null} [scopeInfo] DataTable scopeInfo + * @property {google.cloud.chronicle.v1.DataTableUpdateSource|null} [updateSource] DataTable updateSource + * @property {google.protobuf.ITimestamp|null} [rowTimeToLiveUpdateTime] DataTable rowTimeToLiveUpdateTime + */ + + /** + * Constructs a new DataTable. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a DataTable. + * @implements IDataTable + * @constructor + * @param {google.cloud.chronicle.v1.IDataTable=} [properties] Properties to set + */ + function DataTable(properties) { + this.columnInfo = []; + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataTable name. + * @member {string} name + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.name = ""; + + /** + * DataTable displayName. + * @member {string} displayName + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.displayName = ""; + + /** + * DataTable description. + * @member {string} description + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.description = ""; + + /** + * DataTable createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.createTime = null; + + /** + * DataTable updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.updateTime = null; + + /** + * DataTable columnInfo. + * @member {Array.} columnInfo + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.columnInfo = $util.emptyArray; + + /** + * DataTable dataTableUuid. + * @member {string} dataTableUuid + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.dataTableUuid = ""; + + /** + * DataTable rules. + * @member {Array.} rules + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.rules = $util.emptyArray; + + /** + * DataTable ruleAssociationsCount. + * @member {number} ruleAssociationsCount + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.ruleAssociationsCount = 0; + + /** + * DataTable rowTimeToLive. + * @member {string} rowTimeToLive + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.rowTimeToLive = ""; + + /** + * DataTable approximateRowCount. + * @member {number|Long} approximateRowCount + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.approximateRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataTable scopeInfo. + * @member {google.cloud.chronicle.v1.IDataTableScopeInfo|null|undefined} scopeInfo + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.scopeInfo = null; + + /** + * DataTable updateSource. + * @member {google.cloud.chronicle.v1.DataTableUpdateSource} updateSource + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.updateSource = 0; + + /** + * DataTable rowTimeToLiveUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} rowTimeToLiveUpdateTime + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + */ + DataTable.prototype.rowTimeToLiveUpdateTime = null; + + /** + * Creates a new DataTable instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.DataTable + * @static + * @param {google.cloud.chronicle.v1.IDataTable=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.DataTable} DataTable instance + */ + DataTable.create = function create(properties) { + return new DataTable(properties); + }; + + /** + * Encodes the specified DataTable message. Does not implicitly {@link google.cloud.chronicle.v1.DataTable.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.DataTable + * @static + * @param {google.cloud.chronicle.v1.IDataTable} message DataTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.columnInfo != null && message.columnInfo.length) + for (var i = 0; i < message.columnInfo.length; ++i) + $root.google.cloud.chronicle.v1.DataTableColumnInfo.encode(message.columnInfo[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.dataTableUuid != null && Object.hasOwnProperty.call(message, "dataTableUuid")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.dataTableUuid); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.rules[i]); + if (message.ruleAssociationsCount != null && Object.hasOwnProperty.call(message, "ruleAssociationsCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ruleAssociationsCount); + if (message.rowTimeToLive != null && Object.hasOwnProperty.call(message, "rowTimeToLive")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.rowTimeToLive); + if (message.approximateRowCount != null && Object.hasOwnProperty.call(message, "approximateRowCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.approximateRowCount); + if (message.scopeInfo != null && Object.hasOwnProperty.call(message, "scopeInfo")) + $root.google.cloud.chronicle.v1.DataTableScopeInfo.encode(message.scopeInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.updateSource != null && Object.hasOwnProperty.call(message, "updateSource")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.updateSource); + if (message.rowTimeToLiveUpdateTime != null && Object.hasOwnProperty.call(message, "rowTimeToLiveUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.rowTimeToLiveUpdateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataTable message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.DataTable + * @static + * @param {google.cloud.chronicle.v1.IDataTable} message DataTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataTable message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.DataTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.DataTable} DataTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTable.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.DataTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.columnInfo && message.columnInfo.length)) + message.columnInfo = []; + message.columnInfo.push($root.google.cloud.chronicle.v1.DataTableColumnInfo.decode(reader, reader.uint32())); + break; + } + case 7: { + message.dataTableUuid = reader.string(); + break; + } + case 8: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push(reader.string()); + break; + } + case 9: { + message.ruleAssociationsCount = reader.int32(); + break; + } + case 10: { + message.rowTimeToLive = reader.string(); + break; + } + case 11: { + message.approximateRowCount = reader.int64(); + break; + } + case 12: { + message.scopeInfo = $root.google.cloud.chronicle.v1.DataTableScopeInfo.decode(reader, reader.uint32()); + break; + } + case 13: { + message.updateSource = reader.int32(); + break; + } + case 14: { + message.rowTimeToLiveUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.DataTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.DataTable} DataTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataTable message. + * @function verify + * @memberof google.cloud.chronicle.v1.DataTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataTable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.columnInfo != null && message.hasOwnProperty("columnInfo")) { + if (!Array.isArray(message.columnInfo)) + return "columnInfo: array expected"; + for (var i = 0; i < message.columnInfo.length; ++i) { + var error = $root.google.cloud.chronicle.v1.DataTableColumnInfo.verify(message.columnInfo[i]); + if (error) + return "columnInfo." + error; + } + } + if (message.dataTableUuid != null && message.hasOwnProperty("dataTableUuid")) + if (!$util.isString(message.dataTableUuid)) + return "dataTableUuid: string expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) + if (!$util.isString(message.rules[i])) + return "rules: string[] expected"; + } + if (message.ruleAssociationsCount != null && message.hasOwnProperty("ruleAssociationsCount")) + if (!$util.isInteger(message.ruleAssociationsCount)) + return "ruleAssociationsCount: integer expected"; + if (message.rowTimeToLive != null && message.hasOwnProperty("rowTimeToLive")) + if (!$util.isString(message.rowTimeToLive)) + return "rowTimeToLive: string expected"; + if (message.approximateRowCount != null && message.hasOwnProperty("approximateRowCount")) + if (!$util.isInteger(message.approximateRowCount) && !(message.approximateRowCount && $util.isInteger(message.approximateRowCount.low) && $util.isInteger(message.approximateRowCount.high))) + return "approximateRowCount: integer|Long expected"; + if (message.scopeInfo != null && message.hasOwnProperty("scopeInfo")) { + var error = $root.google.cloud.chronicle.v1.DataTableScopeInfo.verify(message.scopeInfo); + if (error) + return "scopeInfo." + error; + } + if (message.updateSource != null && message.hasOwnProperty("updateSource")) + switch (message.updateSource) { + default: + return "updateSource: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.rowTimeToLiveUpdateTime != null && message.hasOwnProperty("rowTimeToLiveUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.rowTimeToLiveUpdateTime); + if (error) + return "rowTimeToLiveUpdateTime." + error; + } + return null; + }; + + /** + * Creates a DataTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.DataTable + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.DataTable} DataTable + */ + DataTable.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.DataTable) + return object; + var message = new $root.google.cloud.chronicle.v1.DataTable(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.chronicle.v1.DataTable.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.chronicle.v1.DataTable.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.columnInfo) { + if (!Array.isArray(object.columnInfo)) + throw TypeError(".google.cloud.chronicle.v1.DataTable.columnInfo: array expected"); + message.columnInfo = []; + for (var i = 0; i < object.columnInfo.length; ++i) { + if (typeof object.columnInfo[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.DataTable.columnInfo: object expected"); + message.columnInfo[i] = $root.google.cloud.chronicle.v1.DataTableColumnInfo.fromObject(object.columnInfo[i]); + } + } + if (object.dataTableUuid != null) + message.dataTableUuid = String(object.dataTableUuid); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.chronicle.v1.DataTable.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) + message.rules[i] = String(object.rules[i]); + } + if (object.ruleAssociationsCount != null) + message.ruleAssociationsCount = object.ruleAssociationsCount | 0; + if (object.rowTimeToLive != null) + message.rowTimeToLive = String(object.rowTimeToLive); + if (object.approximateRowCount != null) + if ($util.Long) + (message.approximateRowCount = $util.Long.fromValue(object.approximateRowCount)).unsigned = false; + else if (typeof object.approximateRowCount === "string") + message.approximateRowCount = parseInt(object.approximateRowCount, 10); + else if (typeof object.approximateRowCount === "number") + message.approximateRowCount = object.approximateRowCount; + else if (typeof object.approximateRowCount === "object") + message.approximateRowCount = new $util.LongBits(object.approximateRowCount.low >>> 0, object.approximateRowCount.high >>> 0).toNumber(); + if (object.scopeInfo != null) { + if (typeof object.scopeInfo !== "object") + throw TypeError(".google.cloud.chronicle.v1.DataTable.scopeInfo: object expected"); + message.scopeInfo = $root.google.cloud.chronicle.v1.DataTableScopeInfo.fromObject(object.scopeInfo); + } + switch (object.updateSource) { + default: + if (typeof object.updateSource === "number") { + message.updateSource = object.updateSource; + break; + } + break; + case "DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED": + case 0: + message.updateSource = 0; + break; + case "USER": + case 1: + message.updateSource = 1; + break; + case "RULE": + case 2: + message.updateSource = 2; + break; + case "SEARCH": + case 3: + message.updateSource = 3; + break; + } + if (object.rowTimeToLiveUpdateTime != null) { + if (typeof object.rowTimeToLiveUpdateTime !== "object") + throw TypeError(".google.cloud.chronicle.v1.DataTable.rowTimeToLiveUpdateTime: object expected"); + message.rowTimeToLiveUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.rowTimeToLiveUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a DataTable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.DataTable + * @static + * @param {google.cloud.chronicle.v1.DataTable} message DataTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataTable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.columnInfo = []; + object.rules = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.dataTableUuid = ""; + object.ruleAssociationsCount = 0; + object.rowTimeToLive = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.approximateRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.approximateRowCount = options.longs === String ? "0" : 0; + object.scopeInfo = null; + object.updateSource = options.enums === String ? "DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED" : 0; + object.rowTimeToLiveUpdateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.columnInfo && message.columnInfo.length) { + object.columnInfo = []; + for (var j = 0; j < message.columnInfo.length; ++j) + object.columnInfo[j] = $root.google.cloud.chronicle.v1.DataTableColumnInfo.toObject(message.columnInfo[j], options); + } + if (message.dataTableUuid != null && message.hasOwnProperty("dataTableUuid")) + object.dataTableUuid = message.dataTableUuid; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = message.rules[j]; + } + if (message.ruleAssociationsCount != null && message.hasOwnProperty("ruleAssociationsCount")) + object.ruleAssociationsCount = message.ruleAssociationsCount; + if (message.rowTimeToLive != null && message.hasOwnProperty("rowTimeToLive")) + object.rowTimeToLive = message.rowTimeToLive; + if (message.approximateRowCount != null && message.hasOwnProperty("approximateRowCount")) + if (typeof message.approximateRowCount === "number") + object.approximateRowCount = options.longs === String ? String(message.approximateRowCount) : message.approximateRowCount; + else + object.approximateRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.approximateRowCount) : options.longs === Number ? new $util.LongBits(message.approximateRowCount.low >>> 0, message.approximateRowCount.high >>> 0).toNumber() : message.approximateRowCount; + if (message.scopeInfo != null && message.hasOwnProperty("scopeInfo")) + object.scopeInfo = $root.google.cloud.chronicle.v1.DataTableScopeInfo.toObject(message.scopeInfo, options); + if (message.updateSource != null && message.hasOwnProperty("updateSource")) + object.updateSource = options.enums === String ? $root.google.cloud.chronicle.v1.DataTableUpdateSource[message.updateSource] === undefined ? message.updateSource : $root.google.cloud.chronicle.v1.DataTableUpdateSource[message.updateSource] : message.updateSource; + if (message.rowTimeToLiveUpdateTime != null && message.hasOwnProperty("rowTimeToLiveUpdateTime")) + object.rowTimeToLiveUpdateTime = $root.google.protobuf.Timestamp.toObject(message.rowTimeToLiveUpdateTime, options); + return object; + }; + + /** + * Converts this DataTable to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.DataTable + * @instance + * @returns {Object.} JSON object + */ + DataTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataTable + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.DataTable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.DataTable"; + }; + + return DataTable; + })(); + + v1.DataTableRow = (function() { + + /** + * Properties of a DataTableRow. + * @memberof google.cloud.chronicle.v1 + * @interface IDataTableRow + * @property {string|null} [name] DataTableRow name + * @property {Array.|null} [values] DataTableRow values + * @property {google.protobuf.ITimestamp|null} [createTime] DataTableRow createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataTableRow updateTime + * @property {string|null} [rowTimeToLive] DataTableRow rowTimeToLive + */ + + /** + * Constructs a new DataTableRow. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a DataTableRow. + * @implements IDataTableRow + * @constructor + * @param {google.cloud.chronicle.v1.IDataTableRow=} [properties] Properties to set + */ + function DataTableRow(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataTableRow name. + * @member {string} name + * @memberof google.cloud.chronicle.v1.DataTableRow + * @instance + */ + DataTableRow.prototype.name = ""; + + /** + * DataTableRow values. + * @member {Array.} values + * @memberof google.cloud.chronicle.v1.DataTableRow + * @instance + */ + DataTableRow.prototype.values = $util.emptyArray; + + /** + * DataTableRow createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.chronicle.v1.DataTableRow + * @instance + */ + DataTableRow.prototype.createTime = null; + + /** + * DataTableRow updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.chronicle.v1.DataTableRow + * @instance + */ + DataTableRow.prototype.updateTime = null; + + /** + * DataTableRow rowTimeToLive. + * @member {string} rowTimeToLive + * @memberof google.cloud.chronicle.v1.DataTableRow + * @instance + */ + DataTableRow.prototype.rowTimeToLive = ""; + + /** + * Creates a new DataTableRow instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.DataTableRow + * @static + * @param {google.cloud.chronicle.v1.IDataTableRow=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.DataTableRow} DataTableRow instance + */ + DataTableRow.create = function create(properties) { + return new DataTableRow(properties); + }; + + /** + * Encodes the specified DataTableRow message. Does not implicitly {@link google.cloud.chronicle.v1.DataTableRow.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.DataTableRow + * @static + * @param {google.cloud.chronicle.v1.IDataTableRow} message DataTableRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTableRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.values[i]); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rowTimeToLive != null && Object.hasOwnProperty.call(message, "rowTimeToLive")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.rowTimeToLive); + return writer; + }; + + /** + * Encodes the specified DataTableRow message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTableRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.DataTableRow + * @static + * @param {google.cloud.chronicle.v1.IDataTableRow} message DataTableRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTableRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataTableRow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.DataTableRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.DataTableRow} DataTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTableRow.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.DataTableRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.rowTimeToLive = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataTableRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.DataTableRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.DataTableRow} DataTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTableRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataTableRow message. + * @function verify + * @memberof google.cloud.chronicle.v1.DataTableRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataTableRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.rowTimeToLive != null && message.hasOwnProperty("rowTimeToLive")) + if (!$util.isString(message.rowTimeToLive)) + return "rowTimeToLive: string expected"; + return null; + }; + + /** + * Creates a DataTableRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.DataTableRow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.DataTableRow} DataTableRow + */ + DataTableRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.DataTableRow) + return object; + var message = new $root.google.cloud.chronicle.v1.DataTableRow(); + if (object.name != null) + message.name = String(object.name); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.chronicle.v1.DataTableRow.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.chronicle.v1.DataTableRow.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.chronicle.v1.DataTableRow.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.rowTimeToLive != null) + message.rowTimeToLive = String(object.rowTimeToLive); + return message; + }; + + /** + * Creates a plain object from a DataTableRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.DataTableRow + * @static + * @param {google.cloud.chronicle.v1.DataTableRow} message DataTableRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataTableRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.rowTimeToLive = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.rowTimeToLive != null && message.hasOwnProperty("rowTimeToLive")) + object.rowTimeToLive = message.rowTimeToLive; + return object; + }; + + /** + * Converts this DataTableRow to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.DataTableRow + * @instance + * @returns {Object.} JSON object + */ + DataTableRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataTableRow + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.DataTableRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataTableRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.DataTableRow"; + }; + + return DataTableRow; + })(); + + v1.DataTableColumnInfo = (function() { + + /** + * Properties of a DataTableColumnInfo. + * @memberof google.cloud.chronicle.v1 + * @interface IDataTableColumnInfo + * @property {string|null} [mappedColumnPath] DataTableColumnInfo mappedColumnPath + * @property {google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType|null} [columnType] DataTableColumnInfo columnType + * @property {number|null} [columnIndex] DataTableColumnInfo columnIndex + * @property {string|null} [originalColumn] DataTableColumnInfo originalColumn + * @property {boolean|null} [keyColumn] DataTableColumnInfo keyColumn + * @property {boolean|null} [repeatedValues] DataTableColumnInfo repeatedValues + */ + + /** + * Constructs a new DataTableColumnInfo. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a DataTableColumnInfo. + * @implements IDataTableColumnInfo + * @constructor + * @param {google.cloud.chronicle.v1.IDataTableColumnInfo=} [properties] Properties to set + */ + function DataTableColumnInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataTableColumnInfo mappedColumnPath. + * @member {string|null|undefined} mappedColumnPath + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @instance + */ + DataTableColumnInfo.prototype.mappedColumnPath = null; + + /** + * DataTableColumnInfo columnType. + * @member {google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType|null|undefined} columnType + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @instance + */ + DataTableColumnInfo.prototype.columnType = null; + + /** + * DataTableColumnInfo columnIndex. + * @member {number} columnIndex + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @instance + */ + DataTableColumnInfo.prototype.columnIndex = 0; + + /** + * DataTableColumnInfo originalColumn. + * @member {string} originalColumn + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @instance + */ + DataTableColumnInfo.prototype.originalColumn = ""; + + /** + * DataTableColumnInfo keyColumn. + * @member {boolean} keyColumn + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @instance + */ + DataTableColumnInfo.prototype.keyColumn = false; + + /** + * DataTableColumnInfo repeatedValues. + * @member {boolean} repeatedValues + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @instance + */ + DataTableColumnInfo.prototype.repeatedValues = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataTableColumnInfo pathOrType. + * @member {"mappedColumnPath"|"columnType"|undefined} pathOrType + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @instance + */ + Object.defineProperty(DataTableColumnInfo.prototype, "pathOrType", { + get: $util.oneOfGetter($oneOfFields = ["mappedColumnPath", "columnType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataTableColumnInfo instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @static + * @param {google.cloud.chronicle.v1.IDataTableColumnInfo=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.DataTableColumnInfo} DataTableColumnInfo instance + */ + DataTableColumnInfo.create = function create(properties) { + return new DataTableColumnInfo(properties); + }; + + /** + * Encodes the specified DataTableColumnInfo message. Does not implicitly {@link google.cloud.chronicle.v1.DataTableColumnInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @static + * @param {google.cloud.chronicle.v1.IDataTableColumnInfo} message DataTableColumnInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTableColumnInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columnIndex != null && Object.hasOwnProperty.call(message, "columnIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.columnIndex); + if (message.originalColumn != null && Object.hasOwnProperty.call(message, "originalColumn")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.originalColumn); + if (message.mappedColumnPath != null && Object.hasOwnProperty.call(message, "mappedColumnPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mappedColumnPath); + if (message.columnType != null && Object.hasOwnProperty.call(message, "columnType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.columnType); + if (message.keyColumn != null && Object.hasOwnProperty.call(message, "keyColumn")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.keyColumn); + if (message.repeatedValues != null && Object.hasOwnProperty.call(message, "repeatedValues")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeatedValues); + return writer; + }; + + /** + * Encodes the specified DataTableColumnInfo message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTableColumnInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @static + * @param {google.cloud.chronicle.v1.IDataTableColumnInfo} message DataTableColumnInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTableColumnInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataTableColumnInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.DataTableColumnInfo} DataTableColumnInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTableColumnInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.DataTableColumnInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.mappedColumnPath = reader.string(); + break; + } + case 4: { + message.columnType = reader.int32(); + break; + } + case 1: { + message.columnIndex = reader.int32(); + break; + } + case 2: { + message.originalColumn = reader.string(); + break; + } + case 5: { + message.keyColumn = reader.bool(); + break; + } + case 6: { + message.repeatedValues = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataTableColumnInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.DataTableColumnInfo} DataTableColumnInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTableColumnInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataTableColumnInfo message. + * @function verify + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataTableColumnInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mappedColumnPath != null && message.hasOwnProperty("mappedColumnPath")) { + properties.pathOrType = 1; + if (!$util.isString(message.mappedColumnPath)) + return "mappedColumnPath: string expected"; + } + if (message.columnType != null && message.hasOwnProperty("columnType")) { + if (properties.pathOrType === 1) + return "pathOrType: multiple values"; + properties.pathOrType = 1; + switch (message.columnType) { + default: + return "columnType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.columnIndex != null && message.hasOwnProperty("columnIndex")) + if (!$util.isInteger(message.columnIndex)) + return "columnIndex: integer expected"; + if (message.originalColumn != null && message.hasOwnProperty("originalColumn")) + if (!$util.isString(message.originalColumn)) + return "originalColumn: string expected"; + if (message.keyColumn != null && message.hasOwnProperty("keyColumn")) + if (typeof message.keyColumn !== "boolean") + return "keyColumn: boolean expected"; + if (message.repeatedValues != null && message.hasOwnProperty("repeatedValues")) + if (typeof message.repeatedValues !== "boolean") + return "repeatedValues: boolean expected"; + return null; + }; + + /** + * Creates a DataTableColumnInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.DataTableColumnInfo} DataTableColumnInfo + */ + DataTableColumnInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.DataTableColumnInfo) + return object; + var message = new $root.google.cloud.chronicle.v1.DataTableColumnInfo(); + if (object.mappedColumnPath != null) + message.mappedColumnPath = String(object.mappedColumnPath); + switch (object.columnType) { + default: + if (typeof object.columnType === "number") { + message.columnType = object.columnType; + break; + } + break; + case "DATA_TABLE_COLUMN_TYPE_UNSPECIFIED": + case 0: + message.columnType = 0; + break; + case "STRING": + case 1: + message.columnType = 1; + break; + case "REGEX": + case 2: + message.columnType = 2; + break; + case "CIDR": + case 3: + message.columnType = 3; + break; + case "NUMBER": + case 4: + message.columnType = 4; + break; + } + if (object.columnIndex != null) + message.columnIndex = object.columnIndex | 0; + if (object.originalColumn != null) + message.originalColumn = String(object.originalColumn); + if (object.keyColumn != null) + message.keyColumn = Boolean(object.keyColumn); + if (object.repeatedValues != null) + message.repeatedValues = Boolean(object.repeatedValues); + return message; + }; + + /** + * Creates a plain object from a DataTableColumnInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @static + * @param {google.cloud.chronicle.v1.DataTableColumnInfo} message DataTableColumnInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataTableColumnInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.columnIndex = 0; + object.originalColumn = ""; + object.keyColumn = false; + object.repeatedValues = false; + } + if (message.columnIndex != null && message.hasOwnProperty("columnIndex")) + object.columnIndex = message.columnIndex; + if (message.originalColumn != null && message.hasOwnProperty("originalColumn")) + object.originalColumn = message.originalColumn; + if (message.mappedColumnPath != null && message.hasOwnProperty("mappedColumnPath")) { + object.mappedColumnPath = message.mappedColumnPath; + if (options.oneofs) + object.pathOrType = "mappedColumnPath"; + } + if (message.columnType != null && message.hasOwnProperty("columnType")) { + object.columnType = options.enums === String ? $root.google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType[message.columnType] === undefined ? message.columnType : $root.google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType[message.columnType] : message.columnType; + if (options.oneofs) + object.pathOrType = "columnType"; + } + if (message.keyColumn != null && message.hasOwnProperty("keyColumn")) + object.keyColumn = message.keyColumn; + if (message.repeatedValues != null && message.hasOwnProperty("repeatedValues")) + object.repeatedValues = message.repeatedValues; + return object; + }; + + /** + * Converts this DataTableColumnInfo to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @instance + * @returns {Object.} JSON object + */ + DataTableColumnInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataTableColumnInfo + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.DataTableColumnInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataTableColumnInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.DataTableColumnInfo"; + }; + + /** + * DataTableColumnType enum. + * @name google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType + * @enum {number} + * @property {number} DATA_TABLE_COLUMN_TYPE_UNSPECIFIED=0 DATA_TABLE_COLUMN_TYPE_UNSPECIFIED value + * @property {number} STRING=1 STRING value + * @property {number} REGEX=2 REGEX value + * @property {number} CIDR=3 CIDR value + * @property {number} NUMBER=4 NUMBER value + */ + DataTableColumnInfo.DataTableColumnType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_TABLE_COLUMN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STRING"] = 1; + values[valuesById[2] = "REGEX"] = 2; + values[valuesById[3] = "CIDR"] = 3; + values[valuesById[4] = "NUMBER"] = 4; + return values; + })(); + + return DataTableColumnInfo; + })(); + + v1.GetDataTableOperationErrorsRequest = (function() { + + /** + * Properties of a GetDataTableOperationErrorsRequest. + * @memberof google.cloud.chronicle.v1 + * @interface IGetDataTableOperationErrorsRequest + * @property {string|null} [name] GetDataTableOperationErrorsRequest name + */ + + /** + * Constructs a new GetDataTableOperationErrorsRequest. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a GetDataTableOperationErrorsRequest. + * @implements IGetDataTableOperationErrorsRequest + * @constructor + * @param {google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest=} [properties] Properties to set + */ + function GetDataTableOperationErrorsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataTableOperationErrorsRequest name. + * @member {string} name + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @instance + */ + GetDataTableOperationErrorsRequest.prototype.name = ""; + + /** + * Creates a new GetDataTableOperationErrorsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @static + * @param {google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest} GetDataTableOperationErrorsRequest instance + */ + GetDataTableOperationErrorsRequest.create = function create(properties) { + return new GetDataTableOperationErrorsRequest(properties); + }; + + /** + * Encodes the specified GetDataTableOperationErrorsRequest message. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @static + * @param {google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest} message GetDataTableOperationErrorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataTableOperationErrorsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDataTableOperationErrorsRequest message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @static + * @param {google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest} message GetDataTableOperationErrorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataTableOperationErrorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataTableOperationErrorsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest} GetDataTableOperationErrorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataTableOperationErrorsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataTableOperationErrorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest} GetDataTableOperationErrorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataTableOperationErrorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataTableOperationErrorsRequest message. + * @function verify + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataTableOperationErrorsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetDataTableOperationErrorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest} GetDataTableOperationErrorsRequest + */ + GetDataTableOperationErrorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest) + return object; + var message = new $root.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataTableOperationErrorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @static + * @param {google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest} message GetDataTableOperationErrorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataTableOperationErrorsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetDataTableOperationErrorsRequest to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataTableOperationErrorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataTableOperationErrorsRequest + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataTableOperationErrorsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest"; + }; + + return GetDataTableOperationErrorsRequest; + })(); + + v1.DataTableOperationErrors = (function() { + + /** + * Properties of a DataTableOperationErrors. + * @memberof google.cloud.chronicle.v1 + * @interface IDataTableOperationErrors + * @property {string|null} [name] DataTableOperationErrors name + * @property {Array.|null} [rpcErrors] DataTableOperationErrors rpcErrors + */ + + /** + * Constructs a new DataTableOperationErrors. + * @memberof google.cloud.chronicle.v1 + * @classdesc Represents a DataTableOperationErrors. + * @implements IDataTableOperationErrors + * @constructor + * @param {google.cloud.chronicle.v1.IDataTableOperationErrors=} [properties] Properties to set + */ + function DataTableOperationErrors(properties) { + this.rpcErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataTableOperationErrors name. + * @member {string} name + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @instance + */ + DataTableOperationErrors.prototype.name = ""; + + /** + * DataTableOperationErrors rpcErrors. + * @member {Array.} rpcErrors + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @instance + */ + DataTableOperationErrors.prototype.rpcErrors = $util.emptyArray; + + /** + * Creates a new DataTableOperationErrors instance using the specified properties. + * @function create + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @static + * @param {google.cloud.chronicle.v1.IDataTableOperationErrors=} [properties] Properties to set + * @returns {google.cloud.chronicle.v1.DataTableOperationErrors} DataTableOperationErrors instance + */ + DataTableOperationErrors.create = function create(properties) { + return new DataTableOperationErrors(properties); + }; + + /** + * Encodes the specified DataTableOperationErrors message. Does not implicitly {@link google.cloud.chronicle.v1.DataTableOperationErrors.verify|verify} messages. + * @function encode + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @static + * @param {google.cloud.chronicle.v1.IDataTableOperationErrors} message DataTableOperationErrors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTableOperationErrors.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.rpcErrors != null && message.rpcErrors.length) + for (var i = 0; i < message.rpcErrors.length; ++i) + $root.google.rpc.Status.encode(message.rpcErrors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataTableOperationErrors message, length delimited. Does not implicitly {@link google.cloud.chronicle.v1.DataTableOperationErrors.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @static + * @param {google.cloud.chronicle.v1.IDataTableOperationErrors} message DataTableOperationErrors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTableOperationErrors.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataTableOperationErrors message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.chronicle.v1.DataTableOperationErrors} DataTableOperationErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTableOperationErrors.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.chronicle.v1.DataTableOperationErrors(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.rpcErrors && message.rpcErrors.length)) + message.rpcErrors = []; + message.rpcErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataTableOperationErrors message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.chronicle.v1.DataTableOperationErrors} DataTableOperationErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTableOperationErrors.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataTableOperationErrors message. + * @function verify + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataTableOperationErrors.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.rpcErrors != null && message.hasOwnProperty("rpcErrors")) { + if (!Array.isArray(message.rpcErrors)) + return "rpcErrors: array expected"; + for (var i = 0; i < message.rpcErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.rpcErrors[i]); + if (error) + return "rpcErrors." + error; + } + } + return null; + }; + + /** + * Creates a DataTableOperationErrors message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.chronicle.v1.DataTableOperationErrors} DataTableOperationErrors + */ + DataTableOperationErrors.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.chronicle.v1.DataTableOperationErrors) + return object; + var message = new $root.google.cloud.chronicle.v1.DataTableOperationErrors(); + if (object.name != null) + message.name = String(object.name); + if (object.rpcErrors) { + if (!Array.isArray(object.rpcErrors)) + throw TypeError(".google.cloud.chronicle.v1.DataTableOperationErrors.rpcErrors: array expected"); + message.rpcErrors = []; + for (var i = 0; i < object.rpcErrors.length; ++i) { + if (typeof object.rpcErrors[i] !== "object") + throw TypeError(".google.cloud.chronicle.v1.DataTableOperationErrors.rpcErrors: object expected"); + message.rpcErrors[i] = $root.google.rpc.Status.fromObject(object.rpcErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataTableOperationErrors message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @static + * @param {google.cloud.chronicle.v1.DataTableOperationErrors} message DataTableOperationErrors + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataTableOperationErrors.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rpcErrors = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.rpcErrors && message.rpcErrors.length) { + object.rpcErrors = []; + for (var j = 0; j < message.rpcErrors.length; ++j) + object.rpcErrors[j] = $root.google.rpc.Status.toObject(message.rpcErrors[j], options); + } + return object; + }; + + /** + * Converts this DataTableOperationErrors to JSON. + * @function toJSON + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @instance + * @returns {Object.} JSON object + */ + DataTableOperationErrors.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataTableOperationErrors + * @function getTypeUrl + * @memberof google.cloud.chronicle.v1.DataTableOperationErrors + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataTableOperationErrors.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.chronicle.v1.DataTableOperationErrors"; + }; + + return DataTableOperationErrors; + })(); + v1.EntityService = (function() { /** @@ -37191,6 +44537,292 @@ return protobuf; })(); + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + google.longrunning = (function() { /** @@ -39346,292 +46978,6 @@ return longrunning; })(); - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - google.type = (function() { /** diff --git a/packages/google-cloud-chronicle/protos/protos.json b/packages/google-cloud-chronicle/protos/protos.json index 37d6d0997610..cec915159f5e 100644 --- a/packages/google-cloud-chronicle/protos/protos.json +++ b/packages/google-cloud-chronicle/protos/protos.json @@ -641,6 +641,924 @@ } } }, + "DataTableService": { + "options": { + "(google.api.default_host)": "chronicle.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateDataTable": { + "requestType": "CreateDataTableRequest", + "responseType": "DataTable", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/instances/*}/dataTables", + "(google.api.http).body": "data_table", + "(google.api.method_signature)": "parent,data_table,data_table_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/instances/*}/dataTables", + "body": "data_table" + } + }, + { + "(google.api.method_signature)": "parent,data_table,data_table_id" + } + ] + }, + "ListDataTables": { + "requestType": "ListDataTablesRequest", + "responseType": "ListDataTablesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/instances/*}/dataTables", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/instances/*}/dataTables" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataTable": { + "requestType": "GetDataTableRequest", + "responseType": "DataTable", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/instances/*/dataTables/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/instances/*/dataTables/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataTable": { + "requestType": "UpdateDataTableRequest", + "responseType": "DataTable", + "options": { + "(google.api.http).patch": "/v1/{data_table.name=projects/*/locations/*/instances/*/dataTables/*}", + "(google.api.http).body": "data_table", + "(google.api.method_signature)": "data_table,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_table.name=projects/*/locations/*/instances/*/dataTables/*}", + "body": "data_table" + } + }, + { + "(google.api.method_signature)": "data_table,update_mask" + } + ] + }, + "DeleteDataTable": { + "requestType": "DeleteDataTableRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/instances/*/dataTables/*}", + "(google.api.method_signature)": "name,force" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/instances/*/dataTables/*}" + } + }, + { + "(google.api.method_signature)": "name,force" + } + ] + }, + "CreateDataTableRow": { + "requestType": "CreateDataTableRowRequest", + "responseType": "DataTableRow", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows", + "(google.api.http).body": "data_table_row", + "(google.api.method_signature)": "parent,data_table_row" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows", + "body": "data_table_row" + } + }, + { + "(google.api.method_signature)": "parent,data_table_row" + } + ] + }, + "UpdateDataTableRow": { + "requestType": "UpdateDataTableRowRequest", + "responseType": "DataTableRow", + "options": { + "(google.api.http).patch": "/v1/{data_table_row.name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}", + "(google.api.http).body": "data_table_row", + "(google.api.method_signature)": "data_table_row,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_table_row.name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}", + "body": "data_table_row" + } + }, + { + "(google.api.method_signature)": "data_table_row,update_mask" + } + ] + }, + "ListDataTableRows": { + "requestType": "ListDataTableRowsRequest", + "responseType": "ListDataTableRowsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataTableRow": { + "requestType": "GetDataTableRowRequest", + "responseType": "DataTableRow", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteDataTableRow": { + "requestType": "DeleteDataTableRowRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "BulkCreateDataTableRows": { + "requestType": "BulkCreateDataTableRowsRequest", + "responseType": "BulkCreateDataTableRowsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "BulkGetDataTableRows": { + "requestType": "BulkGetDataTableRowsRequest", + "responseType": "BulkGetDataTableRowsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkGet", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkGet", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "BulkReplaceDataTableRows": { + "requestType": "BulkReplaceDataTableRowsRequest", + "responseType": "BulkReplaceDataTableRowsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkReplace", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkReplace", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "BulkUpdateDataTableRows": { + "requestType": "BulkUpdateDataTableRowsRequest", + "responseType": "BulkUpdateDataTableRowsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkUpdate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkUpdate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "GetDataTableOperationErrors": { + "requestType": "GetDataTableOperationErrorsRequest", + "responseType": "DataTableOperationErrors", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/instances/*/dataTableOperationErrors/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/instances/*/dataTableOperationErrors/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "DataTableUpdateSource": { + "values": { + "DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED": 0, + "USER": 1, + "RULE": 2, + "SEARCH": 3 + } + }, + "CreateDataTableRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "chronicle.googleapis.com/DataTable" + } + }, + "dataTable": { + "type": "DataTable", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataTableId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetDataTableRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "chronicle.googleapis.com/DataTable" + } + } + } + }, + "UpdateDataTableRequest": { + "fields": { + "dataTable": { + "type": "DataTable", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataTablesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "chronicle.googleapis.com/DataTable" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteDataTableRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "chronicle.googleapis.com/DataTable" + } + }, + "force": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataTablesResponse": { + "fields": { + "dataTables": { + "rule": "repeated", + "type": "DataTable", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateDataTableRowRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "chronicle.googleapis.com/DataTableRow" + } + }, + "dataTableRow": { + "type": "DataTableRow", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateDataTableRowRequest": { + "fields": { + "dataTableRow": { + "type": "DataTableRow", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataTableRowsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "chronicle.googleapis.com/DataTableRow" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataTableRowsResponse": { + "fields": { + "dataTableRows": { + "rule": "repeated", + "type": "DataTableRow", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetDataTableRowRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "chronicle.googleapis.com/DataTableRow" + } + } + } + }, + "DeleteDataTableRowRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "chronicle.googleapis.com/DataTableRow" + } + } + } + }, + "BulkCreateDataTableRowsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "chronicle.googleapis.com/DataTableRow" + } + }, + "requests": { + "rule": "repeated", + "type": "CreateDataTableRowRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BulkCreateDataTableRowsResponse": { + "fields": { + "dataTableRows": { + "rule": "repeated", + "type": "DataTableRow", + "id": 1 + } + } + }, + "BulkGetDataTableRowsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "chronicle.googleapis.com/DataTableRow" + } + }, + "requests": { + "rule": "repeated", + "type": "GetDataTableRowRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BulkGetDataTableRowsResponse": { + "fields": { + "dataTableRows": { + "rule": "repeated", + "type": "DataTableRow", + "id": 1 + } + } + }, + "BulkReplaceDataTableRowsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "chronicle.googleapis.com/DataTableRow" + } + }, + "requests": { + "rule": "repeated", + "type": "CreateDataTableRowRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BulkReplaceDataTableRowsResponse": { + "fields": { + "dataTableRows": { + "rule": "repeated", + "type": "DataTableRow", + "id": 1 + } + } + }, + "BulkUpdateDataTableRowsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "chronicle.googleapis.com/DataTableRow" + } + }, + "requests": { + "rule": "repeated", + "type": "UpdateDataTableRowRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BulkUpdateDataTableRowsResponse": { + "fields": { + "dataTableRows": { + "rule": "repeated", + "type": "DataTableRow", + "id": 1 + } + } + }, + "DataTableScopeInfo": { + "fields": { + "dataAccessScopes": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "chronicle.googleapis.com/DataAccessScope" + } + } + } + }, + "DataTable": { + "options": { + "(google.api.resource).type": "chronicle.googleapis.com/DataTable", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}", + "(google.api.resource).plural": "dataTables", + "(google.api.resource).singular": "dataTable" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "columnInfo": { + "rule": "repeated", + "type": "DataTableColumnInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataTableUuid": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rules": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "ruleAssociationsCount": { + "type": "int32", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rowTimeToLive": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "approximateRowCount": { + "type": "int64", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "scopeInfo": { + "type": "DataTableScopeInfo", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "updateSource": { + "type": "DataTableUpdateSource", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rowTimeToLiveUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataTableRow": { + "options": { + "(google.api.resource).type": "chronicle.googleapis.com/DataTableRow", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}", + "(google.api.resource).plural": "dataTableRows", + "(google.api.resource).singular": "dataTableRow" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rowTimeToLive": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataTableColumnInfo": { + "oneofs": { + "pathOrType": { + "oneof": [ + "mappedColumnPath", + "columnType" + ] + } + }, + "fields": { + "mappedColumnPath": { + "type": "string", + "id": 3 + }, + "columnType": { + "type": "DataTableColumnType", + "id": 4 + }, + "columnIndex": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "originalColumn": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "keyColumn": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "repeatedValues": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DataTableColumnType": { + "values": { + "DATA_TABLE_COLUMN_TYPE_UNSPECIFIED": 0, + "STRING": 1, + "REGEX": 2, + "CIDR": 3, + "NUMBER": 4 + } + } + } + }, + "GetDataTableOperationErrorsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "chronicle.googleapis.com/DataTableOperationErrors" + } + } + } + }, + "DataTableOperationErrors": { + "options": { + "(google.api.resource).type": "chronicle.googleapis.com/DataTableOperationErrors", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}", + "(google.api.resource).plural": "dataTableOperationErrors", + "(google.api.resource).singular": "dataTableOperationErrors" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "rpcErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 3 + } + } + }, "EntityService": { "options": { "(google.api.default_host)": "chronicle.googleapis.com", @@ -4161,6 +5079,35 @@ } } }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, "longrunning": { "options": { "cc_enable_arenas": true, @@ -4377,35 +5324,6 @@ } } }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - }, "type": { "options": { "cc_enable_arenas": true, diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_create_data_table_rows.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_create_data_table_rows.js new file mode 100644 index 000000000000..97b7513951c6 --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_create_data_table_rows.js @@ -0,0 +1,70 @@ +// Copyright 2026 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(parent, requests) { + // [START chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_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. + */ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + */ + // const parent = 'abc123' + /** + * Required. Data table rows to create. A maximum of 1000 rows (for sync + * requests) or 2000 rows (for async requests) can be created in a single + * request. Total size of the rows should be less than 4MB. + */ + // const requests = [1,2,3,4] + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callBulkCreateDataTableRows() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await chronicleClient.bulkCreateDataTableRows(request); + console.log(response); + } + + callBulkCreateDataTableRows(); + // [END chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_get_data_table_rows.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_get_data_table_rows.js new file mode 100644 index 000000000000..5c6b8322eeba --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_get_data_table_rows.js @@ -0,0 +1,69 @@ +// Copyright 2026 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(parent, requests) { + // [START chronicle_v1_generated_DataTableService_BulkGetDataTableRows_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. + */ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + */ + // const parent = 'abc123' + /** + * Required. Data table rows to get. At max 1,000 rows can be there in a + * request. + */ + // const requests = [1,2,3,4] + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callBulkGetDataTableRows() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await chronicleClient.bulkGetDataTableRows(request); + console.log(response); + } + + callBulkGetDataTableRows(); + // [END chronicle_v1_generated_DataTableService_BulkGetDataTableRows_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_replace_data_table_rows.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_replace_data_table_rows.js new file mode 100644 index 000000000000..ada7085e794f --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_replace_data_table_rows.js @@ -0,0 +1,71 @@ +// Copyright 2026 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(parent, requests) { + // [START chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_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. + */ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + */ + // const parent = 'abc123' + /** + * Required. Data table rows to replace the existing data table rows. A + * maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + * can be replaced in a single request. Total size of the rows should be less + * than 4MB. + */ + // const requests = [1,2,3,4] + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callBulkReplaceDataTableRows() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await chronicleClient.bulkReplaceDataTableRows(request); + console.log(response); + } + + callBulkReplaceDataTableRows(); + // [END chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_update_data_table_rows.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_update_data_table_rows.js new file mode 100644 index 000000000000..45dbfe63555a --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.bulk_update_data_table_rows.js @@ -0,0 +1,69 @@ +// Copyright 2026 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(parent, requests) { + // [START chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_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. + */ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + */ + // const parent = 'abc123' + /** + * Required. Data table rows to update. At max 1,000 rows (or rows with size + * less than 2MB) can be there in a request. + */ + // const requests = [1,2,3,4] + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callBulkUpdateDataTableRows() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await chronicleClient.bulkUpdateDataTableRows(request); + console.log(response); + } + + callBulkUpdateDataTableRows(); + // [END chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.create_data_table.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.create_data_table.js new file mode 100644 index 000000000000..5292be57a224 --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.create_data_table.js @@ -0,0 +1,76 @@ +// Copyright 2026 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(parent, dataTable, dataTableId) { + // [START chronicle_v1_generated_DataTableService_CreateDataTable_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. + */ + /** + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + */ + // const parent = 'abc123' + /** + * Required. The data table being created. + */ + // const dataTable = {} + /** + * Required. The ID to use for the data table. This is also the display name + * for the data table. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + */ + // const dataTableId = 'abc123' + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callCreateDataTable() { + // Construct request + const request = { + parent, + dataTable, + dataTableId, + }; + + // Run request + const response = await chronicleClient.createDataTable(request); + console.log(response); + } + + callCreateDataTable(); + // [END chronicle_v1_generated_DataTableService_CreateDataTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.create_data_table_row.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.create_data_table_row.js new file mode 100644 index 000000000000..9ed00b0f585c --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.create_data_table_row.js @@ -0,0 +1,68 @@ +// Copyright 2026 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(parent, dataTableRow) { + // [START chronicle_v1_generated_DataTableService_CreateDataTableRow_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. + */ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + */ + // const parent = 'abc123' + /** + * Required. The data table row to create. + */ + // const dataTableRow = {} + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callCreateDataTableRow() { + // Construct request + const request = { + parent, + dataTableRow, + }; + + // Run request + const response = await chronicleClient.createDataTableRow(request); + console.log(response); + } + + callCreateDataTableRow(); + // [END chronicle_v1_generated_DataTableService_CreateDataTableRow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.delete_data_table.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.delete_data_table.js new file mode 100644 index 000000000000..c46c9bd7f965 --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.delete_data_table.js @@ -0,0 +1,69 @@ +// Copyright 2026 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(name) { + // [START chronicle_v1_generated_DataTableService_DeleteDataTable_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. + */ + /** + * Required. The resource name of the data table to delete. + * Format + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + */ + // const name = 'abc123' + /** + * Optional. If set to true, any rows under this data table will also be + * deleted. (Otherwise, the request will only work if the data table has no + * rows.) + */ + // const force = true + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callDeleteDataTable() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await chronicleClient.deleteDataTable(request); + console.log(response); + } + + callDeleteDataTable(); + // [END chronicle_v1_generated_DataTableService_DeleteDataTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.delete_data_table_row.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.delete_data_table_row.js new file mode 100644 index 000000000000..4797f5b243c1 --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.delete_data_table_row.js @@ -0,0 +1,63 @@ +// Copyright 2026 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(name) { + // [START chronicle_v1_generated_DataTableService_DeleteDataTableRow_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. + */ + /** + * Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + */ + // const name = 'abc123' + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callDeleteDataTableRow() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await chronicleClient.deleteDataTableRow(request); + console.log(response); + } + + callDeleteDataTableRow(); + // [END chronicle_v1_generated_DataTableService_DeleteDataTableRow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table.js new file mode 100644 index 000000000000..091b3239f808 --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table.js @@ -0,0 +1,63 @@ +// Copyright 2026 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(name) { + // [START chronicle_v1_generated_DataTableService_GetDataTable_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. + */ + /** + * Required. The resource name of the data table to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + */ + // const name = 'abc123' + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callGetDataTable() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await chronicleClient.getDataTable(request); + console.log(response); + } + + callGetDataTable(); + // [END chronicle_v1_generated_DataTableService_GetDataTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table_operation_errors.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table_operation_errors.js new file mode 100644 index 000000000000..a844e5aaeca1 --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table_operation_errors.js @@ -0,0 +1,63 @@ +// Copyright 2026 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(name) { + // [START chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_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. + */ + /** + * Required. Resource name for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + */ + // const name = 'abc123' + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callGetDataTableOperationErrors() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await chronicleClient.getDataTableOperationErrors(request); + console.log(response); + } + + callGetDataTableOperationErrors(); + // [END chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table_row.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table_row.js new file mode 100644 index 000000000000..82339c635a89 --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.get_data_table_row.js @@ -0,0 +1,63 @@ +// Copyright 2026 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(name) { + // [START chronicle_v1_generated_DataTableService_GetDataTableRow_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. + */ + /** + * Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + */ + // const name = 'abc123' + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callGetDataTableRow() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await chronicleClient.getDataTableRow(request); + console.log(response); + } + + callGetDataTableRow(); + // [END chronicle_v1_generated_DataTableService_GetDataTableRow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.list_data_table_rows.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.list_data_table_rows.js new file mode 100644 index 000000000000..13bf29366eeb --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.list_data_table_rows.js @@ -0,0 +1,86 @@ +// Copyright 2026 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(parent) { + // [START chronicle_v1_generated_DataTableService_ListDataTableRows_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. + */ + /** + * Required. The resource id of the data table. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of data table rows to return. The service may + * return fewer than this value. If unspecified, at most 100 data table rows + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListDataTableRows` call. + */ + // const pageToken = 'abc123' + /** + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + */ + // const orderBy = 'abc123' + /** + * Optional. Filter facilitating search over data table rows. This filter + * performs a case-insensitive substring match on the row values. + */ + // const filter = 'abc123' + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callListDataTableRows() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = chronicleClient.listDataTableRowsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataTableRows(); + // [END chronicle_v1_generated_DataTableService_ListDataTableRows_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.list_data_tables.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.list_data_tables.js new file mode 100644 index 000000000000..25dcd64776f3 --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.list_data_tables.js @@ -0,0 +1,84 @@ +// Copyright 2026 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(parent) { + // [START chronicle_v1_generated_DataTableService_ListDataTables_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. + */ + /** + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of data tables to return. The service may + * return fewer than this value. If unspecified, at most 100 data tables will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListDataTables` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataTables` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + */ + // const orderBy = 'abc123' + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callListDataTables() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = chronicleClient.listDataTablesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataTables(); + // [END chronicle_v1_generated_DataTableService_ListDataTables_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.update_data_table.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.update_data_table.js new file mode 100644 index 000000000000..3b4168a9cd7f --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.update_data_table.js @@ -0,0 +1,70 @@ +// Copyright 2026 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(dataTable) { + // [START chronicle_v1_generated_DataTableService_UpdateDataTable_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. + */ + /** + * Required. This field is used to identify the datatable to update. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + */ + // const dataTable = {} + /** + * Optional. The list of metadata fields to update. Currently data tables only + * support updating the `description`, `row_time_to_live` and `scope_info` + * fields. When no field mask is supplied, all non-empty fields will be + * updated. A field mask of "*" will update all fields, whether empty or not. + */ + // const updateMask = {} + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callUpdateDataTable() { + // Construct request + const request = { + dataTable, + }; + + // Run request + const response = await chronicleClient.updateDataTable(request); + console.log(response); + } + + callUpdateDataTable(); + // [END chronicle_v1_generated_DataTableService_UpdateDataTable_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.update_data_table_row.js b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.update_data_table_row.js new file mode 100644 index 000000000000..0eb620dfc505 --- /dev/null +++ b/packages/google-cloud-chronicle/samples/generated/v1/data_table_service.update_data_table_row.js @@ -0,0 +1,69 @@ +// Copyright 2026 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(dataTableRow) { + // [START chronicle_v1_generated_DataTableService_UpdateDataTableRow_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. + */ + /** + * Required. Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + */ + // const dataTableRow = {} + /** + * Optional. The list of fields to update. Currently data table rows only + * support updating the `values` field. When no field mask is supplied, all + * non-empty fields will be updated. A field mask of "*" will update all + * fields, whether empty or not. + */ + // const updateMask = {} + + // Imports the Chronicle library + const {DataTableServiceClient} = require('@google-cloud/chronicle').v1; + + // Instantiates a client + const chronicleClient = new DataTableServiceClient(); + + async function callUpdateDataTableRow() { + // Construct request + const request = { + dataTableRow, + }; + + // Run request + const response = await chronicleClient.updateDataTableRow(request); + console.log(response); + } + + callUpdateDataTableRow(); + // [END chronicle_v1_generated_DataTableService_UpdateDataTableRow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-chronicle/samples/generated/v1/snippet_metadata_google.cloud.chronicle.v1.json b/packages/google-cloud-chronicle/samples/generated/v1/snippet_metadata_google.cloud.chronicle.v1.json index 901301c8701d..5d96010134b3 100644 --- a/packages/google-cloud-chronicle/samples/generated/v1/snippet_metadata_google.cloud.chronicle.v1.json +++ b/packages/google-cloud-chronicle/samples/generated/v1/snippet_metadata_google.cloud.chronicle.v1.json @@ -459,6 +459,674 @@ } } }, + { + "regionTag": "chronicle_v1_generated_DataTableService_CreateDataTable_async", + "title": "DataAccessControlService createDataTable Sample", + "origin": "API_DEFINITION", + "description": " Create a new data table.", + "canonical": true, + "file": "data_table_service.create_data_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataTable", + "fullName": "google.cloud.chronicle.v1.DataTableService.CreateDataTable", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_table", + "type": ".google.cloud.chronicle.v1.DataTable" + }, + { + "name": "data_table_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.chronicle.v1.DataTable", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "CreateDataTable", + "fullName": "google.cloud.chronicle.v1.DataTableService.CreateDataTable", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_ListDataTables_async", + "title": "DataAccessControlService listDataTables Sample", + "origin": "API_DEFINITION", + "description": " List data tables.", + "canonical": true, + "file": "data_table_service.list_data_tables.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataTables", + "fullName": "google.cloud.chronicle.v1.DataTableService.ListDataTables", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.chronicle.v1.ListDataTablesResponse", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "ListDataTables", + "fullName": "google.cloud.chronicle.v1.DataTableService.ListDataTables", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_GetDataTable_async", + "title": "DataAccessControlService getDataTable Sample", + "origin": "API_DEFINITION", + "description": " Get data table info.", + "canonical": true, + "file": "data_table_service.get_data_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataTable", + "fullName": "google.cloud.chronicle.v1.DataTableService.GetDataTable", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.chronicle.v1.DataTable", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "GetDataTable", + "fullName": "google.cloud.chronicle.v1.DataTableService.GetDataTable", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_UpdateDataTable_async", + "title": "DataAccessControlService updateDataTable Sample", + "origin": "API_DEFINITION", + "description": " Update data table.", + "canonical": true, + "file": "data_table_service.update_data_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataTable", + "fullName": "google.cloud.chronicle.v1.DataTableService.UpdateDataTable", + "async": true, + "parameters": [ + { + "name": "data_table", + "type": ".google.cloud.chronicle.v1.DataTable" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.chronicle.v1.DataTable", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "UpdateDataTable", + "fullName": "google.cloud.chronicle.v1.DataTableService.UpdateDataTable", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_DeleteDataTable_async", + "title": "DataAccessControlService deleteDataTable Sample", + "origin": "API_DEFINITION", + "description": " Delete data table.", + "canonical": true, + "file": "data_table_service.delete_data_table.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataTable", + "fullName": "google.cloud.chronicle.v1.DataTableService.DeleteDataTable", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "DeleteDataTable", + "fullName": "google.cloud.chronicle.v1.DataTableService.DeleteDataTable", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_CreateDataTableRow_async", + "title": "DataAccessControlService createDataTableRow Sample", + "origin": "API_DEFINITION", + "description": " Create a new data table row.", + "canonical": true, + "file": "data_table_service.create_data_table_row.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataTableRow", + "fullName": "google.cloud.chronicle.v1.DataTableService.CreateDataTableRow", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_table_row", + "type": ".google.cloud.chronicle.v1.DataTableRow" + } + ], + "resultType": ".google.cloud.chronicle.v1.DataTableRow", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "CreateDataTableRow", + "fullName": "google.cloud.chronicle.v1.DataTableService.CreateDataTableRow", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_UpdateDataTableRow_async", + "title": "DataAccessControlService updateDataTableRow Sample", + "origin": "API_DEFINITION", + "description": " Update data table row", + "canonical": true, + "file": "data_table_service.update_data_table_row.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataTableRow", + "fullName": "google.cloud.chronicle.v1.DataTableService.UpdateDataTableRow", + "async": true, + "parameters": [ + { + "name": "data_table_row", + "type": ".google.cloud.chronicle.v1.DataTableRow" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.chronicle.v1.DataTableRow", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "UpdateDataTableRow", + "fullName": "google.cloud.chronicle.v1.DataTableService.UpdateDataTableRow", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_ListDataTableRows_async", + "title": "DataAccessControlService listDataTableRows Sample", + "origin": "API_DEFINITION", + "description": " List data table rows.", + "canonical": true, + "file": "data_table_service.list_data_table_rows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.ListDataTableRows", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.chronicle.v1.ListDataTableRowsResponse", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "ListDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.ListDataTableRows", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_GetDataTableRow_async", + "title": "DataAccessControlService getDataTableRow Sample", + "origin": "API_DEFINITION", + "description": " Get data table row", + "canonical": true, + "file": "data_table_service.get_data_table_row.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataTableRow", + "fullName": "google.cloud.chronicle.v1.DataTableService.GetDataTableRow", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.chronicle.v1.DataTableRow", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "GetDataTableRow", + "fullName": "google.cloud.chronicle.v1.DataTableService.GetDataTableRow", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_DeleteDataTableRow_async", + "title": "DataAccessControlService deleteDataTableRow Sample", + "origin": "API_DEFINITION", + "description": " Delete data table row.", + "canonical": true, + "file": "data_table_service.delete_data_table_row.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataTableRow", + "fullName": "google.cloud.chronicle.v1.DataTableService.DeleteDataTableRow", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "DeleteDataTableRow", + "fullName": "google.cloud.chronicle.v1.DataTableService.DeleteDataTableRow", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_async", + "title": "DataAccessControlService bulkCreateDataTableRows Sample", + "origin": "API_DEFINITION", + "description": " Create data table rows in bulk.", + "canonical": true, + "file": "data_table_service.bulk_create_data_table_rows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BulkCreateDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.BulkCreateDataTableRows", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "BulkCreateDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.BulkCreateDataTableRows", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_BulkGetDataTableRows_async", + "title": "DataAccessControlService bulkGetDataTableRows Sample", + "origin": "API_DEFINITION", + "description": " Get data table rows in bulk.", + "canonical": true, + "file": "data_table_service.bulk_get_data_table_rows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BulkGetDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.BulkGetDataTableRows", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.chronicle.v1.BulkGetDataTableRowsResponse", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "BulkGetDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.BulkGetDataTableRows", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_async", + "title": "DataAccessControlService bulkReplaceDataTableRows Sample", + "origin": "API_DEFINITION", + "description": " Replace all existing data table rows with new data table rows.", + "canonical": true, + "file": "data_table_service.bulk_replace_data_table_rows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BulkReplaceDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.BulkReplaceDataTableRows", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "BulkReplaceDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.BulkReplaceDataTableRows", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_async", + "title": "DataAccessControlService bulkUpdateDataTableRows Sample", + "origin": "API_DEFINITION", + "description": " Update data table rows in bulk.", + "canonical": true, + "file": "data_table_service.bulk_update_data_table_rows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BulkUpdateDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.BulkUpdateDataTableRows", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "BulkUpdateDataTableRows", + "fullName": "google.cloud.chronicle.v1.DataTableService.BulkUpdateDataTableRows", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, + { + "regionTag": "chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_async", + "title": "DataAccessControlService getDataTableOperationErrors Sample", + "origin": "API_DEFINITION", + "description": " Get the error for a data table operation.", + "canonical": true, + "file": "data_table_service.get_data_table_operation_errors.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataTableOperationErrors", + "fullName": "google.cloud.chronicle.v1.DataTableService.GetDataTableOperationErrors", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.chronicle.v1.DataTableOperationErrors", + "client": { + "shortName": "DataTableServiceClient", + "fullName": "google.cloud.chronicle.v1.DataTableServiceClient" + }, + "method": { + "shortName": "GetDataTableOperationErrors", + "fullName": "google.cloud.chronicle.v1.DataTableService.GetDataTableOperationErrors", + "service": { + "shortName": "DataTableService", + "fullName": "google.cloud.chronicle.v1.DataTableService" + } + } + } + }, { "regionTag": "chronicle_v1_generated_EntityService_GetWatchlist_async", "title": "DataAccessControlService getWatchlist Sample", diff --git a/packages/google-cloud-chronicle/src/index.ts b/packages/google-cloud-chronicle/src/index.ts index 29ed788b3288..b55f7f129cc7 100644 --- a/packages/google-cloud-chronicle/src/index.ts +++ b/packages/google-cloud-chronicle/src/index.ts @@ -20,6 +20,8 @@ import * as v1 from './v1'; const DataAccessControlServiceClient = v1.DataAccessControlServiceClient; type DataAccessControlServiceClient = v1.DataAccessControlServiceClient; +const DataTableServiceClient = v1.DataTableServiceClient; +type DataTableServiceClient = v1.DataTableServiceClient; const EntityServiceClient = v1.EntityServiceClient; type EntityServiceClient = v1.EntityServiceClient; const InstanceServiceClient = v1.InstanceServiceClient; @@ -29,7 +31,7 @@ type ReferenceListServiceClient = v1.ReferenceListServiceClient; const RuleServiceClient = v1.RuleServiceClient; type RuleServiceClient = v1.RuleServiceClient; -export {v1, DataAccessControlServiceClient, EntityServiceClient, InstanceServiceClient, ReferenceListServiceClient, RuleServiceClient}; -export default {v1, DataAccessControlServiceClient, EntityServiceClient, InstanceServiceClient, ReferenceListServiceClient, RuleServiceClient}; +export {v1, DataAccessControlServiceClient, DataTableServiceClient, EntityServiceClient, InstanceServiceClient, ReferenceListServiceClient, RuleServiceClient}; +export default {v1, DataAccessControlServiceClient, DataTableServiceClient, EntityServiceClient, InstanceServiceClient, ReferenceListServiceClient, RuleServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-chronicle/src/v1/data_access_control_service_client.ts b/packages/google-cloud-chronicle/src/v1/data_access_control_service_client.ts index 488a1f8f20ee..0e7d51140d25 100644 --- a/packages/google-cloud-chronicle/src/v1/data_access_control_service_client.ts +++ b/packages/google-cloud-chronicle/src/v1/data_access_control_service_client.ts @@ -184,6 +184,15 @@ export class DataAccessControlServiceClient { dataAccessScopePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}' ), + dataTablePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}' + ), + dataTableOperationErrorsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}' + ), + dataTableRowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}' + ), instancePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}' ), @@ -1749,6 +1758,205 @@ export class DataAccessControlServiceClient { return this.pathTemplates.dataAccessScopePathTemplate.match(dataAccessScopeName).data_access_scope; } + /** + * Return a fully-qualified dataTable resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @returns {string} Resource name string. + */ + dataTablePath(project:string,location:string,instance:string,dataTable:string) { + return this.pathTemplates.dataTablePathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + }); + } + + /** + * Parse the project from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).project; + } + + /** + * Parse the location from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).location; + } + + /** + * Parse the instance from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).instance; + } + + /** + * Parse the data_table from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).data_table; + } + + /** + * Return a fully-qualified dataTableOperationErrors resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table_operation_errors + * @returns {string} Resource name string. + */ + dataTableOperationErrorsPath(project:string,location:string,instance:string,dataTableOperationErrors:string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table_operation_errors: dataTableOperationErrors, + }); + } + + /** + * Parse the project from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).project; + } + + /** + * Parse the location from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).location; + } + + /** + * Parse the instance from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).instance; + } + + /** + * Parse the data_table_operation_errors from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the data_table_operation_errors. + */ + matchDataTableOperationErrorsFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).data_table_operation_errors; + } + + /** + * Return a fully-qualified dataTableRow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @param {string} data_table_row + * @returns {string} Resource name string. + */ + dataTableRowPath(project:string,location:string,instance:string,dataTable:string,dataTableRow:string) { + return this.pathTemplates.dataTableRowPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + data_table_row: dataTableRow, + }); + } + + /** + * Parse the project from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).project; + } + + /** + * Parse the location from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).location; + } + + /** + * Parse the instance from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).instance; + } + + /** + * Parse the data_table from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table; + } + + /** + * Parse the data_table_row from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table_row. + */ + matchDataTableRowFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table_row; + } + /** * Return a fully-qualified instance resource name string. * diff --git a/packages/google-cloud-chronicle/src/v1/data_access_control_service_proto_list.json b/packages/google-cloud-chronicle/src/v1/data_access_control_service_proto_list.json index f8650297d95f..34b4ed07113e 100644 --- a/packages/google-cloud-chronicle/src/v1/data_access_control_service_proto_list.json +++ b/packages/google-cloud-chronicle/src/v1/data_access_control_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/chronicle/v1/data_access_control.proto", + "../../protos/google/cloud/chronicle/v1/data_table.proto", "../../protos/google/cloud/chronicle/v1/entity.proto", "../../protos/google/cloud/chronicle/v1/instance.proto", "../../protos/google/cloud/chronicle/v1/reference_list.proto", diff --git a/packages/google-cloud-chronicle/src/v1/data_table_service_client.ts b/packages/google-cloud-chronicle/src/v1/data_table_service_client.ts new file mode 100644 index 000000000000..e7ccbc35fe8d --- /dev/null +++ b/packages/google-cloud-chronicle/src/v1/data_table_service_client.ts @@ -0,0 +1,2887 @@ +// Copyright 2026 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/data_table_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './data_table_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * DataTableManager provides an interface for managing data tables. + * @class + * @memberof v1 + */ +export class DataTableServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('chronicle'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + dataTableServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataTableServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataTableServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataTableServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'chronicle.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + dataAccessLabelPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}' + ), + dataAccessScopePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}' + ), + dataTablePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}' + ), + dataTableOperationErrorsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}' + ), + dataTableRowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}' + ), + instancePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + referenceListPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}' + ), + retrohuntPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}' + ), + rulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/rules/{rule}' + ), + ruleDeploymentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment' + ), + watchlistPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listDataTables: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataTables'), + listDataTableRows: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataTableRows') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.chronicle.v1.DataTableService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataTableServiceStub) { + return this.dataTableServiceStub; + } + + // Put together the "service stub" for + // google.cloud.chronicle.v1.DataTableService. + this.dataTableServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.chronicle.v1.DataTableService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.chronicle.v1.DataTableService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataTableServiceStubMethods = + ['createDataTable', 'listDataTables', 'getDataTable', 'updateDataTable', 'deleteDataTable', 'createDataTableRow', 'updateDataTableRow', 'listDataTableRows', 'getDataTableRow', 'deleteDataTableRow', 'bulkCreateDataTableRows', 'bulkGetDataTableRows', 'bulkReplaceDataTableRows', 'bulkUpdateDataTableRows', 'getDataTableOperationErrors']; + for (const methodName of dataTableServiceStubMethods) { + const callPromise = this.dataTableServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataTableServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'chronicle.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'chronicle.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/chronicle', + 'https://www.googleapis.com/auth/chronicle.readonly', + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Create a new data table. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @param {google.cloud.chronicle.v1.DataTable} request.dataTable + * Required. The data table being created. + * @param {string} request.dataTableId + * Required. The ID to use for the data table. This is also the display name + * for the data table. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.DataTable|DataTable}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.create_data_table.js + * region_tag:chronicle_v1_generated_DataTableService_CreateDataTable_async + */ + createDataTable( + request?: protos.google.cloud.chronicle.v1.ICreateDataTableRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.ICreateDataTableRequest|undefined, {}|undefined + ]>; + createDataTable( + request: protos.google.cloud.chronicle.v1.ICreateDataTableRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.ICreateDataTableRequest|null|undefined, + {}|null|undefined>): void; + createDataTable( + request: protos.google.cloud.chronicle.v1.ICreateDataTableRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.ICreateDataTableRequest|null|undefined, + {}|null|undefined>): void; + createDataTable( + request?: protos.google.cloud.chronicle.v1.ICreateDataTableRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.ICreateDataTableRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.ICreateDataTableRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.ICreateDataTableRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createDataTable request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.ICreateDataTableRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createDataTable response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createDataTable(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.ICreateDataTableRequest|undefined, + {}|undefined + ]) => { + this._log.info('createDataTable response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get data table info. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the data table to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.DataTable|DataTable}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.get_data_table.js + * region_tag:chronicle_v1_generated_DataTableService_GetDataTable_async + */ + getDataTable( + request?: protos.google.cloud.chronicle.v1.IGetDataTableRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IGetDataTableRequest|undefined, {}|undefined + ]>; + getDataTable( + request: protos.google.cloud.chronicle.v1.IGetDataTableRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IGetDataTableRequest|null|undefined, + {}|null|undefined>): void; + getDataTable( + request: protos.google.cloud.chronicle.v1.IGetDataTableRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IGetDataTableRequest|null|undefined, + {}|null|undefined>): void; + getDataTable( + request?: protos.google.cloud.chronicle.v1.IGetDataTableRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IGetDataTableRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IGetDataTableRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IGetDataTableRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getDataTable request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IGetDataTableRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDataTable response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDataTable(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IGetDataTableRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDataTable response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Update data table. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.chronicle.v1.DataTable} request.dataTable + * Required. This field is used to identify the datatable to update. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of metadata fields to update. Currently data tables only + * support updating the `description`, `row_time_to_live` and `scope_info` + * fields. When no field mask is supplied, all non-empty fields will be + * updated. A field mask of "*" will update all fields, whether empty or not. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.DataTable|DataTable}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.update_data_table.js + * region_tag:chronicle_v1_generated_DataTableService_UpdateDataTable_async + */ + updateDataTable( + request?: protos.google.cloud.chronicle.v1.IUpdateDataTableRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IUpdateDataTableRequest|undefined, {}|undefined + ]>; + updateDataTable( + request: protos.google.cloud.chronicle.v1.IUpdateDataTableRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IUpdateDataTableRequest|null|undefined, + {}|null|undefined>): void; + updateDataTable( + request: protos.google.cloud.chronicle.v1.IUpdateDataTableRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IUpdateDataTableRequest|null|undefined, + {}|null|undefined>): void; + updateDataTable( + request?: protos.google.cloud.chronicle.v1.IUpdateDataTableRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IUpdateDataTableRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IUpdateDataTableRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IUpdateDataTableRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'data_table.name': request.dataTable!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateDataTable request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IUpdateDataTableRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateDataTable response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateDataTable(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IDataTable, + protos.google.cloud.chronicle.v1.IUpdateDataTableRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateDataTable response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Delete data table. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the data table to delete. + * Format + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * @param {boolean} [request.force] + * Optional. If set to true, any rows under this data table will also be + * deleted. (Otherwise, the request will only work if the data table has no + * rows.) + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.delete_data_table.js + * region_tag:chronicle_v1_generated_DataTableService_DeleteDataTable_async + */ + deleteDataTable( + request?: protos.google.cloud.chronicle.v1.IDeleteDataTableRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRequest|undefined, {}|undefined + ]>; + deleteDataTable( + request: protos.google.cloud.chronicle.v1.IDeleteDataTableRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRequest|null|undefined, + {}|null|undefined>): void; + deleteDataTable( + request: protos.google.cloud.chronicle.v1.IDeleteDataTableRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRequest|null|undefined, + {}|null|undefined>): void; + deleteDataTable( + request?: protos.google.cloud.chronicle.v1.IDeleteDataTableRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteDataTable request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteDataTable response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteDataTable(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteDataTable response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Create a new data table row. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @param {google.cloud.chronicle.v1.DataTableRow} request.dataTableRow + * Required. The data table row to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.DataTableRow|DataTableRow}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.create_data_table_row.js + * region_tag:chronicle_v1_generated_DataTableService_CreateDataTableRow_async + */ + createDataTableRow( + request?: protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest|undefined, {}|undefined + ]>; + createDataTableRow( + request: protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest|null|undefined, + {}|null|undefined>): void; + createDataTableRow( + request: protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest|null|undefined, + {}|null|undefined>): void; + createDataTableRow( + request?: protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createDataTableRow request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createDataTableRow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createDataTableRow(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.ICreateDataTableRowRequest|undefined, + {}|undefined + ]) => { + this._log.info('createDataTableRow response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Update data table row + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.chronicle.v1.DataTableRow} request.dataTableRow + * Required. Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. Currently data table rows only + * support updating the `values` field. When no field mask is supplied, all + * non-empty fields will be updated. A field mask of "*" will update all + * fields, whether empty or not. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.DataTableRow|DataTableRow}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.update_data_table_row.js + * region_tag:chronicle_v1_generated_DataTableService_UpdateDataTableRow_async + */ + updateDataTableRow( + request?: protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest|undefined, {}|undefined + ]>; + updateDataTableRow( + request: protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest|null|undefined, + {}|null|undefined>): void; + updateDataTableRow( + request: protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest|null|undefined, + {}|null|undefined>): void; + updateDataTableRow( + request?: protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'data_table_row.name': request.dataTableRow!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateDataTableRow request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateDataTableRow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateDataTableRow(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IUpdateDataTableRowRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateDataTableRow response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get data table row + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.DataTableRow|DataTableRow}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.get_data_table_row.js + * region_tag:chronicle_v1_generated_DataTableService_GetDataTableRow_async + */ + getDataTableRow( + request?: protos.google.cloud.chronicle.v1.IGetDataTableRowRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IGetDataTableRowRequest|undefined, {}|undefined + ]>; + getDataTableRow( + request: protos.google.cloud.chronicle.v1.IGetDataTableRowRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IGetDataTableRowRequest|null|undefined, + {}|null|undefined>): void; + getDataTableRow( + request: protos.google.cloud.chronicle.v1.IGetDataTableRowRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IGetDataTableRowRequest|null|undefined, + {}|null|undefined>): void; + getDataTableRow( + request?: protos.google.cloud.chronicle.v1.IGetDataTableRowRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IGetDataTableRowRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IGetDataTableRowRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IGetDataTableRowRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getDataTableRow request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IGetDataTableRowRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDataTableRow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDataTableRow(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IDataTableRow, + protos.google.cloud.chronicle.v1.IGetDataTableRowRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDataTableRow response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Delete data table row. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.delete_data_table_row.js + * region_tag:chronicle_v1_generated_DataTableService_DeleteDataTableRow_async + */ + deleteDataTableRow( + request?: protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest|undefined, {}|undefined + ]>; + deleteDataTableRow( + request: protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest|null|undefined, + {}|null|undefined>): void; + deleteDataTableRow( + request: protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest|null|undefined, + {}|null|undefined>): void; + deleteDataTableRow( + request?: protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteDataTableRow request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteDataTableRow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteDataTableRow(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.chronicle.v1.IDeleteDataTableRowRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteDataTableRow response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Create data table rows in bulk. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @param {number[]} request.requests + * Required. Data table rows to create. A maximum of 1000 rows (for sync + * requests) or 2000 rows (for async requests) can be created in a single + * request. Total size of the rows should be less than 4MB. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse|BulkCreateDataTableRowsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.bulk_create_data_table_rows.js + * region_tag:chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_async + */ + bulkCreateDataTableRows( + request?: protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest|undefined, {}|undefined + ]>; + bulkCreateDataTableRows( + request: protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest|null|undefined, + {}|null|undefined>): void; + bulkCreateDataTableRows( + request: protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest|null|undefined, + {}|null|undefined>): void; + bulkCreateDataTableRows( + request?: protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('bulkCreateDataTableRows request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('bulkCreateDataTableRows response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.bulkCreateDataTableRows(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsRequest|undefined, + {}|undefined + ]) => { + this._log.info('bulkCreateDataTableRows response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get data table rows in bulk. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @param {number[]} request.requests + * Required. Data table rows to get. At max 1,000 rows can be there in a + * request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse|BulkGetDataTableRowsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.bulk_get_data_table_rows.js + * region_tag:chronicle_v1_generated_DataTableService_BulkGetDataTableRows_async + */ + bulkGetDataTableRows( + request?: protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest|undefined, {}|undefined + ]>; + bulkGetDataTableRows( + request: protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest|null|undefined, + {}|null|undefined>): void; + bulkGetDataTableRows( + request: protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest|null|undefined, + {}|null|undefined>): void; + bulkGetDataTableRows( + request?: protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('bulkGetDataTableRows request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('bulkGetDataTableRows response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.bulkGetDataTableRows(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsRequest|undefined, + {}|undefined + ]) => { + this._log.info('bulkGetDataTableRows response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Replace all existing data table rows with new data table rows. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @param {number[]} request.requests + * Required. Data table rows to replace the existing data table rows. A + * maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + * can be replaced in a single request. Total size of the rows should be less + * than 4MB. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse|BulkReplaceDataTableRowsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.bulk_replace_data_table_rows.js + * region_tag:chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_async + */ + bulkReplaceDataTableRows( + request?: protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest|undefined, {}|undefined + ]>; + bulkReplaceDataTableRows( + request: protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest|null|undefined, + {}|null|undefined>): void; + bulkReplaceDataTableRows( + request: protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest|null|undefined, + {}|null|undefined>): void; + bulkReplaceDataTableRows( + request?: protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('bulkReplaceDataTableRows request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('bulkReplaceDataTableRows response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.bulkReplaceDataTableRows(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsRequest|undefined, + {}|undefined + ]) => { + this._log.info('bulkReplaceDataTableRows response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Update data table rows in bulk. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @param {number[]} request.requests + * Required. Data table rows to update. At max 1,000 rows (or rows with size + * less than 2MB) can be there in a request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse|BulkUpdateDataTableRowsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.bulk_update_data_table_rows.js + * region_tag:chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_async + */ + bulkUpdateDataTableRows( + request?: protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest|undefined, {}|undefined + ]>; + bulkUpdateDataTableRows( + request: protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest|null|undefined, + {}|null|undefined>): void; + bulkUpdateDataTableRows( + request: protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest|null|undefined, + {}|null|undefined>): void; + bulkUpdateDataTableRows( + request?: protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('bulkUpdateDataTableRows request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('bulkUpdateDataTableRows response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.bulkUpdateDataTableRows(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse, + protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsRequest|undefined, + {}|undefined + ]) => { + this._log.info('bulkUpdateDataTableRows response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get the error for a data table operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.chronicle.v1.DataTableOperationErrors|DataTableOperationErrors}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.get_data_table_operation_errors.js + * region_tag:chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_async + */ + getDataTableOperationErrors( + request?: protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableOperationErrors, + protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest|undefined, {}|undefined + ]>; + getDataTableOperationErrors( + request: protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTableOperationErrors, + protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest|null|undefined, + {}|null|undefined>): void; + getDataTableOperationErrors( + request: protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest, + callback: Callback< + protos.google.cloud.chronicle.v1.IDataTableOperationErrors, + protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest|null|undefined, + {}|null|undefined>): void; + getDataTableOperationErrors( + request?: protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.chronicle.v1.IDataTableOperationErrors, + protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.chronicle.v1.IDataTableOperationErrors, + protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableOperationErrors, + protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getDataTableOperationErrors request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.chronicle.v1.IDataTableOperationErrors, + protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDataTableOperationErrors response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDataTableOperationErrors(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.chronicle.v1.IDataTableOperationErrors, + protos.google.cloud.chronicle.v1.IGetDataTableOperationErrorsRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDataTableOperationErrors response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * List data tables. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @param {number} [request.pageSize] + * Optional. The maximum number of data tables to return. The service may + * return fewer than this value. If unspecified, at most 100 data tables will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataTables` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataTables` must match the call that provided the page + * token. + * @param {string} [request.orderBy] + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.chronicle.v1.DataTable|DataTable}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDataTablesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataTables( + request?: protos.google.cloud.chronicle.v1.IListDataTablesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTable[], + protos.google.cloud.chronicle.v1.IListDataTablesRequest|null, + protos.google.cloud.chronicle.v1.IListDataTablesResponse + ]>; + listDataTables( + request: protos.google.cloud.chronicle.v1.IListDataTablesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTablesRequest, + protos.google.cloud.chronicle.v1.IListDataTablesResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTable>): void; + listDataTables( + request: protos.google.cloud.chronicle.v1.IListDataTablesRequest, + callback: PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTablesRequest, + protos.google.cloud.chronicle.v1.IListDataTablesResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTable>): void; + listDataTables( + request?: protos.google.cloud.chronicle.v1.IListDataTablesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTablesRequest, + protos.google.cloud.chronicle.v1.IListDataTablesResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTable>, + callback?: PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTablesRequest, + protos.google.cloud.chronicle.v1.IListDataTablesResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTable>): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTable[], + protos.google.cloud.chronicle.v1.IListDataTablesRequest|null, + protos.google.cloud.chronicle.v1.IListDataTablesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTablesRequest, + protos.google.cloud.chronicle.v1.IListDataTablesResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTable>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDataTables values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDataTables request %j', request); + return this.innerApiCalls + .listDataTables(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.chronicle.v1.IDataTable[], + protos.google.cloud.chronicle.v1.IListDataTablesRequest|null, + protos.google.cloud.chronicle.v1.IListDataTablesResponse + ]) => { + this._log.info('listDataTables values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDataTables`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @param {number} [request.pageSize] + * Optional. The maximum number of data tables to return. The service may + * return fewer than this value. If unspecified, at most 100 data tables will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataTables` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataTables` must match the call that provided the page + * token. + * @param {string} [request.orderBy] + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.chronicle.v1.DataTable|DataTable} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDataTablesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataTablesStream( + request?: protos.google.cloud.chronicle.v1.IListDataTablesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataTables']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataTables stream %j', request); + return this.descriptors.page.listDataTables.createStream( + this.innerApiCalls.listDataTables as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataTables`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @param {number} [request.pageSize] + * Optional. The maximum number of data tables to return. The service may + * return fewer than this value. If unspecified, at most 100 data tables will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataTables` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataTables` must match the call that provided the page + * token. + * @param {string} [request.orderBy] + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.chronicle.v1.DataTable|DataTable}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.list_data_tables.js + * region_tag:chronicle_v1_generated_DataTableService_ListDataTables_async + */ + listDataTablesAsync( + request?: protos.google.cloud.chronicle.v1.IListDataTablesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataTables']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataTables iterate %j', request); + return this.descriptors.page.listDataTables.asyncIterate( + this.innerApiCalls['listDataTables'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List data table rows. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource id of the data table. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * @param {number} [request.pageSize] + * Optional. The maximum number of data table rows to return. The service may + * return fewer than this value. If unspecified, at most 100 data table rows + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataTableRows` call. + * @param {string} [request.orderBy] + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * @param {string} [request.filter] + * Optional. Filter facilitating search over data table rows. This filter + * performs a case-insensitive substring match on the row values. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.chronicle.v1.DataTableRow|DataTableRow}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDataTableRowsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataTableRows( + request?: protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableRow[], + protos.google.cloud.chronicle.v1.IListDataTableRowsRequest|null, + protos.google.cloud.chronicle.v1.IListDataTableRowsResponse + ]>; + listDataTableRows( + request: protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + protos.google.cloud.chronicle.v1.IListDataTableRowsResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTableRow>): void; + listDataTableRows( + request: protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + callback: PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + protos.google.cloud.chronicle.v1.IListDataTableRowsResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTableRow>): void; + listDataTableRows( + request?: protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + protos.google.cloud.chronicle.v1.IListDataTableRowsResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTableRow>, + callback?: PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + protos.google.cloud.chronicle.v1.IListDataTableRowsResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTableRow>): + Promise<[ + protos.google.cloud.chronicle.v1.IDataTableRow[], + protos.google.cloud.chronicle.v1.IListDataTableRowsRequest|null, + protos.google.cloud.chronicle.v1.IListDataTableRowsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + protos.google.cloud.chronicle.v1.IListDataTableRowsResponse|null|undefined, + protos.google.cloud.chronicle.v1.IDataTableRow>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDataTableRows values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDataTableRows request %j', request); + return this.innerApiCalls + .listDataTableRows(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.chronicle.v1.IDataTableRow[], + protos.google.cloud.chronicle.v1.IListDataTableRowsRequest|null, + protos.google.cloud.chronicle.v1.IListDataTableRowsResponse + ]) => { + this._log.info('listDataTableRows values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDataTableRows`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource id of the data table. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * @param {number} [request.pageSize] + * Optional. The maximum number of data table rows to return. The service may + * return fewer than this value. If unspecified, at most 100 data table rows + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataTableRows` call. + * @param {string} [request.orderBy] + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * @param {string} [request.filter] + * Optional. Filter facilitating search over data table rows. This filter + * performs a case-insensitive substring match on the row values. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.chronicle.v1.DataTableRow|DataTableRow} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDataTableRowsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataTableRowsStream( + request?: protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataTableRows']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataTableRows stream %j', request); + return this.descriptors.page.listDataTableRows.createStream( + this.innerApiCalls.listDataTableRows as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataTableRows`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource id of the data table. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * @param {number} [request.pageSize] + * Optional. The maximum number of data table rows to return. The service may + * return fewer than this value. If unspecified, at most 100 data table rows + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataTableRows` call. + * @param {string} [request.orderBy] + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * @param {string} [request.filter] + * Optional. Filter facilitating search over data table rows. This filter + * performs a case-insensitive substring match on the row values. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.chronicle.v1.DataTableRow|DataTableRow}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_table_service.list_data_table_rows.js + * region_tag:chronicle_v1_generated_DataTableService_ListDataTableRows_async + */ + listDataTableRowsAsync( + request?: protos.google.cloud.chronicle.v1.IListDataTableRowsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataTableRows']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataTableRows iterate %j', request); + return this.descriptors.page.listDataTableRows.asyncIterate( + this.innerApiCalls['listDataTableRows'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified dataAccessLabel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_access_label + * @returns {string} Resource name string. + */ + dataAccessLabelPath(project:string,location:string,instance:string,dataAccessLabel:string) { + return this.pathTemplates.dataAccessLabelPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_access_label: dataAccessLabel, + }); + } + + /** + * Parse the project from DataAccessLabel resource. + * + * @param {string} dataAccessLabelName + * A fully-qualified path representing DataAccessLabel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAccessLabelName(dataAccessLabelName: string) { + return this.pathTemplates.dataAccessLabelPathTemplate.match(dataAccessLabelName).project; + } + + /** + * Parse the location from DataAccessLabel resource. + * + * @param {string} dataAccessLabelName + * A fully-qualified path representing DataAccessLabel resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAccessLabelName(dataAccessLabelName: string) { + return this.pathTemplates.dataAccessLabelPathTemplate.match(dataAccessLabelName).location; + } + + /** + * Parse the instance from DataAccessLabel resource. + * + * @param {string} dataAccessLabelName + * A fully-qualified path representing DataAccessLabel resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataAccessLabelName(dataAccessLabelName: string) { + return this.pathTemplates.dataAccessLabelPathTemplate.match(dataAccessLabelName).instance; + } + + /** + * Parse the data_access_label from DataAccessLabel resource. + * + * @param {string} dataAccessLabelName + * A fully-qualified path representing DataAccessLabel resource. + * @returns {string} A string representing the data_access_label. + */ + matchDataAccessLabelFromDataAccessLabelName(dataAccessLabelName: string) { + return this.pathTemplates.dataAccessLabelPathTemplate.match(dataAccessLabelName).data_access_label; + } + + /** + * Return a fully-qualified dataAccessScope resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_access_scope + * @returns {string} Resource name string. + */ + dataAccessScopePath(project:string,location:string,instance:string,dataAccessScope:string) { + return this.pathTemplates.dataAccessScopePathTemplate.render({ + project: project, + location: location, + instance: instance, + data_access_scope: dataAccessScope, + }); + } + + /** + * Parse the project from DataAccessScope resource. + * + * @param {string} dataAccessScopeName + * A fully-qualified path representing DataAccessScope resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAccessScopeName(dataAccessScopeName: string) { + return this.pathTemplates.dataAccessScopePathTemplate.match(dataAccessScopeName).project; + } + + /** + * Parse the location from DataAccessScope resource. + * + * @param {string} dataAccessScopeName + * A fully-qualified path representing DataAccessScope resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAccessScopeName(dataAccessScopeName: string) { + return this.pathTemplates.dataAccessScopePathTemplate.match(dataAccessScopeName).location; + } + + /** + * Parse the instance from DataAccessScope resource. + * + * @param {string} dataAccessScopeName + * A fully-qualified path representing DataAccessScope resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataAccessScopeName(dataAccessScopeName: string) { + return this.pathTemplates.dataAccessScopePathTemplate.match(dataAccessScopeName).instance; + } + + /** + * Parse the data_access_scope from DataAccessScope resource. + * + * @param {string} dataAccessScopeName + * A fully-qualified path representing DataAccessScope resource. + * @returns {string} A string representing the data_access_scope. + */ + matchDataAccessScopeFromDataAccessScopeName(dataAccessScopeName: string) { + return this.pathTemplates.dataAccessScopePathTemplate.match(dataAccessScopeName).data_access_scope; + } + + /** + * Return a fully-qualified dataTable resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @returns {string} Resource name string. + */ + dataTablePath(project:string,location:string,instance:string,dataTable:string) { + return this.pathTemplates.dataTablePathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + }); + } + + /** + * Parse the project from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).project; + } + + /** + * Parse the location from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).location; + } + + /** + * Parse the instance from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).instance; + } + + /** + * Parse the data_table from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).data_table; + } + + /** + * Return a fully-qualified dataTableOperationErrors resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table_operation_errors + * @returns {string} Resource name string. + */ + dataTableOperationErrorsPath(project:string,location:string,instance:string,dataTableOperationErrors:string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table_operation_errors: dataTableOperationErrors, + }); + } + + /** + * Parse the project from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).project; + } + + /** + * Parse the location from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).location; + } + + /** + * Parse the instance from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).instance; + } + + /** + * Parse the data_table_operation_errors from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the data_table_operation_errors. + */ + matchDataTableOperationErrorsFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).data_table_operation_errors; + } + + /** + * Return a fully-qualified dataTableRow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @param {string} data_table_row + * @returns {string} Resource name string. + */ + dataTableRowPath(project:string,location:string,instance:string,dataTable:string,dataTableRow:string) { + return this.pathTemplates.dataTableRowPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + data_table_row: dataTableRow, + }); + } + + /** + * Parse the project from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).project; + } + + /** + * Parse the location from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).location; + } + + /** + * Parse the instance from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).instance; + } + + /** + * Parse the data_table from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table; + } + + /** + * Parse the data_table_row from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table_row. + */ + matchDataTableRowFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table_row; + } + + /** + * Return a fully-qualified instance resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + instancePath(project:string,location:string,instance:string) { + return this.pathTemplates.instancePathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).project; + } + + /** + * Parse the location from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the location. + */ + matchLocationFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).location; + } + + /** + * Parse the instance from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).instance; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified referenceList resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} reference_list + * @returns {string} Resource name string. + */ + referenceListPath(project:string,location:string,instance:string,referenceList:string) { + return this.pathTemplates.referenceListPathTemplate.render({ + project: project, + location: location, + instance: instance, + reference_list: referenceList, + }); + } + + /** + * Parse the project from ReferenceList resource. + * + * @param {string} referenceListName + * A fully-qualified path representing ReferenceList resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReferenceListName(referenceListName: string) { + return this.pathTemplates.referenceListPathTemplate.match(referenceListName).project; + } + + /** + * Parse the location from ReferenceList resource. + * + * @param {string} referenceListName + * A fully-qualified path representing ReferenceList resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReferenceListName(referenceListName: string) { + return this.pathTemplates.referenceListPathTemplate.match(referenceListName).location; + } + + /** + * Parse the instance from ReferenceList resource. + * + * @param {string} referenceListName + * A fully-qualified path representing ReferenceList resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromReferenceListName(referenceListName: string) { + return this.pathTemplates.referenceListPathTemplate.match(referenceListName).instance; + } + + /** + * Parse the reference_list from ReferenceList resource. + * + * @param {string} referenceListName + * A fully-qualified path representing ReferenceList resource. + * @returns {string} A string representing the reference_list. + */ + matchReferenceListFromReferenceListName(referenceListName: string) { + return this.pathTemplates.referenceListPathTemplate.match(referenceListName).reference_list; + } + + /** + * Return a fully-qualified retrohunt resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} rule + * @param {string} retrohunt + * @returns {string} Resource name string. + */ + retrohuntPath(project:string,location:string,instance:string,rule:string,retrohunt:string) { + return this.pathTemplates.retrohuntPathTemplate.render({ + project: project, + location: location, + instance: instance, + rule: rule, + retrohunt: retrohunt, + }); + } + + /** + * Parse the project from Retrohunt resource. + * + * @param {string} retrohuntName + * A fully-qualified path representing Retrohunt resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRetrohuntName(retrohuntName: string) { + return this.pathTemplates.retrohuntPathTemplate.match(retrohuntName).project; + } + + /** + * Parse the location from Retrohunt resource. + * + * @param {string} retrohuntName + * A fully-qualified path representing Retrohunt resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRetrohuntName(retrohuntName: string) { + return this.pathTemplates.retrohuntPathTemplate.match(retrohuntName).location; + } + + /** + * Parse the instance from Retrohunt resource. + * + * @param {string} retrohuntName + * A fully-qualified path representing Retrohunt resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromRetrohuntName(retrohuntName: string) { + return this.pathTemplates.retrohuntPathTemplate.match(retrohuntName).instance; + } + + /** + * Parse the rule from Retrohunt resource. + * + * @param {string} retrohuntName + * A fully-qualified path representing Retrohunt resource. + * @returns {string} A string representing the rule. + */ + matchRuleFromRetrohuntName(retrohuntName: string) { + return this.pathTemplates.retrohuntPathTemplate.match(retrohuntName).rule; + } + + /** + * Parse the retrohunt from Retrohunt resource. + * + * @param {string} retrohuntName + * A fully-qualified path representing Retrohunt resource. + * @returns {string} A string representing the retrohunt. + */ + matchRetrohuntFromRetrohuntName(retrohuntName: string) { + return this.pathTemplates.retrohuntPathTemplate.match(retrohuntName).retrohunt; + } + + /** + * Return a fully-qualified rule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} rule + * @returns {string} Resource name string. + */ + rulePath(project:string,location:string,instance:string,rule:string) { + return this.pathTemplates.rulePathTemplate.render({ + project: project, + location: location, + instance: instance, + rule: rule, + }); + } + + /** + * Parse the project from Rule resource. + * + * @param {string} ruleName + * A fully-qualified path representing Rule resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRuleName(ruleName: string) { + return this.pathTemplates.rulePathTemplate.match(ruleName).project; + } + + /** + * Parse the location from Rule resource. + * + * @param {string} ruleName + * A fully-qualified path representing Rule resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRuleName(ruleName: string) { + return this.pathTemplates.rulePathTemplate.match(ruleName).location; + } + + /** + * Parse the instance from Rule resource. + * + * @param {string} ruleName + * A fully-qualified path representing Rule resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromRuleName(ruleName: string) { + return this.pathTemplates.rulePathTemplate.match(ruleName).instance; + } + + /** + * Parse the rule from Rule resource. + * + * @param {string} ruleName + * A fully-qualified path representing Rule resource. + * @returns {string} A string representing the rule. + */ + matchRuleFromRuleName(ruleName: string) { + return this.pathTemplates.rulePathTemplate.match(ruleName).rule; + } + + /** + * Return a fully-qualified ruleDeployment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} rule + * @returns {string} Resource name string. + */ + ruleDeploymentPath(project:string,location:string,instance:string,rule:string) { + return this.pathTemplates.ruleDeploymentPathTemplate.render({ + project: project, + location: location, + instance: instance, + rule: rule, + }); + } + + /** + * Parse the project from RuleDeployment resource. + * + * @param {string} ruleDeploymentName + * A fully-qualified path representing RuleDeployment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRuleDeploymentName(ruleDeploymentName: string) { + return this.pathTemplates.ruleDeploymentPathTemplate.match(ruleDeploymentName).project; + } + + /** + * Parse the location from RuleDeployment resource. + * + * @param {string} ruleDeploymentName + * A fully-qualified path representing RuleDeployment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRuleDeploymentName(ruleDeploymentName: string) { + return this.pathTemplates.ruleDeploymentPathTemplate.match(ruleDeploymentName).location; + } + + /** + * Parse the instance from RuleDeployment resource. + * + * @param {string} ruleDeploymentName + * A fully-qualified path representing RuleDeployment resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromRuleDeploymentName(ruleDeploymentName: string) { + return this.pathTemplates.ruleDeploymentPathTemplate.match(ruleDeploymentName).instance; + } + + /** + * Parse the rule from RuleDeployment resource. + * + * @param {string} ruleDeploymentName + * A fully-qualified path representing RuleDeployment resource. + * @returns {string} A string representing the rule. + */ + matchRuleFromRuleDeploymentName(ruleDeploymentName: string) { + return this.pathTemplates.ruleDeploymentPathTemplate.match(ruleDeploymentName).rule; + } + + /** + * Return a fully-qualified watchlist resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} watchlist + * @returns {string} Resource name string. + */ + watchlistPath(project:string,location:string,instance:string,watchlist:string) { + return this.pathTemplates.watchlistPathTemplate.render({ + project: project, + location: location, + instance: instance, + watchlist: watchlist, + }); + } + + /** + * Parse the project from Watchlist resource. + * + * @param {string} watchlistName + * A fully-qualified path representing Watchlist resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWatchlistName(watchlistName: string) { + return this.pathTemplates.watchlistPathTemplate.match(watchlistName).project; + } + + /** + * Parse the location from Watchlist resource. + * + * @param {string} watchlistName + * A fully-qualified path representing Watchlist resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWatchlistName(watchlistName: string) { + return this.pathTemplates.watchlistPathTemplate.match(watchlistName).location; + } + + /** + * Parse the instance from Watchlist resource. + * + * @param {string} watchlistName + * A fully-qualified path representing Watchlist resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromWatchlistName(watchlistName: string) { + return this.pathTemplates.watchlistPathTemplate.match(watchlistName).instance; + } + + /** + * Parse the watchlist from Watchlist resource. + * + * @param {string} watchlistName + * A fully-qualified path representing Watchlist resource. + * @returns {string} A string representing the watchlist. + */ + matchWatchlistFromWatchlistName(watchlistName: string) { + return this.pathTemplates.watchlistPathTemplate.match(watchlistName).watchlist; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataTableServiceStub && !this._terminated) { + return this.dataTableServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-chronicle/src/v1/data_table_service_client_config.json b/packages/google-cloud-chronicle/src/v1/data_table_service_client_config.json new file mode 100644 index 000000000000..86ecd8516af2 --- /dev/null +++ b/packages/google-cloud-chronicle/src/v1/data_table_service_client_config.json @@ -0,0 +1,113 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.DataTableService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateDataTable": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataTables": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDataTable": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateDataTable": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDataTable": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateDataTableRow": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDataTableRow": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDataTableRow": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteDataTableRow": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BulkCreateDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BulkGetDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "BulkReplaceDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BulkUpdateDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataTableOperationErrors": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-chronicle/src/v1/data_table_service_proto_list.json b/packages/google-cloud-chronicle/src/v1/data_table_service_proto_list.json new file mode 100644 index 000000000000..34b4ed07113e --- /dev/null +++ b/packages/google-cloud-chronicle/src/v1/data_table_service_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/cloud/chronicle/v1/data_access_control.proto", + "../../protos/google/cloud/chronicle/v1/data_table.proto", + "../../protos/google/cloud/chronicle/v1/entity.proto", + "../../protos/google/cloud/chronicle/v1/instance.proto", + "../../protos/google/cloud/chronicle/v1/reference_list.proto", + "../../protos/google/cloud/chronicle/v1/rule.proto" +] diff --git a/packages/google-cloud-chronicle/src/v1/entity_service_client.ts b/packages/google-cloud-chronicle/src/v1/entity_service_client.ts index 1d4c03e1a002..e77112c5688a 100644 --- a/packages/google-cloud-chronicle/src/v1/entity_service_client.ts +++ b/packages/google-cloud-chronicle/src/v1/entity_service_client.ts @@ -183,6 +183,15 @@ export class EntityServiceClient { dataAccessScopePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}' ), + dataTablePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}' + ), + dataTableOperationErrorsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}' + ), + dataTableRowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}' + ), instancePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}' ), @@ -1129,6 +1138,205 @@ export class EntityServiceClient { return this.pathTemplates.dataAccessScopePathTemplate.match(dataAccessScopeName).data_access_scope; } + /** + * Return a fully-qualified dataTable resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @returns {string} Resource name string. + */ + dataTablePath(project:string,location:string,instance:string,dataTable:string) { + return this.pathTemplates.dataTablePathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + }); + } + + /** + * Parse the project from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).project; + } + + /** + * Parse the location from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).location; + } + + /** + * Parse the instance from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).instance; + } + + /** + * Parse the data_table from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).data_table; + } + + /** + * Return a fully-qualified dataTableOperationErrors resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table_operation_errors + * @returns {string} Resource name string. + */ + dataTableOperationErrorsPath(project:string,location:string,instance:string,dataTableOperationErrors:string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table_operation_errors: dataTableOperationErrors, + }); + } + + /** + * Parse the project from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).project; + } + + /** + * Parse the location from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).location; + } + + /** + * Parse the instance from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).instance; + } + + /** + * Parse the data_table_operation_errors from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the data_table_operation_errors. + */ + matchDataTableOperationErrorsFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).data_table_operation_errors; + } + + /** + * Return a fully-qualified dataTableRow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @param {string} data_table_row + * @returns {string} Resource name string. + */ + dataTableRowPath(project:string,location:string,instance:string,dataTable:string,dataTableRow:string) { + return this.pathTemplates.dataTableRowPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + data_table_row: dataTableRow, + }); + } + + /** + * Parse the project from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).project; + } + + /** + * Parse the location from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).location; + } + + /** + * Parse the instance from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).instance; + } + + /** + * Parse the data_table from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table; + } + + /** + * Parse the data_table_row from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table_row. + */ + matchDataTableRowFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table_row; + } + /** * Return a fully-qualified instance resource name string. * diff --git a/packages/google-cloud-chronicle/src/v1/entity_service_proto_list.json b/packages/google-cloud-chronicle/src/v1/entity_service_proto_list.json index f8650297d95f..34b4ed07113e 100644 --- a/packages/google-cloud-chronicle/src/v1/entity_service_proto_list.json +++ b/packages/google-cloud-chronicle/src/v1/entity_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/chronicle/v1/data_access_control.proto", + "../../protos/google/cloud/chronicle/v1/data_table.proto", "../../protos/google/cloud/chronicle/v1/entity.proto", "../../protos/google/cloud/chronicle/v1/instance.proto", "../../protos/google/cloud/chronicle/v1/reference_list.proto", diff --git a/packages/google-cloud-chronicle/src/v1/gapic_metadata.json b/packages/google-cloud-chronicle/src/v1/gapic_metadata.json index 9cae324b82d1..483e5d548505 100644 --- a/packages/google-cloud-chronicle/src/v1/gapic_metadata.json +++ b/packages/google-cloud-chronicle/src/v1/gapic_metadata.json @@ -127,6 +127,178 @@ } } }, + "DataTableService": { + "clients": { + "grpc": { + "libraryClient": "DataTableServiceClient", + "rpcs": { + "CreateDataTable": { + "methods": [ + "createDataTable" + ] + }, + "GetDataTable": { + "methods": [ + "getDataTable" + ] + }, + "UpdateDataTable": { + "methods": [ + "updateDataTable" + ] + }, + "DeleteDataTable": { + "methods": [ + "deleteDataTable" + ] + }, + "CreateDataTableRow": { + "methods": [ + "createDataTableRow" + ] + }, + "UpdateDataTableRow": { + "methods": [ + "updateDataTableRow" + ] + }, + "GetDataTableRow": { + "methods": [ + "getDataTableRow" + ] + }, + "DeleteDataTableRow": { + "methods": [ + "deleteDataTableRow" + ] + }, + "BulkCreateDataTableRows": { + "methods": [ + "bulkCreateDataTableRows" + ] + }, + "BulkGetDataTableRows": { + "methods": [ + "bulkGetDataTableRows" + ] + }, + "BulkReplaceDataTableRows": { + "methods": [ + "bulkReplaceDataTableRows" + ] + }, + "BulkUpdateDataTableRows": { + "methods": [ + "bulkUpdateDataTableRows" + ] + }, + "GetDataTableOperationErrors": { + "methods": [ + "getDataTableOperationErrors" + ] + }, + "ListDataTables": { + "methods": [ + "listDataTables", + "listDataTablesStream", + "listDataTablesAsync" + ] + }, + "ListDataTableRows": { + "methods": [ + "listDataTableRows", + "listDataTableRowsStream", + "listDataTableRowsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataTableServiceClient", + "rpcs": { + "CreateDataTable": { + "methods": [ + "createDataTable" + ] + }, + "GetDataTable": { + "methods": [ + "getDataTable" + ] + }, + "UpdateDataTable": { + "methods": [ + "updateDataTable" + ] + }, + "DeleteDataTable": { + "methods": [ + "deleteDataTable" + ] + }, + "CreateDataTableRow": { + "methods": [ + "createDataTableRow" + ] + }, + "UpdateDataTableRow": { + "methods": [ + "updateDataTableRow" + ] + }, + "GetDataTableRow": { + "methods": [ + "getDataTableRow" + ] + }, + "DeleteDataTableRow": { + "methods": [ + "deleteDataTableRow" + ] + }, + "BulkCreateDataTableRows": { + "methods": [ + "bulkCreateDataTableRows" + ] + }, + "BulkGetDataTableRows": { + "methods": [ + "bulkGetDataTableRows" + ] + }, + "BulkReplaceDataTableRows": { + "methods": [ + "bulkReplaceDataTableRows" + ] + }, + "BulkUpdateDataTableRows": { + "methods": [ + "bulkUpdateDataTableRows" + ] + }, + "GetDataTableOperationErrors": { + "methods": [ + "getDataTableOperationErrors" + ] + }, + "ListDataTables": { + "methods": [ + "listDataTables", + "listDataTablesStream", + "listDataTablesAsync" + ] + }, + "ListDataTableRows": { + "methods": [ + "listDataTableRows", + "listDataTableRowsStream", + "listDataTableRowsAsync" + ] + } + } + } + } + }, "EntityService": { "clients": { "grpc": { diff --git a/packages/google-cloud-chronicle/src/v1/index.ts b/packages/google-cloud-chronicle/src/v1/index.ts index 876a24009fbd..e00b4692e1d0 100644 --- a/packages/google-cloud-chronicle/src/v1/index.ts +++ b/packages/google-cloud-chronicle/src/v1/index.ts @@ -17,6 +17,7 @@ // ** All changes to this file may be overwritten. ** export {DataAccessControlServiceClient} from './data_access_control_service_client'; +export {DataTableServiceClient} from './data_table_service_client'; export {EntityServiceClient} from './entity_service_client'; export {InstanceServiceClient} from './instance_service_client'; export {ReferenceListServiceClient} from './reference_list_service_client'; diff --git a/packages/google-cloud-chronicle/src/v1/instance_service_client.ts b/packages/google-cloud-chronicle/src/v1/instance_service_client.ts index d2832af4be24..1c30501297e1 100644 --- a/packages/google-cloud-chronicle/src/v1/instance_service_client.ts +++ b/packages/google-cloud-chronicle/src/v1/instance_service_client.ts @@ -183,6 +183,15 @@ export class InstanceServiceClient { dataAccessScopePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}' ), + dataTablePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}' + ), + dataTableOperationErrorsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}' + ), + dataTableRowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}' + ), instancePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}' ), @@ -573,6 +582,205 @@ export class InstanceServiceClient { return this.pathTemplates.dataAccessScopePathTemplate.match(dataAccessScopeName).data_access_scope; } + /** + * Return a fully-qualified dataTable resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @returns {string} Resource name string. + */ + dataTablePath(project:string,location:string,instance:string,dataTable:string) { + return this.pathTemplates.dataTablePathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + }); + } + + /** + * Parse the project from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).project; + } + + /** + * Parse the location from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).location; + } + + /** + * Parse the instance from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).instance; + } + + /** + * Parse the data_table from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).data_table; + } + + /** + * Return a fully-qualified dataTableOperationErrors resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table_operation_errors + * @returns {string} Resource name string. + */ + dataTableOperationErrorsPath(project:string,location:string,instance:string,dataTableOperationErrors:string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table_operation_errors: dataTableOperationErrors, + }); + } + + /** + * Parse the project from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).project; + } + + /** + * Parse the location from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).location; + } + + /** + * Parse the instance from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).instance; + } + + /** + * Parse the data_table_operation_errors from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the data_table_operation_errors. + */ + matchDataTableOperationErrorsFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).data_table_operation_errors; + } + + /** + * Return a fully-qualified dataTableRow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @param {string} data_table_row + * @returns {string} Resource name string. + */ + dataTableRowPath(project:string,location:string,instance:string,dataTable:string,dataTableRow:string) { + return this.pathTemplates.dataTableRowPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + data_table_row: dataTableRow, + }); + } + + /** + * Parse the project from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).project; + } + + /** + * Parse the location from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).location; + } + + /** + * Parse the instance from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).instance; + } + + /** + * Parse the data_table from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table; + } + + /** + * Parse the data_table_row from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table_row. + */ + matchDataTableRowFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table_row; + } + /** * Return a fully-qualified instance resource name string. * diff --git a/packages/google-cloud-chronicle/src/v1/instance_service_proto_list.json b/packages/google-cloud-chronicle/src/v1/instance_service_proto_list.json index f8650297d95f..34b4ed07113e 100644 --- a/packages/google-cloud-chronicle/src/v1/instance_service_proto_list.json +++ b/packages/google-cloud-chronicle/src/v1/instance_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/chronicle/v1/data_access_control.proto", + "../../protos/google/cloud/chronicle/v1/data_table.proto", "../../protos/google/cloud/chronicle/v1/entity.proto", "../../protos/google/cloud/chronicle/v1/instance.proto", "../../protos/google/cloud/chronicle/v1/reference_list.proto", diff --git a/packages/google-cloud-chronicle/src/v1/reference_list_service_client.ts b/packages/google-cloud-chronicle/src/v1/reference_list_service_client.ts index dda38931dbb1..1813278b31c5 100644 --- a/packages/google-cloud-chronicle/src/v1/reference_list_service_client.ts +++ b/packages/google-cloud-chronicle/src/v1/reference_list_service_client.ts @@ -183,6 +183,15 @@ export class ReferenceListServiceClient { dataAccessScopePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}' ), + dataTablePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}' + ), + dataTableOperationErrorsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}' + ), + dataTableRowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}' + ), instancePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}' ), @@ -1022,6 +1031,205 @@ export class ReferenceListServiceClient { return this.pathTemplates.dataAccessScopePathTemplate.match(dataAccessScopeName).data_access_scope; } + /** + * Return a fully-qualified dataTable resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @returns {string} Resource name string. + */ + dataTablePath(project:string,location:string,instance:string,dataTable:string) { + return this.pathTemplates.dataTablePathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + }); + } + + /** + * Parse the project from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).project; + } + + /** + * Parse the location from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).location; + } + + /** + * Parse the instance from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).instance; + } + + /** + * Parse the data_table from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).data_table; + } + + /** + * Return a fully-qualified dataTableOperationErrors resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table_operation_errors + * @returns {string} Resource name string. + */ + dataTableOperationErrorsPath(project:string,location:string,instance:string,dataTableOperationErrors:string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table_operation_errors: dataTableOperationErrors, + }); + } + + /** + * Parse the project from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).project; + } + + /** + * Parse the location from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).location; + } + + /** + * Parse the instance from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).instance; + } + + /** + * Parse the data_table_operation_errors from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the data_table_operation_errors. + */ + matchDataTableOperationErrorsFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).data_table_operation_errors; + } + + /** + * Return a fully-qualified dataTableRow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @param {string} data_table_row + * @returns {string} Resource name string. + */ + dataTableRowPath(project:string,location:string,instance:string,dataTable:string,dataTableRow:string) { + return this.pathTemplates.dataTableRowPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + data_table_row: dataTableRow, + }); + } + + /** + * Parse the project from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).project; + } + + /** + * Parse the location from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).location; + } + + /** + * Parse the instance from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).instance; + } + + /** + * Parse the data_table from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table; + } + + /** + * Parse the data_table_row from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table_row. + */ + matchDataTableRowFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table_row; + } + /** * Return a fully-qualified instance resource name string. * diff --git a/packages/google-cloud-chronicle/src/v1/reference_list_service_proto_list.json b/packages/google-cloud-chronicle/src/v1/reference_list_service_proto_list.json index f8650297d95f..34b4ed07113e 100644 --- a/packages/google-cloud-chronicle/src/v1/reference_list_service_proto_list.json +++ b/packages/google-cloud-chronicle/src/v1/reference_list_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/chronicle/v1/data_access_control.proto", + "../../protos/google/cloud/chronicle/v1/data_table.proto", "../../protos/google/cloud/chronicle/v1/entity.proto", "../../protos/google/cloud/chronicle/v1/instance.proto", "../../protos/google/cloud/chronicle/v1/reference_list.proto", diff --git a/packages/google-cloud-chronicle/src/v1/rule_service_client.ts b/packages/google-cloud-chronicle/src/v1/rule_service_client.ts index 92311eae2c18..76d947d2c3af 100644 --- a/packages/google-cloud-chronicle/src/v1/rule_service_client.ts +++ b/packages/google-cloud-chronicle/src/v1/rule_service_client.ts @@ -184,6 +184,15 @@ export class RuleServiceClient { dataAccessScopePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}' ), + dataTablePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}' + ), + dataTableOperationErrorsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}' + ), + dataTableRowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}' + ), instancePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}' ), @@ -2485,6 +2494,205 @@ export class RuleServiceClient { return this.pathTemplates.dataAccessScopePathTemplate.match(dataAccessScopeName).data_access_scope; } + /** + * Return a fully-qualified dataTable resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @returns {string} Resource name string. + */ + dataTablePath(project:string,location:string,instance:string,dataTable:string) { + return this.pathTemplates.dataTablePathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + }); + } + + /** + * Parse the project from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).project; + } + + /** + * Parse the location from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).location; + } + + /** + * Parse the instance from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).instance; + } + + /** + * Parse the data_table from DataTable resource. + * + * @param {string} dataTableName + * A fully-qualified path representing DataTable resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableName(dataTableName: string) { + return this.pathTemplates.dataTablePathTemplate.match(dataTableName).data_table; + } + + /** + * Return a fully-qualified dataTableOperationErrors resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table_operation_errors + * @returns {string} Resource name string. + */ + dataTableOperationErrorsPath(project:string,location:string,instance:string,dataTableOperationErrors:string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table_operation_errors: dataTableOperationErrors, + }); + } + + /** + * Parse the project from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).project; + } + + /** + * Parse the location from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).location; + } + + /** + * Parse the instance from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).instance; + } + + /** + * Parse the data_table_operation_errors from DataTableOperationErrors resource. + * + * @param {string} dataTableOperationErrorsName + * A fully-qualified path representing DataTableOperationErrors resource. + * @returns {string} A string representing the data_table_operation_errors. + */ + matchDataTableOperationErrorsFromDataTableOperationErrorsName(dataTableOperationErrorsName: string) { + return this.pathTemplates.dataTableOperationErrorsPathTemplate.match(dataTableOperationErrorsName).data_table_operation_errors; + } + + /** + * Return a fully-qualified dataTableRow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} data_table + * @param {string} data_table_row + * @returns {string} Resource name string. + */ + dataTableRowPath(project:string,location:string,instance:string,dataTable:string,dataTableRow:string) { + return this.pathTemplates.dataTableRowPathTemplate.render({ + project: project, + location: location, + instance: instance, + data_table: dataTable, + data_table_row: dataTableRow, + }); + } + + /** + * Parse the project from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).project; + } + + /** + * Parse the location from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).location; + } + + /** + * Parse the instance from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).instance; + } + + /** + * Parse the data_table from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table. + */ + matchDataTableFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table; + } + + /** + * Parse the data_table_row from DataTableRow resource. + * + * @param {string} dataTableRowName + * A fully-qualified path representing DataTableRow resource. + * @returns {string} A string representing the data_table_row. + */ + matchDataTableRowFromDataTableRowName(dataTableRowName: string) { + return this.pathTemplates.dataTableRowPathTemplate.match(dataTableRowName).data_table_row; + } + /** * Return a fully-qualified instance resource name string. * diff --git a/packages/google-cloud-chronicle/src/v1/rule_service_proto_list.json b/packages/google-cloud-chronicle/src/v1/rule_service_proto_list.json index f8650297d95f..34b4ed07113e 100644 --- a/packages/google-cloud-chronicle/src/v1/rule_service_proto_list.json +++ b/packages/google-cloud-chronicle/src/v1/rule_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/chronicle/v1/data_access_control.proto", + "../../protos/google/cloud/chronicle/v1/data_table.proto", "../../protos/google/cloud/chronicle/v1/entity.proto", "../../protos/google/cloud/chronicle/v1/instance.proto", "../../protos/google/cloud/chronicle/v1/reference_list.proto", diff --git a/packages/google-cloud-chronicle/system-test/fixtures/sample/src/index.js b/packages/google-cloud-chronicle/system-test/fixtures/sample/src/index.js index 0173621cefbf..bf5aa16e2663 100644 --- a/packages/google-cloud-chronicle/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-chronicle/system-test/fixtures/sample/src/index.js @@ -22,6 +22,7 @@ const chronicle = require('@google-cloud/chronicle'); function main() { const dataAccessControlServiceClient = new chronicle.DataAccessControlServiceClient(); + const dataTableServiceClient = new chronicle.DataTableServiceClient(); const entityServiceClient = new chronicle.EntityServiceClient(); const instanceServiceClient = new chronicle.InstanceServiceClient(); const referenceListServiceClient = new chronicle.ReferenceListServiceClient(); diff --git a/packages/google-cloud-chronicle/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-chronicle/system-test/fixtures/sample/src/index.ts index d8fadb9b0d8e..64907d54b661 100644 --- a/packages/google-cloud-chronicle/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-chronicle/system-test/fixtures/sample/src/index.ts @@ -16,12 +16,15 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {DataAccessControlServiceClient, EntityServiceClient, InstanceServiceClient, ReferenceListServiceClient, RuleServiceClient} from '@google-cloud/chronicle'; +import {DataAccessControlServiceClient, DataTableServiceClient, EntityServiceClient, InstanceServiceClient, ReferenceListServiceClient, RuleServiceClient} from '@google-cloud/chronicle'; // check that the client class type name can be used function doStuffWithDataAccessControlServiceClient(client: DataAccessControlServiceClient) { client.close(); } +function doStuffWithDataTableServiceClient(client: DataTableServiceClient) { + client.close(); +} function doStuffWithEntityServiceClient(client: EntityServiceClient) { client.close(); } @@ -40,6 +43,9 @@ function main() { const dataAccessControlServiceClient = new DataAccessControlServiceClient(); doStuffWithDataAccessControlServiceClient(dataAccessControlServiceClient); // check that the client instance can be created + const dataTableServiceClient = new DataTableServiceClient(); + doStuffWithDataTableServiceClient(dataTableServiceClient); + // check that the client instance can be created const entityServiceClient = new EntityServiceClient(); doStuffWithEntityServiceClient(entityServiceClient); // check that the client instance can be created diff --git a/packages/google-cloud-chronicle/system-test/install.ts b/packages/google-cloud-chronicle/system-test/install.ts index 394f3362d203..f66069aa3940 100644 --- a/packages/google-cloud-chronicle/system-test/install.ts +++ b/packages/google-cloud-chronicle/system-test/install.ts @@ -40,7 +40,7 @@ describe('📦 pack-n-play test', () => { packageDir: process.cwd(), sample: { description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() } }; await packNTest(options); diff --git a/packages/google-cloud-chronicle/test/gapic_data_access_control_service_v1.ts b/packages/google-cloud-chronicle/test/gapic_data_access_control_service_v1.ts index 5b97e1a1321b..7269911f3d99 100644 --- a/packages/google-cloud-chronicle/test/gapic_data_access_control_service_v1.ts +++ b/packages/google-cloud-chronicle/test/gapic_data_access_control_service_v1.ts @@ -1731,6 +1731,176 @@ describe('v1.DataAccessControlServiceClient', () => { }); }); + describe('dataTable', async () => { + const fakePath = "/rendered/path/dataTable"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + }; + const client = new dataaccesscontrolserviceModule.v1.DataAccessControlServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTablePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTablePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTablePath', () => { + const result = client.dataTablePath("projectValue", "locationValue", "instanceValue", "dataTableValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTablePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableName', () => { + const result = client.matchProjectFromDataTableName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableName', () => { + const result = client.matchLocationFromDataTableName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableName', () => { + const result = client.matchInstanceFromDataTableName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableName', () => { + const result = client.matchDataTableFromDataTableName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableOperationErrors', async () => { + const fakePath = "/rendered/path/dataTableOperationErrors"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table_operation_errors: "dataTableOperationErrorsValue", + }; + const client = new dataaccesscontrolserviceModule.v1.DataAccessControlServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableOperationErrorsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableOperationErrorsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableOperationErrorsPath', () => { + const result = client.dataTableOperationErrorsPath("projectValue", "locationValue", "instanceValue", "dataTableOperationErrorsValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableOperationErrorsName', () => { + const result = client.matchProjectFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableOperationErrorsName', () => { + const result = client.matchLocationFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableOperationErrorsName', () => { + const result = client.matchInstanceFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableOperationErrorsFromDataTableOperationErrorsName', () => { + const result = client.matchDataTableOperationErrorsFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "dataTableOperationErrorsValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableRow', async () => { + const fakePath = "/rendered/path/dataTableRow"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + data_table_row: "dataTableRowValue", + }; + const client = new dataaccesscontrolserviceModule.v1.DataAccessControlServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableRowPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableRowPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableRowPath', () => { + const result = client.dataTableRowPath("projectValue", "locationValue", "instanceValue", "dataTableValue", "dataTableRowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableRowPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableRowName', () => { + const result = client.matchProjectFromDataTableRowName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableRowName', () => { + const result = client.matchLocationFromDataTableRowName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableRowName', () => { + const result = client.matchInstanceFromDataTableRowName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableRowName', () => { + const result = client.matchDataTableFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableRowFromDataTableRowName', () => { + const result = client.matchDataTableRowFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableRowValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('instance', async () => { const fakePath = "/rendered/path/instance"; const expectedParameters = { diff --git a/packages/google-cloud-chronicle/test/gapic_data_table_service_v1.ts b/packages/google-cloud-chronicle/test/gapic_data_table_service_v1.ts new file mode 100644 index 000000000000..e04d59eb5357 --- /dev/null +++ b/packages/google-cloud-chronicle/test/gapic_data_table_service_v1.ts @@ -0,0 +1,2836 @@ +// Copyright 2026 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as datatableserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DataTableServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new datatableserviceModule.v1.DataTableServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'chronicle.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new datatableserviceModule.v1.DataTableServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = datatableserviceModule.v1.DataTableServiceClient.servicePath; + assert.strictEqual(servicePath, 'chronicle.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = datatableserviceModule.v1.DataTableServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'chronicle.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'chronicle.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'chronicle.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datatableserviceModule.v1.DataTableServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'chronicle.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datatableserviceModule.v1.DataTableServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'chronicle.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new datatableserviceModule.v1.DataTableServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = datatableserviceModule.v1.DataTableServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new datatableserviceModule.v1.DataTableServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataTableServiceStub, undefined); + await client.initialize(); + assert(client.dataTableServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.dataTableServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataTableServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('createDataTable', () => { + it('invokes createDataTable without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.CreateDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.CreateDataTableRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTable() + ); + client.innerApiCalls.createDataTable = stubSimpleCall(expectedResponse); + const [response] = await client.createDataTable(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataTable without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.CreateDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.CreateDataTableRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTable() + ); + client.innerApiCalls.createDataTable = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataTable( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IDataTable|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataTable with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.CreateDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.CreateDataTableRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataTable = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createDataTable(request), expectedError); + const actualRequest = (client.innerApiCalls.createDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataTable with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.CreateDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.CreateDataTableRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createDataTable(request), expectedError); + }); + }); + + describe('getDataTable', () => { + it('invokes getDataTable without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTable() + ); + client.innerApiCalls.getDataTable = stubSimpleCall(expectedResponse); + const [response] = await client.getDataTable(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTable without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTable() + ); + client.innerApiCalls.getDataTable = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataTable( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IDataTable|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTable with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataTable = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataTable(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTable with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDataTable(request), expectedError); + }); + }); + + describe('updateDataTable', () => { + it('invokes updateDataTable without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.UpdateDataTableRequest() + ); + request.dataTable ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.UpdateDataTableRequest', ['dataTable', 'name']); + request.dataTable.name = defaultValue1; + const expectedHeaderRequestParams = `data_table.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTable() + ); + client.innerApiCalls.updateDataTable = stubSimpleCall(expectedResponse); + const [response] = await client.updateDataTable(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataTable without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.UpdateDataTableRequest() + ); + request.dataTable ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.UpdateDataTableRequest', ['dataTable', 'name']); + request.dataTable.name = defaultValue1; + const expectedHeaderRequestParams = `data_table.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTable() + ); + client.innerApiCalls.updateDataTable = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataTable( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IDataTable|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataTable with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.UpdateDataTableRequest() + ); + request.dataTable ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.UpdateDataTableRequest', ['dataTable', 'name']); + request.dataTable.name = defaultValue1; + const expectedHeaderRequestParams = `data_table.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataTable = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateDataTable(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataTable with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.UpdateDataTableRequest() + ); + request.dataTable ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.UpdateDataTableRequest', ['dataTable', 'name']); + request.dataTable.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateDataTable(request), expectedError); + }); + }); + + describe('deleteDataTable', () => { + it('invokes deleteDataTable without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DeleteDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.DeleteDataTableRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataTable = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDataTable(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataTable without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DeleteDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.DeleteDataTableRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataTable = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataTable( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataTable with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DeleteDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.DeleteDataTableRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataTable = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteDataTable(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataTable as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTable as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataTable with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DeleteDataTableRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.DeleteDataTableRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteDataTable(request), expectedError); + }); + }); + + describe('createDataTableRow', () => { + it('invokes createDataTableRow without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.CreateDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.CreateDataTableRowRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTableRow() + ); + client.innerApiCalls.createDataTableRow = stubSimpleCall(expectedResponse); + const [response] = await client.createDataTableRow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataTableRow without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.CreateDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.CreateDataTableRowRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTableRow() + ); + client.innerApiCalls.createDataTableRow = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataTableRow( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IDataTableRow|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataTableRow with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.CreateDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.CreateDataTableRowRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataTableRow = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createDataTableRow(request), expectedError); + const actualRequest = (client.innerApiCalls.createDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataTableRow with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.CreateDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.CreateDataTableRowRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createDataTableRow(request), expectedError); + }); + }); + + describe('updateDataTableRow', () => { + it('invokes updateDataTableRow without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.UpdateDataTableRowRequest() + ); + request.dataTableRow ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.UpdateDataTableRowRequest', ['dataTableRow', 'name']); + request.dataTableRow.name = defaultValue1; + const expectedHeaderRequestParams = `data_table_row.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTableRow() + ); + client.innerApiCalls.updateDataTableRow = stubSimpleCall(expectedResponse); + const [response] = await client.updateDataTableRow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataTableRow without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.UpdateDataTableRowRequest() + ); + request.dataTableRow ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.UpdateDataTableRowRequest', ['dataTableRow', 'name']); + request.dataTableRow.name = defaultValue1; + const expectedHeaderRequestParams = `data_table_row.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTableRow() + ); + client.innerApiCalls.updateDataTableRow = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataTableRow( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IDataTableRow|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataTableRow with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.UpdateDataTableRowRequest() + ); + request.dataTableRow ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.UpdateDataTableRowRequest', ['dataTableRow', 'name']); + request.dataTableRow.name = defaultValue1; + const expectedHeaderRequestParams = `data_table_row.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataTableRow = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateDataTableRow(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataTableRow with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.UpdateDataTableRowRequest() + ); + request.dataTableRow ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.UpdateDataTableRowRequest', ['dataTableRow', 'name']); + request.dataTableRow.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateDataTableRow(request), expectedError); + }); + }); + + describe('getDataTableRow', () => { + it('invokes getDataTableRow without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableRowRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTableRow() + ); + client.innerApiCalls.getDataTableRow = stubSimpleCall(expectedResponse); + const [response] = await client.getDataTableRow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTableRow without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableRowRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTableRow() + ); + client.innerApiCalls.getDataTableRow = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataTableRow( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IDataTableRow|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTableRow with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableRowRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataTableRow = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataTableRow(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTableRow with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableRowRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDataTableRow(request), expectedError); + }); + }); + + describe('deleteDataTableRow', () => { + it('invokes deleteDataTableRow without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DeleteDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.DeleteDataTableRowRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataTableRow = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDataTableRow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataTableRow without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DeleteDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.DeleteDataTableRowRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataTableRow = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataTableRow( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataTableRow with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DeleteDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.DeleteDataTableRowRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataTableRow = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteDataTableRow(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataTableRow as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTableRow as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataTableRow with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DeleteDataTableRowRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.DeleteDataTableRowRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteDataTableRow(request), expectedError); + }); + }); + + describe('bulkCreateDataTableRows', () => { + it('invokes bulkCreateDataTableRows without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse() + ); + client.innerApiCalls.bulkCreateDataTableRows = stubSimpleCall(expectedResponse); + const [response] = await client.bulkCreateDataTableRows(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.bulkCreateDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkCreateDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkCreateDataTableRows without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse() + ); + client.innerApiCalls.bulkCreateDataTableRows = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkCreateDataTableRows( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IBulkCreateDataTableRowsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.bulkCreateDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkCreateDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkCreateDataTableRows with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkCreateDataTableRows = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.bulkCreateDataTableRows(request), expectedError); + const actualRequest = (client.innerApiCalls.bulkCreateDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkCreateDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkCreateDataTableRows with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.bulkCreateDataTableRows(request), expectedError); + }); + }); + + describe('bulkGetDataTableRows', () => { + it('invokes bulkGetDataTableRows without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse() + ); + client.innerApiCalls.bulkGetDataTableRows = stubSimpleCall(expectedResponse); + const [response] = await client.bulkGetDataTableRows(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.bulkGetDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkGetDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkGetDataTableRows without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse() + ); + client.innerApiCalls.bulkGetDataTableRows = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkGetDataTableRows( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IBulkGetDataTableRowsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.bulkGetDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkGetDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkGetDataTableRows with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkGetDataTableRows = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.bulkGetDataTableRows(request), expectedError); + const actualRequest = (client.innerApiCalls.bulkGetDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkGetDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkGetDataTableRows with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.bulkGetDataTableRows(request), expectedError); + }); + }); + + describe('bulkReplaceDataTableRows', () => { + it('invokes bulkReplaceDataTableRows without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse() + ); + client.innerApiCalls.bulkReplaceDataTableRows = stubSimpleCall(expectedResponse); + const [response] = await client.bulkReplaceDataTableRows(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.bulkReplaceDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkReplaceDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkReplaceDataTableRows without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse() + ); + client.innerApiCalls.bulkReplaceDataTableRows = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkReplaceDataTableRows( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IBulkReplaceDataTableRowsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.bulkReplaceDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkReplaceDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkReplaceDataTableRows with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkReplaceDataTableRows = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.bulkReplaceDataTableRows(request), expectedError); + const actualRequest = (client.innerApiCalls.bulkReplaceDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkReplaceDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkReplaceDataTableRows with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.bulkReplaceDataTableRows(request), expectedError); + }); + }); + + describe('bulkUpdateDataTableRows', () => { + it('invokes bulkUpdateDataTableRows without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse() + ); + client.innerApiCalls.bulkUpdateDataTableRows = stubSimpleCall(expectedResponse); + const [response] = await client.bulkUpdateDataTableRows(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.bulkUpdateDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkUpdateDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkUpdateDataTableRows without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse() + ); + client.innerApiCalls.bulkUpdateDataTableRows = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkUpdateDataTableRows( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IBulkUpdateDataTableRowsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.bulkUpdateDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkUpdateDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkUpdateDataTableRows with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkUpdateDataTableRows = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.bulkUpdateDataTableRows(request), expectedError); + const actualRequest = (client.innerApiCalls.bulkUpdateDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.bulkUpdateDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkUpdateDataTableRows with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.bulkUpdateDataTableRows(request), expectedError); + }); + }); + + describe('getDataTableOperationErrors', () => { + it('invokes getDataTableOperationErrors without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTableOperationErrors() + ); + client.innerApiCalls.getDataTableOperationErrors = stubSimpleCall(expectedResponse); + const [response] = await client.getDataTableOperationErrors(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataTableOperationErrors as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTableOperationErrors as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTableOperationErrors without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.chronicle.v1.DataTableOperationErrors() + ); + client.innerApiCalls.getDataTableOperationErrors = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataTableOperationErrors( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IDataTableOperationErrors|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataTableOperationErrors as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTableOperationErrors as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTableOperationErrors with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataTableOperationErrors = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataTableOperationErrors(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataTableOperationErrors as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTableOperationErrors as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTableOperationErrors with closed client', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDataTableOperationErrors(request), expectedError); + }); + }); + + describe('listDataTables', () => { + it('invokes listDataTables without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTablesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTablesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + ]; + client.innerApiCalls.listDataTables = stubSimpleCall(expectedResponse); + const [response] = await client.listDataTables(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataTables as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataTables as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataTables without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTablesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTablesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + ]; + client.innerApiCalls.listDataTables = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataTables( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IDataTable[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataTables as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataTables as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataTables with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTablesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTablesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataTables = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataTables(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataTables as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataTables as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataTablesStream without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTablesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTablesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + ]; + client.descriptors.page.listDataTables.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataTablesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.chronicle.v1.DataTable[] = []; + stream.on('data', (response: protos.google.cloud.chronicle.v1.DataTable) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listDataTables.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataTables, request)); + assert( + (client.descriptors.page.listDataTables.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataTablesStream with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTablesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTablesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataTables.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataTablesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.chronicle.v1.DataTable[] = []; + stream.on('data', (response: protos.google.cloud.chronicle.v1.DataTable) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataTables.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataTables, request)); + assert( + (client.descriptors.page.listDataTables.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataTables without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTablesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTablesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTable()), + ]; + client.descriptors.page.listDataTables.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.chronicle.v1.IDataTable[] = []; + const iterable = client.listDataTablesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataTables.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataTables.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataTables with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTablesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTablesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataTables.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataTablesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.chronicle.v1.IDataTable[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataTables.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataTables.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataTableRows', () => { + it('invokes listDataTableRows without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + ]; + client.innerApiCalls.listDataTableRows = stubSimpleCall(expectedResponse); + const [response] = await client.listDataTableRows(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataTableRows without error using callback', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + ]; + client.innerApiCalls.listDataTableRows = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataTableRows( + request, + (err?: Error|null, result?: protos.google.cloud.chronicle.v1.IDataTableRow[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataTableRows with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataTableRows = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataTableRows(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataTableRows as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataTableRows as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataTableRowsStream without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + ]; + client.descriptors.page.listDataTableRows.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataTableRowsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.chronicle.v1.DataTableRow[] = []; + stream.on('data', (response: protos.google.cloud.chronicle.v1.DataTableRow) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listDataTableRows.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataTableRows, request)); + assert( + (client.descriptors.page.listDataTableRows.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataTableRowsStream with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataTableRows.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataTableRowsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.chronicle.v1.DataTableRow[] = []; + stream.on('data', (response: protos.google.cloud.chronicle.v1.DataTableRow) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataTableRows.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataTableRows, request)); + assert( + (client.descriptors.page.listDataTableRows.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataTableRows without error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + generateSampleMessage(new protos.google.cloud.chronicle.v1.DataTableRow()), + ]; + client.descriptors.page.listDataTableRows.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.chronicle.v1.IDataTableRow[] = []; + const iterable = client.listDataTableRowsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataTableRows.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataTableRows.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataTableRows with error', async () => { + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.chronicle.v1.ListDataTableRowsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.chronicle.v1.ListDataTableRowsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataTableRows.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataTableRowsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.chronicle.v1.IDataTableRow[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataTableRows.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataTableRows.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('dataAccessLabel', async () => { + const fakePath = "/rendered/path/dataAccessLabel"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_access_label: "dataAccessLabelValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataAccessLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAccessLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAccessLabelPath', () => { + const result = client.dataAccessLabelPath("projectValue", "locationValue", "instanceValue", "dataAccessLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAccessLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAccessLabelName', () => { + const result = client.matchProjectFromDataAccessLabelName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAccessLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAccessLabelName', () => { + const result = client.matchLocationFromDataAccessLabelName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAccessLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataAccessLabelName', () => { + const result = client.matchInstanceFromDataAccessLabelName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataAccessLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAccessLabelFromDataAccessLabelName', () => { + const result = client.matchDataAccessLabelFromDataAccessLabelName(fakePath); + assert.strictEqual(result, "dataAccessLabelValue"); + assert((client.pathTemplates.dataAccessLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAccessScope', async () => { + const fakePath = "/rendered/path/dataAccessScope"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_access_scope: "dataAccessScopeValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataAccessScopePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAccessScopePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAccessScopePath', () => { + const result = client.dataAccessScopePath("projectValue", "locationValue", "instanceValue", "dataAccessScopeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAccessScopePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAccessScopeName', () => { + const result = client.matchProjectFromDataAccessScopeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAccessScopePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAccessScopeName', () => { + const result = client.matchLocationFromDataAccessScopeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAccessScopePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataAccessScopeName', () => { + const result = client.matchInstanceFromDataAccessScopeName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataAccessScopePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAccessScopeFromDataAccessScopeName', () => { + const result = client.matchDataAccessScopeFromDataAccessScopeName(fakePath); + assert.strictEqual(result, "dataAccessScopeValue"); + assert((client.pathTemplates.dataAccessScopePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTable', async () => { + const fakePath = "/rendered/path/dataTable"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTablePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTablePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTablePath', () => { + const result = client.dataTablePath("projectValue", "locationValue", "instanceValue", "dataTableValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTablePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableName', () => { + const result = client.matchProjectFromDataTableName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableName', () => { + const result = client.matchLocationFromDataTableName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableName', () => { + const result = client.matchInstanceFromDataTableName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableName', () => { + const result = client.matchDataTableFromDataTableName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableOperationErrors', async () => { + const fakePath = "/rendered/path/dataTableOperationErrors"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table_operation_errors: "dataTableOperationErrorsValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableOperationErrorsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableOperationErrorsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableOperationErrorsPath', () => { + const result = client.dataTableOperationErrorsPath("projectValue", "locationValue", "instanceValue", "dataTableOperationErrorsValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableOperationErrorsName', () => { + const result = client.matchProjectFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableOperationErrorsName', () => { + const result = client.matchLocationFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableOperationErrorsName', () => { + const result = client.matchInstanceFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableOperationErrorsFromDataTableOperationErrorsName', () => { + const result = client.matchDataTableOperationErrorsFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "dataTableOperationErrorsValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableRow', async () => { + const fakePath = "/rendered/path/dataTableRow"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + data_table_row: "dataTableRowValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableRowPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableRowPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableRowPath', () => { + const result = client.dataTableRowPath("projectValue", "locationValue", "instanceValue", "dataTableValue", "dataTableRowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableRowPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableRowName', () => { + const result = client.matchProjectFromDataTableRowName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableRowName', () => { + const result = client.matchLocationFromDataTableRowName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableRowName', () => { + const result = client.matchInstanceFromDataTableRowName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableRowName', () => { + const result = client.matchDataTableFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableRowFromDataTableRowName', () => { + const result = client.matchDataTableRowFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableRowValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('instance', async () => { + const fakePath = "/rendered/path/instance"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.instancePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.instancePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('instancePath', () => { + const result = client.instancePath("projectValue", "locationValue", "instanceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.instancePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromInstanceName', () => { + const result = client.matchProjectFromInstanceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromInstanceName', () => { + const result = client.matchLocationFromInstanceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromInstanceName', () => { + const result = client.matchInstanceFromInstanceName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('referenceList', async () => { + const fakePath = "/rendered/path/referenceList"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + reference_list: "referenceListValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.referenceListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.referenceListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('referenceListPath', () => { + const result = client.referenceListPath("projectValue", "locationValue", "instanceValue", "referenceListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.referenceListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromReferenceListName', () => { + const result = client.matchProjectFromReferenceListName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.referenceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromReferenceListName', () => { + const result = client.matchLocationFromReferenceListName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.referenceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromReferenceListName', () => { + const result = client.matchInstanceFromReferenceListName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.referenceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReferenceListFromReferenceListName', () => { + const result = client.matchReferenceListFromReferenceListName(fakePath); + assert.strictEqual(result, "referenceListValue"); + assert((client.pathTemplates.referenceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('retrohunt', async () => { + const fakePath = "/rendered/path/retrohunt"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + rule: "ruleValue", + retrohunt: "retrohuntValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.retrohuntPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.retrohuntPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('retrohuntPath', () => { + const result = client.retrohuntPath("projectValue", "locationValue", "instanceValue", "ruleValue", "retrohuntValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.retrohuntPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromRetrohuntName', () => { + const result = client.matchProjectFromRetrohuntName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.retrohuntPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromRetrohuntName', () => { + const result = client.matchLocationFromRetrohuntName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.retrohuntPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromRetrohuntName', () => { + const result = client.matchInstanceFromRetrohuntName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.retrohuntPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRuleFromRetrohuntName', () => { + const result = client.matchRuleFromRetrohuntName(fakePath); + assert.strictEqual(result, "ruleValue"); + assert((client.pathTemplates.retrohuntPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRetrohuntFromRetrohuntName', () => { + const result = client.matchRetrohuntFromRetrohuntName(fakePath); + assert.strictEqual(result, "retrohuntValue"); + assert((client.pathTemplates.retrohuntPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('rule', async () => { + const fakePath = "/rendered/path/rule"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + rule: "ruleValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rulePath', () => { + const result = client.rulePath("projectValue", "locationValue", "instanceValue", "ruleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromRuleName', () => { + const result = client.matchProjectFromRuleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.rulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromRuleName', () => { + const result = client.matchLocationFromRuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.rulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromRuleName', () => { + const result = client.matchInstanceFromRuleName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.rulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRuleFromRuleName', () => { + const result = client.matchRuleFromRuleName(fakePath); + assert.strictEqual(result, "ruleValue"); + assert((client.pathTemplates.rulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('ruleDeployment', async () => { + const fakePath = "/rendered/path/ruleDeployment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + rule: "ruleValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.ruleDeploymentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.ruleDeploymentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('ruleDeploymentPath', () => { + const result = client.ruleDeploymentPath("projectValue", "locationValue", "instanceValue", "ruleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.ruleDeploymentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromRuleDeploymentName', () => { + const result = client.matchProjectFromRuleDeploymentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.ruleDeploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromRuleDeploymentName', () => { + const result = client.matchLocationFromRuleDeploymentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.ruleDeploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromRuleDeploymentName', () => { + const result = client.matchInstanceFromRuleDeploymentName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.ruleDeploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRuleFromRuleDeploymentName', () => { + const result = client.matchRuleFromRuleDeploymentName(fakePath); + assert.strictEqual(result, "ruleValue"); + assert((client.pathTemplates.ruleDeploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('watchlist', async () => { + const fakePath = "/rendered/path/watchlist"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + watchlist: "watchlistValue", + }; + const client = new datatableserviceModule.v1.DataTableServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.watchlistPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.watchlistPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('watchlistPath', () => { + const result = client.watchlistPath("projectValue", "locationValue", "instanceValue", "watchlistValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.watchlistPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromWatchlistName', () => { + const result = client.matchProjectFromWatchlistName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.watchlistPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromWatchlistName', () => { + const result = client.matchLocationFromWatchlistName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.watchlistPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromWatchlistName', () => { + const result = client.matchInstanceFromWatchlistName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.watchlistPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWatchlistFromWatchlistName', () => { + const result = client.matchWatchlistFromWatchlistName(fakePath); + assert.strictEqual(result, "watchlistValue"); + assert((client.pathTemplates.watchlistPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-chronicle/test/gapic_entity_service_v1.ts b/packages/google-cloud-chronicle/test/gapic_entity_service_v1.ts index 7d81b961124f..8db404973ec1 100644 --- a/packages/google-cloud-chronicle/test/gapic_entity_service_v1.ts +++ b/packages/google-cloud-chronicle/test/gapic_entity_service_v1.ts @@ -1050,6 +1050,176 @@ describe('v1.EntityServiceClient', () => { }); }); + describe('dataTable', async () => { + const fakePath = "/rendered/path/dataTable"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + }; + const client = new entityserviceModule.v1.EntityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTablePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTablePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTablePath', () => { + const result = client.dataTablePath("projectValue", "locationValue", "instanceValue", "dataTableValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTablePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableName', () => { + const result = client.matchProjectFromDataTableName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableName', () => { + const result = client.matchLocationFromDataTableName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableName', () => { + const result = client.matchInstanceFromDataTableName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableName', () => { + const result = client.matchDataTableFromDataTableName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableOperationErrors', async () => { + const fakePath = "/rendered/path/dataTableOperationErrors"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table_operation_errors: "dataTableOperationErrorsValue", + }; + const client = new entityserviceModule.v1.EntityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableOperationErrorsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableOperationErrorsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableOperationErrorsPath', () => { + const result = client.dataTableOperationErrorsPath("projectValue", "locationValue", "instanceValue", "dataTableOperationErrorsValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableOperationErrorsName', () => { + const result = client.matchProjectFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableOperationErrorsName', () => { + const result = client.matchLocationFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableOperationErrorsName', () => { + const result = client.matchInstanceFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableOperationErrorsFromDataTableOperationErrorsName', () => { + const result = client.matchDataTableOperationErrorsFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "dataTableOperationErrorsValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableRow', async () => { + const fakePath = "/rendered/path/dataTableRow"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + data_table_row: "dataTableRowValue", + }; + const client = new entityserviceModule.v1.EntityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableRowPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableRowPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableRowPath', () => { + const result = client.dataTableRowPath("projectValue", "locationValue", "instanceValue", "dataTableValue", "dataTableRowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableRowPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableRowName', () => { + const result = client.matchProjectFromDataTableRowName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableRowName', () => { + const result = client.matchLocationFromDataTableRowName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableRowName', () => { + const result = client.matchInstanceFromDataTableRowName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableRowName', () => { + const result = client.matchDataTableFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableRowFromDataTableRowName', () => { + const result = client.matchDataTableRowFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableRowValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('instance', async () => { const fakePath = "/rendered/path/instance"; const expectedParameters = { diff --git a/packages/google-cloud-chronicle/test/gapic_instance_service_v1.ts b/packages/google-cloud-chronicle/test/gapic_instance_service_v1.ts index 4926f6ffdfd7..3f9b0d25edaf 100644 --- a/packages/google-cloud-chronicle/test/gapic_instance_service_v1.ts +++ b/packages/google-cloud-chronicle/test/gapic_instance_service_v1.ts @@ -430,6 +430,176 @@ describe('v1.InstanceServiceClient', () => { }); }); + describe('dataTable', async () => { + const fakePath = "/rendered/path/dataTable"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + }; + const client = new instanceserviceModule.v1.InstanceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTablePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTablePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTablePath', () => { + const result = client.dataTablePath("projectValue", "locationValue", "instanceValue", "dataTableValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTablePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableName', () => { + const result = client.matchProjectFromDataTableName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableName', () => { + const result = client.matchLocationFromDataTableName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableName', () => { + const result = client.matchInstanceFromDataTableName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableName', () => { + const result = client.matchDataTableFromDataTableName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableOperationErrors', async () => { + const fakePath = "/rendered/path/dataTableOperationErrors"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table_operation_errors: "dataTableOperationErrorsValue", + }; + const client = new instanceserviceModule.v1.InstanceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableOperationErrorsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableOperationErrorsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableOperationErrorsPath', () => { + const result = client.dataTableOperationErrorsPath("projectValue", "locationValue", "instanceValue", "dataTableOperationErrorsValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableOperationErrorsName', () => { + const result = client.matchProjectFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableOperationErrorsName', () => { + const result = client.matchLocationFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableOperationErrorsName', () => { + const result = client.matchInstanceFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableOperationErrorsFromDataTableOperationErrorsName', () => { + const result = client.matchDataTableOperationErrorsFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "dataTableOperationErrorsValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableRow', async () => { + const fakePath = "/rendered/path/dataTableRow"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + data_table_row: "dataTableRowValue", + }; + const client = new instanceserviceModule.v1.InstanceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableRowPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableRowPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableRowPath', () => { + const result = client.dataTableRowPath("projectValue", "locationValue", "instanceValue", "dataTableValue", "dataTableRowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableRowPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableRowName', () => { + const result = client.matchProjectFromDataTableRowName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableRowName', () => { + const result = client.matchLocationFromDataTableRowName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableRowName', () => { + const result = client.matchInstanceFromDataTableRowName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableRowName', () => { + const result = client.matchDataTableFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableRowFromDataTableRowName', () => { + const result = client.matchDataTableRowFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableRowValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('instance', async () => { const fakePath = "/rendered/path/instance"; const expectedParameters = { diff --git a/packages/google-cloud-chronicle/test/gapic_reference_list_service_v1.ts b/packages/google-cloud-chronicle/test/gapic_reference_list_service_v1.ts index b9491e480869..017e855ed0a7 100644 --- a/packages/google-cloud-chronicle/test/gapic_reference_list_service_v1.ts +++ b/packages/google-cloud-chronicle/test/gapic_reference_list_service_v1.ts @@ -942,6 +942,176 @@ describe('v1.ReferenceListServiceClient', () => { }); }); + describe('dataTable', async () => { + const fakePath = "/rendered/path/dataTable"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + }; + const client = new referencelistserviceModule.v1.ReferenceListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTablePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTablePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTablePath', () => { + const result = client.dataTablePath("projectValue", "locationValue", "instanceValue", "dataTableValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTablePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableName', () => { + const result = client.matchProjectFromDataTableName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableName', () => { + const result = client.matchLocationFromDataTableName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableName', () => { + const result = client.matchInstanceFromDataTableName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableName', () => { + const result = client.matchDataTableFromDataTableName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableOperationErrors', async () => { + const fakePath = "/rendered/path/dataTableOperationErrors"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table_operation_errors: "dataTableOperationErrorsValue", + }; + const client = new referencelistserviceModule.v1.ReferenceListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableOperationErrorsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableOperationErrorsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableOperationErrorsPath', () => { + const result = client.dataTableOperationErrorsPath("projectValue", "locationValue", "instanceValue", "dataTableOperationErrorsValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableOperationErrorsName', () => { + const result = client.matchProjectFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableOperationErrorsName', () => { + const result = client.matchLocationFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableOperationErrorsName', () => { + const result = client.matchInstanceFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableOperationErrorsFromDataTableOperationErrorsName', () => { + const result = client.matchDataTableOperationErrorsFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "dataTableOperationErrorsValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableRow', async () => { + const fakePath = "/rendered/path/dataTableRow"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + data_table_row: "dataTableRowValue", + }; + const client = new referencelistserviceModule.v1.ReferenceListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableRowPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableRowPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableRowPath', () => { + const result = client.dataTableRowPath("projectValue", "locationValue", "instanceValue", "dataTableValue", "dataTableRowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableRowPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableRowName', () => { + const result = client.matchProjectFromDataTableRowName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableRowName', () => { + const result = client.matchLocationFromDataTableRowName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableRowName', () => { + const result = client.matchInstanceFromDataTableRowName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableRowName', () => { + const result = client.matchDataTableFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableRowFromDataTableRowName', () => { + const result = client.matchDataTableRowFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableRowValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('instance', async () => { const fakePath = "/rendered/path/instance"; const expectedParameters = { diff --git a/packages/google-cloud-chronicle/test/gapic_rule_service_v1.ts b/packages/google-cloud-chronicle/test/gapic_rule_service_v1.ts index 272334a13b7e..3fdd6c83103e 100644 --- a/packages/google-cloud-chronicle/test/gapic_rule_service_v1.ts +++ b/packages/google-cloud-chronicle/test/gapic_rule_service_v1.ts @@ -2538,6 +2538,176 @@ describe('v1.RuleServiceClient', () => { }); }); + describe('dataTable', async () => { + const fakePath = "/rendered/path/dataTable"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + }; + const client = new ruleserviceModule.v1.RuleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTablePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTablePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTablePath', () => { + const result = client.dataTablePath("projectValue", "locationValue", "instanceValue", "dataTableValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTablePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableName', () => { + const result = client.matchProjectFromDataTableName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableName', () => { + const result = client.matchLocationFromDataTableName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableName', () => { + const result = client.matchInstanceFromDataTableName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableName', () => { + const result = client.matchDataTableFromDataTableName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTablePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableOperationErrors', async () => { + const fakePath = "/rendered/path/dataTableOperationErrors"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table_operation_errors: "dataTableOperationErrorsValue", + }; + const client = new ruleserviceModule.v1.RuleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableOperationErrorsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableOperationErrorsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableOperationErrorsPath', () => { + const result = client.dataTableOperationErrorsPath("projectValue", "locationValue", "instanceValue", "dataTableOperationErrorsValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableOperationErrorsName', () => { + const result = client.matchProjectFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableOperationErrorsName', () => { + const result = client.matchLocationFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableOperationErrorsName', () => { + const result = client.matchInstanceFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableOperationErrorsFromDataTableOperationErrorsName', () => { + const result = client.matchDataTableOperationErrorsFromDataTableOperationErrorsName(fakePath); + assert.strictEqual(result, "dataTableOperationErrorsValue"); + assert((client.pathTemplates.dataTableOperationErrorsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTableRow', async () => { + const fakePath = "/rendered/path/dataTableRow"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + data_table: "dataTableValue", + data_table_row: "dataTableRowValue", + }; + const client = new ruleserviceModule.v1.RuleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataTableRowPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTableRowPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTableRowPath', () => { + const result = client.dataTableRowPath("projectValue", "locationValue", "instanceValue", "dataTableValue", "dataTableRowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTableRowPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTableRowName', () => { + const result = client.matchProjectFromDataTableRowName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTableRowName', () => { + const result = client.matchLocationFromDataTableRowName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromDataTableRowName', () => { + const result = client.matchInstanceFromDataTableRowName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableFromDataTableRowName', () => { + const result = client.matchDataTableFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTableRowFromDataTableRowName', () => { + const result = client.matchDataTableRowFromDataTableRowName(fakePath); + assert.strictEqual(result, "dataTableRowValue"); + assert((client.pathTemplates.dataTableRowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('instance', async () => { const fakePath = "/rendered/path/instance"; const expectedParameters = { diff --git a/packages/google-cloud-cloudcontrolspartner/package.json b/packages/google-cloud-cloudcontrolspartner/package.json index 4a8f2ecf4f6f..f250a144ae49 100644 --- a/packages/google-cloud-cloudcontrolspartner/package.json +++ b/packages/google-cloud-cloudcontrolspartner/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-cloudcontrolspartner", "keywords": [ diff --git a/packages/google-cloud-clouddms/package.json b/packages/google-cloud-clouddms/package.json index 54a3d19047ea..7c21f65d335b 100644 --- a/packages/google-cloud-clouddms/package.json +++ b/packages/google-cloud-clouddms/package.json @@ -15,7 +15,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-cloudsecuritycompliance/package.json b/packages/google-cloud-cloudsecuritycompliance/package.json index 6203d043a617..d9ca96278d98 100644 --- a/packages/google-cloud-cloudsecuritycompliance/package.json +++ b/packages/google-cloud-cloudsecuritycompliance/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-cloudsecuritycompliance", "keywords": [ diff --git a/packages/google-cloud-commerce-consumer-procurement/package.json b/packages/google-cloud-commerce-consumer-procurement/package.json index 1c3a913ed9cc..ba9aa1fdcece 100644 --- a/packages/google-cloud-commerce-consumer-procurement/package.json +++ b/packages/google-cloud-commerce-consumer-procurement/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-commerce-consumer-procurement", "keywords": [ diff --git a/packages/google-cloud-compute/package.json b/packages/google-cloud-compute/package.json index fe7d6a4f1381..98b4abf49881 100644 --- a/packages/google-cloud-compute/package.json +++ b/packages/google-cloud-compute/package.json @@ -15,7 +15,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-confidentialcomputing/package.json b/packages/google-cloud-confidentialcomputing/package.json index 9168e7d984dc..5f70ef024598 100644 --- a/packages/google-cloud-confidentialcomputing/package.json +++ b/packages/google-cloud-confidentialcomputing/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-confidentialcomputing", "keywords": [ diff --git a/packages/google-cloud-config/CHANGELOG.md b/packages/google-cloud-config/CHANGELOG.md index b21feaf399bf..4e14d4eccc88 100644 --- a/packages/google-cloud-config/CHANGELOG.md +++ b/packages/google-cloud-config/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.12.0](https://github.com/googleapis/google-cloud-node/compare/config-v0.11.1...config-v0.12.0) (2026-04-14) + + +### Features + +* [config] adding DeploymentGroups, you can now manage deployment of multiple module root dependencies in a single DAG ([#7994](https://github.com/googleapis/google-cloud-node/issues/7994)) ([3879a16](https://github.com/googleapis/google-cloud-node/commit/3879a1647ec14adfe6296a4afc5f270bb2a0bc5c)) + ## [0.11.1](https://github.com/googleapis/google-cloud-node/compare/config-v0.11.0...config-v0.11.1) (2025-10-13) diff --git a/packages/google-cloud-config/package.json b/packages/google-cloud-config/package.json index 966c4b4e161e..1d8e3a2a2289 100644 --- a/packages/google-cloud-config/package.json +++ b/packages/google-cloud-config/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/config", - "version": "0.11.1", + "version": "0.12.0", "description": "Infrastructure Manager API client for Node.js", "repository": { "type": "git", @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-config", "keywords": [ diff --git a/packages/google-cloud-config/samples/package.json b/packages/google-cloud-config/samples/package.json index 0aa6d5ae4910..7dd67469b7c3 100644 --- a/packages/google-cloud-config/samples/package.json +++ b/packages/google-cloud-config/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/config": "^0.11.1" + "@google-cloud/config": "^0.12.0" }, "devDependencies": { "c8": "^10.0.0", diff --git a/packages/google-cloud-configdelivery/package.json b/packages/google-cloud-configdelivery/package.json index 0e4bd820198f..0fc85faa7a3c 100644 --- a/packages/google-cloud-configdelivery/package.json +++ b/packages/google-cloud-configdelivery/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-configdelivery", "keywords": [ diff --git a/packages/google-cloud-connectors/package.json b/packages/google-cloud-connectors/package.json index b931ac4a6ca8..58622585086a 100644 --- a/packages/google-cloud-connectors/package.json +++ b/packages/google-cloud-connectors/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-connectors", "keywords": [ diff --git a/packages/google-cloud-contactcenterinsights/package.json b/packages/google-cloud-contactcenterinsights/package.json index 9524c38e99fa..a81cee4110ee 100644 --- a/packages/google-cloud-contactcenterinsights/package.json +++ b/packages/google-cloud-contactcenterinsights/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-contentwarehouse/package.json b/packages/google-cloud-contentwarehouse/package.json index dff48a842a21..60e02b0051b1 100644 --- a/packages/google-cloud-contentwarehouse/package.json +++ b/packages/google-cloud-contentwarehouse/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-datacatalog-lineage-configmanagement/package.json b/packages/google-cloud-datacatalog-lineage-configmanagement/package.json index 94a4d8004033..2fb0c39d36ab 100644 --- a/packages/google-cloud-datacatalog-lineage-configmanagement/package.json +++ b/packages/google-cloud-datacatalog-lineage-configmanagement/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datacatalog-lineage-configmanagement", "keywords": [ diff --git a/packages/google-cloud-datacatalog-lineage/package.json b/packages/google-cloud-datacatalog-lineage/package.json index b200468c73fc..149148ddcc29 100644 --- a/packages/google-cloud-datacatalog-lineage/package.json +++ b/packages/google-cloud-datacatalog-lineage/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datacatalog-lineage", diff --git a/packages/google-cloud-datacatalog/package.json b/packages/google-cloud-datacatalog/package.json index e7fb11ad0d9a..c48483866ae3 100644 --- a/packages/google-cloud-datacatalog/package.json +++ b/packages/google-cloud-datacatalog/package.json @@ -11,7 +11,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "AUTHORS", "COPYING", "!build/src/**/*.map" diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index ec724f949873..de6c7d9a6735 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform", "keywords": [ diff --git a/packages/google-cloud-datafusion/package.json b/packages/google-cloud-datafusion/package.json index e914acd929b7..61fc5c436440 100644 --- a/packages/google-cloud-datafusion/package.json +++ b/packages/google-cloud-datafusion/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-datalabeling/package.json b/packages/google-cloud-datalabeling/package.json index b1a08f1fe461..5f0e60f82cea 100644 --- a/packages/google-cloud-datalabeling/package.json +++ b/packages/google-cloud-datalabeling/package.json @@ -14,7 +14,6 @@ }, "main": "build/src/index.js", "files": [ - "build/protos", "build/src", "!build/src/**/*.map" ], diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index 5e412665b04a..549317d85333 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.5.0](https://github.com/googleapis/google-cloud-node/compare/dataplex-v5.4.0...dataplex-v5.5.0) (2026-04-14) + + +### Features + +* [dataplex] Allow Data Documentation DataScans to support BigQuery Dataset resources in addition to BigQuery table resources ([#8012](https://github.com/googleapis/google-cloud-node/issues/8012)) ([c75e5b6](https://github.com/googleapis/google-cloud-node/commit/c75e5b6c00aff1eda45f1ea0ca0e71bd72748452)) + ## [5.4.0](https://github.com/googleapis/google-cloud-node/compare/dataplex-v5.3.0...dataplex-v5.4.0) (2026-03-18) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index a093f8b257f5..c5d2d1a9f519 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "5.4.0", + "version": "5.5.0", "description": "dataplex client for Node.js", "repository": { "type": "git", @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index dd7e1e94e5e7..f73ba2fe8434 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataplex": "^5.4.0" + "@google-cloud/dataplex": "^5.5.0" }, "devDependencies": { "c8": "^10.0.0", diff --git a/packages/google-cloud-dataproc/.eslintrc.json b/packages/google-cloud-dataproc/.eslintrc.json index 782153495464..3e8d97ccb390 100644 --- a/packages/google-cloud-dataproc/.eslintrc.json +++ b/packages/google-cloud-dataproc/.eslintrc.json @@ -1,3 +1,4 @@ { - "extends": "./node_modules/gts" + "extends": "./node_modules/gts", + "root": true } diff --git a/packages/google-cloud-dataproc/package.json b/packages/google-cloud-dataproc/package.json index f65b9ba66b28..b6abe95c2bbc 100644 --- a/packages/google-cloud-dataproc/package.json +++ b/packages/google-cloud-dataproc/package.json @@ -14,7 +14,6 @@ }, "main": "build/src/index.js", "files": [ - "build/protos", "build/src", "!build/src/**/*.map" ], diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/clusters.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/clusters.proto index d55ea617419e..f1bc59a225e6 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/clusters.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/clusters.proto @@ -243,12 +243,27 @@ message ClusterConfig { CLUSTER_TIER_PREMIUM = 2; } + // The cluster engine. + enum Engine { + // The engine is not specified. Works the same as ENGINE_DEFAULT. + ENGINE_UNSPECIFIED = 0; + + // The cluster is a default engine cluster. + DEFAULT = 1; + + // The cluster is a lightning engine cluster. + LIGHTNING = 2; + } + // Optional. The type of the cluster. ClusterType cluster_type = 27 [(google.api.field_behavior) = OPTIONAL]; // Optional. The cluster tier. ClusterTier cluster_tier = 29 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The cluster engine. + Engine engine = 30 [(google.api.field_behavior) = OPTIONAL]; + // Optional. A Cloud Storage bucket used to stage job // dependencies, config files, and job driver console output. // If you do not specify a staging bucket, Cloud @@ -1266,6 +1281,32 @@ message LifecycleConfig { [(google.api.field_behavior) = OPTIONAL]; } + // Optional. The duration to keep the cluster started while idling (when no + // jobs are running). Passing this threshold will cause the cluster to be + // stopped. Minimum value is 5 minutes; maximum value is 14 days (see JSON + // representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Duration idle_stop_ttl = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Either the exact time the cluster should be stopped at or + // the cluster maximum age. + oneof stop_ttl { + // Optional. The time when cluster will be auto-stopped (see JSON + // representation of + // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Timestamp auto_stop_time = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The lifetime duration of the cluster. The cluster will be + // auto-stopped at the end of this period, calculated from the time of + // submission of the create or update cluster request. Minimum value is 10 + // minutes; maximum value is 14 days (see JSON representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + google.protobuf.Duration auto_stop_ttl = 7 + [(google.api.field_behavior) = OPTIONAL]; + } + // Output only. The time when cluster became idle (most recent job finished) // and became eligible for deletion due to idleness (see JSON representation // of diff --git a/packages/google-cloud-dataproc/protos/protos.d.ts b/packages/google-cloud-dataproc/protos/protos.d.ts index c9f131c1ebd0..d143de6926b0 100644 --- a/packages/google-cloud-dataproc/protos/protos.d.ts +++ b/packages/google-cloud-dataproc/protos/protos.d.ts @@ -5320,6 +5320,9 @@ export namespace google { /** ClusterConfig clusterTier */ clusterTier?: (google.cloud.dataproc.v1.ClusterConfig.ClusterTier|keyof typeof google.cloud.dataproc.v1.ClusterConfig.ClusterTier|null); + /** ClusterConfig engine */ + engine?: (google.cloud.dataproc.v1.ClusterConfig.Engine|keyof typeof google.cloud.dataproc.v1.ClusterConfig.Engine|null); + /** ClusterConfig configBucket */ configBucket?: (string|null); @@ -5384,6 +5387,9 @@ export namespace google { /** ClusterConfig clusterTier. */ public clusterTier: (google.cloud.dataproc.v1.ClusterConfig.ClusterTier|keyof typeof google.cloud.dataproc.v1.ClusterConfig.ClusterTier); + /** ClusterConfig engine. */ + public engine: (google.cloud.dataproc.v1.ClusterConfig.Engine|keyof typeof google.cloud.dataproc.v1.ClusterConfig.Engine); + /** ClusterConfig configBucket. */ public configBucket: string; @@ -5526,6 +5532,13 @@ export namespace google { CLUSTER_TIER_STANDARD = 1, CLUSTER_TIER_PREMIUM = 2 } + + /** Engine enum. */ + enum Engine { + ENGINE_UNSPECIFIED = 0, + DEFAULT = 1, + LIGHTNING = 2 + } } /** Properties of a VirtualClusterConfig. */ @@ -8659,6 +8672,15 @@ export namespace google { /** LifecycleConfig autoDeleteTtl */ autoDeleteTtl?: (google.protobuf.IDuration|null); + /** LifecycleConfig idleStopTtl */ + idleStopTtl?: (google.protobuf.IDuration|null); + + /** LifecycleConfig autoStopTime */ + autoStopTime?: (google.protobuf.ITimestamp|null); + + /** LifecycleConfig autoStopTtl */ + autoStopTtl?: (google.protobuf.IDuration|null); + /** LifecycleConfig idleStartTime */ idleStartTime?: (google.protobuf.ITimestamp|null); } @@ -8681,12 +8703,24 @@ export namespace google { /** LifecycleConfig autoDeleteTtl. */ public autoDeleteTtl?: (google.protobuf.IDuration|null); + /** LifecycleConfig idleStopTtl. */ + public idleStopTtl?: (google.protobuf.IDuration|null); + + /** LifecycleConfig autoStopTime. */ + public autoStopTime?: (google.protobuf.ITimestamp|null); + + /** LifecycleConfig autoStopTtl. */ + public autoStopTtl?: (google.protobuf.IDuration|null); + /** LifecycleConfig idleStartTime. */ public idleStartTime?: (google.protobuf.ITimestamp|null); /** LifecycleConfig ttl. */ public ttl?: ("autoDeleteTime"|"autoDeleteTtl"); + /** LifecycleConfig stopTtl. */ + public stopTtl?: ("autoStopTime"|"autoStopTtl"); + /** * Creates a new LifecycleConfig instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-dataproc/protos/protos.js b/packages/google-cloud-dataproc/protos/protos.js index 58b591c40443..573c43086bca 100644 --- a/packages/google-cloud-dataproc/protos/protos.js +++ b/packages/google-cloud-dataproc/protos/protos.js @@ -13529,6 +13529,7 @@ * @interface IClusterConfig * @property {google.cloud.dataproc.v1.ClusterConfig.ClusterType|null} [clusterType] ClusterConfig clusterType * @property {google.cloud.dataproc.v1.ClusterConfig.ClusterTier|null} [clusterTier] ClusterConfig clusterTier + * @property {google.cloud.dataproc.v1.ClusterConfig.Engine|null} [engine] ClusterConfig engine * @property {string|null} [configBucket] ClusterConfig configBucket * @property {string|null} [tempBucket] ClusterConfig tempBucket * @property {google.cloud.dataproc.v1.IGceClusterConfig|null} [gceClusterConfig] ClusterConfig gceClusterConfig @@ -13580,6 +13581,14 @@ */ ClusterConfig.prototype.clusterTier = 0; + /** + * ClusterConfig engine. + * @member {google.cloud.dataproc.v1.ClusterConfig.Engine} engine + * @memberof google.cloud.dataproc.v1.ClusterConfig + * @instance + */ + ClusterConfig.prototype.engine = 0; + /** * ClusterConfig configBucket. * @member {string} configBucket @@ -13770,6 +13779,8 @@ writer.uint32(/* id 27, wireType 0 =*/216).int32(message.clusterType); if (message.clusterTier != null && Object.hasOwnProperty.call(message, "clusterTier")) writer.uint32(/* id 29, wireType 0 =*/232).int32(message.clusterTier); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 30, wireType 0 =*/240).int32(message.engine); return writer; }; @@ -13814,6 +13825,10 @@ message.clusterTier = reader.int32(); break; } + case 30: { + message.engine = reader.int32(); + break; + } case 1: { message.configBucket = reader.string(); break; @@ -13936,6 +13951,15 @@ case 2: break; } + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.configBucket != null && message.hasOwnProperty("configBucket")) if (!$util.isString(message.configBucket)) return "configBucket: string expected"; @@ -14079,6 +14103,26 @@ message.clusterTier = 2; break; } + switch (object.engine) { + default: + if (typeof object.engine === "number") { + message.engine = object.engine; + break; + } + break; + case "ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "DEFAULT": + case 1: + message.engine = 1; + break; + case "LIGHTNING": + case 2: + message.engine = 2; + break; + } if (object.configBucket != null) message.configBucket = String(object.configBucket); if (object.tempBucket != null) @@ -14200,6 +14244,7 @@ object.dataprocMetricConfig = null; object.clusterType = options.enums === String ? "CLUSTER_TYPE_UNSPECIFIED" : 0; object.clusterTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; + object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; } if (message.configBucket != null && message.hasOwnProperty("configBucket")) object.configBucket = message.configBucket; @@ -14243,6 +14288,8 @@ object.clusterType = options.enums === String ? $root.google.cloud.dataproc.v1.ClusterConfig.ClusterType[message.clusterType] === undefined ? message.clusterType : $root.google.cloud.dataproc.v1.ClusterConfig.ClusterType[message.clusterType] : message.clusterType; if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) object.clusterTier = options.enums === String ? $root.google.cloud.dataproc.v1.ClusterConfig.ClusterTier[message.clusterTier] === undefined ? message.clusterTier : $root.google.cloud.dataproc.v1.ClusterConfig.ClusterTier[message.clusterTier] : message.clusterTier; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.dataproc.v1.ClusterConfig.Engine[message.engine] === undefined ? message.engine : $root.google.cloud.dataproc.v1.ClusterConfig.Engine[message.engine] : message.engine; return object; }; @@ -14306,6 +14353,22 @@ return values; })(); + /** + * Engine enum. + * @name google.cloud.dataproc.v1.ClusterConfig.Engine + * @enum {number} + * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} LIGHTNING=2 LIGHTNING value + */ + ClusterConfig.Engine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "LIGHTNING"] = 2; + return values; + })(); + return ClusterConfig; })(); @@ -22563,6 +22626,9 @@ * @property {google.protobuf.IDuration|null} [idleDeleteTtl] LifecycleConfig idleDeleteTtl * @property {google.protobuf.ITimestamp|null} [autoDeleteTime] LifecycleConfig autoDeleteTime * @property {google.protobuf.IDuration|null} [autoDeleteTtl] LifecycleConfig autoDeleteTtl + * @property {google.protobuf.IDuration|null} [idleStopTtl] LifecycleConfig idleStopTtl + * @property {google.protobuf.ITimestamp|null} [autoStopTime] LifecycleConfig autoStopTime + * @property {google.protobuf.IDuration|null} [autoStopTtl] LifecycleConfig autoStopTtl * @property {google.protobuf.ITimestamp|null} [idleStartTime] LifecycleConfig idleStartTime */ @@ -22605,6 +22671,30 @@ */ LifecycleConfig.prototype.autoDeleteTtl = null; + /** + * LifecycleConfig idleStopTtl. + * @member {google.protobuf.IDuration|null|undefined} idleStopTtl + * @memberof google.cloud.dataproc.v1.LifecycleConfig + * @instance + */ + LifecycleConfig.prototype.idleStopTtl = null; + + /** + * LifecycleConfig autoStopTime. + * @member {google.protobuf.ITimestamp|null|undefined} autoStopTime + * @memberof google.cloud.dataproc.v1.LifecycleConfig + * @instance + */ + LifecycleConfig.prototype.autoStopTime = null; + + /** + * LifecycleConfig autoStopTtl. + * @member {google.protobuf.IDuration|null|undefined} autoStopTtl + * @memberof google.cloud.dataproc.v1.LifecycleConfig + * @instance + */ + LifecycleConfig.prototype.autoStopTtl = null; + /** * LifecycleConfig idleStartTime. * @member {google.protobuf.ITimestamp|null|undefined} idleStartTime @@ -22627,6 +22717,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * LifecycleConfig stopTtl. + * @member {"autoStopTime"|"autoStopTtl"|undefined} stopTtl + * @memberof google.cloud.dataproc.v1.LifecycleConfig + * @instance + */ + Object.defineProperty(LifecycleConfig.prototype, "stopTtl", { + get: $util.oneOfGetter($oneOfFields = ["autoStopTime", "autoStopTtl"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new LifecycleConfig instance using the specified properties. * @function create @@ -22659,6 +22760,12 @@ $root.google.protobuf.Duration.encode(message.autoDeleteTtl, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.idleStartTime != null && Object.hasOwnProperty.call(message, "idleStartTime")) $root.google.protobuf.Timestamp.encode(message.idleStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.idleStopTtl != null && Object.hasOwnProperty.call(message, "idleStopTtl")) + $root.google.protobuf.Duration.encode(message.idleStopTtl, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.autoStopTime != null && Object.hasOwnProperty.call(message, "autoStopTime")) + $root.google.protobuf.Timestamp.encode(message.autoStopTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.autoStopTtl != null && Object.hasOwnProperty.call(message, "autoStopTtl")) + $root.google.protobuf.Duration.encode(message.autoStopTtl, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -22707,6 +22814,18 @@ message.autoDeleteTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } + case 5: { + message.idleStopTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.autoStopTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.autoStopTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } case 4: { message.idleStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; @@ -22770,6 +22889,29 @@ return "autoDeleteTtl." + error; } } + if (message.idleStopTtl != null && message.hasOwnProperty("idleStopTtl")) { + var error = $root.google.protobuf.Duration.verify(message.idleStopTtl); + if (error) + return "idleStopTtl." + error; + } + if (message.autoStopTime != null && message.hasOwnProperty("autoStopTime")) { + properties.stopTtl = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.autoStopTime); + if (error) + return "autoStopTime." + error; + } + } + if (message.autoStopTtl != null && message.hasOwnProperty("autoStopTtl")) { + if (properties.stopTtl === 1) + return "stopTtl: multiple values"; + properties.stopTtl = 1; + { + var error = $root.google.protobuf.Duration.verify(message.autoStopTtl); + if (error) + return "autoStopTtl." + error; + } + } if (message.idleStartTime != null && message.hasOwnProperty("idleStartTime")) { var error = $root.google.protobuf.Timestamp.verify(message.idleStartTime); if (error) @@ -22805,6 +22947,21 @@ throw TypeError(".google.cloud.dataproc.v1.LifecycleConfig.autoDeleteTtl: object expected"); message.autoDeleteTtl = $root.google.protobuf.Duration.fromObject(object.autoDeleteTtl); } + if (object.idleStopTtl != null) { + if (typeof object.idleStopTtl !== "object") + throw TypeError(".google.cloud.dataproc.v1.LifecycleConfig.idleStopTtl: object expected"); + message.idleStopTtl = $root.google.protobuf.Duration.fromObject(object.idleStopTtl); + } + if (object.autoStopTime != null) { + if (typeof object.autoStopTime !== "object") + throw TypeError(".google.cloud.dataproc.v1.LifecycleConfig.autoStopTime: object expected"); + message.autoStopTime = $root.google.protobuf.Timestamp.fromObject(object.autoStopTime); + } + if (object.autoStopTtl != null) { + if (typeof object.autoStopTtl !== "object") + throw TypeError(".google.cloud.dataproc.v1.LifecycleConfig.autoStopTtl: object expected"); + message.autoStopTtl = $root.google.protobuf.Duration.fromObject(object.autoStopTtl); + } if (object.idleStartTime != null) { if (typeof object.idleStartTime !== "object") throw TypeError(".google.cloud.dataproc.v1.LifecycleConfig.idleStartTime: object expected"); @@ -22829,6 +22986,7 @@ if (options.defaults) { object.idleDeleteTtl = null; object.idleStartTime = null; + object.idleStopTtl = null; } if (message.idleDeleteTtl != null && message.hasOwnProperty("idleDeleteTtl")) object.idleDeleteTtl = $root.google.protobuf.Duration.toObject(message.idleDeleteTtl, options); @@ -22844,6 +23002,18 @@ } if (message.idleStartTime != null && message.hasOwnProperty("idleStartTime")) object.idleStartTime = $root.google.protobuf.Timestamp.toObject(message.idleStartTime, options); + if (message.idleStopTtl != null && message.hasOwnProperty("idleStopTtl")) + object.idleStopTtl = $root.google.protobuf.Duration.toObject(message.idleStopTtl, options); + if (message.autoStopTime != null && message.hasOwnProperty("autoStopTime")) { + object.autoStopTime = $root.google.protobuf.Timestamp.toObject(message.autoStopTime, options); + if (options.oneofs) + object.stopTtl = "autoStopTime"; + } + if (message.autoStopTtl != null && message.hasOwnProperty("autoStopTtl")) { + object.autoStopTtl = $root.google.protobuf.Duration.toObject(message.autoStopTtl, options); + if (options.oneofs) + object.stopTtl = "autoStopTtl"; + } return object; }; diff --git a/packages/google-cloud-dataproc/protos/protos.json b/packages/google-cloud-dataproc/protos/protos.json index ef6d1b40c622..a1e23f9dad7a 100644 --- a/packages/google-cloud-dataproc/protos/protos.json +++ b/packages/google-cloud-dataproc/protos/protos.json @@ -1852,6 +1852,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "engine": { + "type": "Engine", + "id": 30, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "configBucket": { "type": "string", "id": 1, @@ -1982,6 +1989,13 @@ "CLUSTER_TIER_STANDARD": 1, "CLUSTER_TIER_PREMIUM": 2 } + }, + "Engine": { + "values": { + "ENGINE_UNSPECIFIED": 0, + "DEFAULT": 1, + "LIGHTNING": 2 + } } } }, @@ -2935,6 +2949,12 @@ "autoDeleteTime", "autoDeleteTtl" ] + }, + "stopTtl": { + "oneof": [ + "autoStopTime", + "autoStopTtl" + ] } }, "fields": { @@ -2959,6 +2979,27 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "idleStopTtl": { + "type": "google.protobuf.Duration", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "autoStopTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "autoStopTtl": { + "type": "google.protobuf.Duration", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "idleStartTime": { "type": "google.protobuf.Timestamp", "id": 4, diff --git a/packages/google-cloud-dataproc/system-test/install.ts b/packages/google-cloud-dataproc/system-test/install.ts index 394f3362d203..f66069aa3940 100644 --- a/packages/google-cloud-dataproc/system-test/install.ts +++ b/packages/google-cloud-dataproc/system-test/install.ts @@ -40,7 +40,7 @@ describe('📦 pack-n-play test', () => { packageDir: process.cwd(), sample: { description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() } }; await packNTest(options); diff --git a/packages/google-cloud-dataqna/package.json b/packages/google-cloud-dataqna/package.json index 5ada76a9db02..a716065f4dd2 100644 --- a/packages/google-cloud-dataqna/package.json +++ b/packages/google-cloud-dataqna/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-datastream/package.json b/packages/google-cloud-datastream/package.json index b7e21f25cea7..301a4a0d46c4 100644 --- a/packages/google-cloud-datastream/package.json +++ b/packages/google-cloud-datastream/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 3368e381b647..0561508ffc95 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -13,7 +13,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-developerconnect/package.json b/packages/google-cloud-developerconnect/package.json index e33e0489c3e4..582d4893831a 100644 --- a/packages/google-cloud-developerconnect/package.json +++ b/packages/google-cloud-developerconnect/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-developerconnect", "keywords": [ diff --git a/packages/google-cloud-devicestreaming/package.json b/packages/google-cloud-devicestreaming/package.json index d37f4f234762..e11b65df50ff 100644 --- a/packages/google-cloud-devicestreaming/package.json +++ b/packages/google-cloud-devicestreaming/package.json @@ -11,8 +11,7 @@ "author": "Google LLC", "main": "build/src/index.js", "files": [ - "build/src", - "build/protos" + "build/src" ], "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-devicestreaming", "keywords": [ diff --git a/packages/google-cloud-dialogflow-cx/package.json b/packages/google-cloud-dialogflow-cx/package.json index 0a21a5e82300..9b40d734e88c 100644 --- a/packages/google-cloud-dialogflow-cx/package.json +++ b/packages/google-cloud-dialogflow-cx/package.json @@ -12,7 +12,6 @@ "main": "build/src/index.js", "files": [ "build/src", - "build/protos", "!build/src/**/*.map" ], "keywords": [ diff --git a/packages/google-cloud-dialogflow/package.json b/packages/google-cloud-dialogflow/package.json index 9c8cdd4f026a..ec1d0ab8d186 100644 --- a/packages/google-cloud-dialogflow/package.json +++ b/packages/google-cloud-dialogflow/package.json @@ -14,7 +14,6 @@ }, "main": "build/src/index.js", "files": [ - "build/protos", "build/src", "!build/src/**/*.map" ], diff --git a/packages/google-cloud-discoveryengine/.gitattributes b/packages/google-cloud-discoveryengine/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-cloud-discoveryengine/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-discoveryengine/CODE_OF_CONDUCT.md b/packages/google-cloud-discoveryengine/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-cloud-discoveryengine/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-discoveryengine/CONTRIBUTING.md b/packages/google-cloud-discoveryengine/CONTRIBUTING.md new file mode 100644 index 000000000000..4fd089462364 --- /dev/null +++ b/packages/google-cloud-discoveryengine/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Discoveryengine API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=discoveryengine.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-discoveryengine/LICENSE b/packages/google-cloud-discoveryengine/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-cloud-discoveryengine/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, ac{"code":"deadline_exceeded","msg":"operation timed out"}